php.net |  support |  documentation |  report a bug |  advanced search |  search howto |  statistics |  random bug |  login
Bug #41646 mail function will only send when i have a small body
Submitted: 2007-06-10 23:02 UTC Modified: 2007-06-25 16:33 UTC
From: rgadala at gmail dot com Assigned:
Status: Not a bug Package: Mail related
PHP Version: 5.2.3 OS: Windows XP
Private report: No CVE-ID: None
 [2007-06-10 23:02 UTC] rgadala at gmail dot com
Description:
------------
If I send a mail function with the body as only 'test' my email will get sent.Otherwise if I try and send a message like

$body = " Thank you for requesting to leave feedback.
To complete the final step, please click on this link:\n\n";

$body .= "http://www.abcdef.com/leavefeedback.php?x=12&y=12345678911234567892123456789312";

my message will not get sent. I have tried using $body = wordwrap($body, 70) before I send the email out but that still doesnt work.

Reproduce code:
---------------
$body = " Thank you for requesting to leave feedback.
To complete the final step, please click on this link:\n\n";

$body .= "http://www.abcdef.com/leavefeedback.php?x=12&y=12345678911234567892123456789312";

$mailSent = mail(abc@aol.com,
									'Leave Feedback Activation Link',
									$body, 'From: abcdefg@aol.com');
								if($mailSent){
									echo ' Thank You For Requesting to leave feedback. <br />An email to '.abc@aol.com.' has been
									sent to you to activate your feedback. Please disregard the old one.';
								} else {
									echo ' An email could not be sent to you due to a system error. <br />
									We apologize for any inconvenience. <br />';								
								}

Expected result:
----------------
Thank You For Requesting to leave feedback. <br />An email to abc@aol.com. has been sent to you to activate your feedback. Please disregard the old one.

(Then actually Recieving the email.)

Actual result:
--------------
Thank You For Requesting to leave feedback. <br />An email to abc@aol.com. has been sent to you to activate your feedback. Please disregard the old one.

(Not Recieving the email.)

Patches

Pull Requests

History

AllCommentsChangesGit/SVN commitsRelated reports
 [2007-06-12 12:31 UTC] iliaa@php.net
Could it be the limitation of your SMTP server?
 [2007-06-12 23:24 UTC] rgadala at gmail dot com
Actually I think I figured out the problem. I changed the "\n\n"'s to "\r\n\r\n" because I am running windows and I read that that was a problem unless you are using unix, then you want to use "\n\n" Any feedback on this?
 [2007-06-25 16:33 UTC] sniper@php.net
It's obviously your SMTP server's limitation.
 
PHP Copyright © 2001-2024 The PHP Group
All rights reserved.
Last updated: Wed Oct 16 02:01:28 2024 UTC