Re: [PHP] mail problem at interland
On Friday 28 January 2005 16:32, Jason Wong wrote: On Friday 28 January 2005 10:09, David Edwards wrote: I have a fairly simple script written that uses the mail() function on a client site hosted at Interland. I have used a similar script quite a few times before with no problem. However although the script generates no errors, no emails appear at their intended destination. Interland support has not been that helpful and they did suggest I try the '-f' option in the header. That did not work either. Has anyone seen this before, I am running out of ideas. The mail portion of the script is below: $headers .= MIME-Version: 1.0\n; $headers .= Content-type: text/plain; charset=iso-8859-1\n; $headers .= X-Priority: 1\n; $headers .= X-MSMail-Priority: High\n; $headers .= X-Mailer: php\n; $headers .= From: $emailfrom\n; $mailsent = mail($emailto, $subject, $msg, $headers,-f . $emailfrom); 1) Use the proper delimiters between headers -- \r\n 2) Check your mailserver logs 3) The From address may cause the mesage to be rejected if it does not have the same domain as the mailserver. Cheers -- David Robley Even the Holodeck women turn me down: Wesley -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php
Re: [PHP] mail problem at interland
Hi David, On Thu, January 27, 2005 9:09 pm, David Edwards said: Hi, $headers .= MIME-Version: 1.0\n; $headers .= Content-type: text/plain; charset=iso-8859-1\n; $headers .= X-Priority: 1\n; $headers .= X-MSMail-Priority: High\n; $headers .= X-Mailer: php\n; $headers .= From: $emailfrom\n; I believe the headers have to end with a blank line? If I remeber correctly, the last line in the $headers should have two new lines like $headers .= From: $emailfrom\n\n; HTH -R'twick -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php
Re: [PHP] mail problem at interland
On Friday 28 January 2005 10:54, R'twick Niceorgaw wrote: I believe the headers have to end with a blank line? If I remeber correctly, the last line in the $headers should have two new lines like $headers .= From: $emailfrom\n\n; No, the mail() function will automatically take care of the separation of the mail headers and the mail body. -- Jason Wong - Gremlins Associates - www.gremlins.biz Open Source Software Systems Integrators * Web Design Hosting * Internet Intranet Applications Development * -- Search the list archives before you post http://marc.theaimsgroup.com/?l=php-general -- New Year Resolution: Ignore top posted posts -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php
Re: [PHP] mail problem at interland
R'twick Niceorgaw wrote: Hi David, On Thu, January 27, 2005 9:09 pm, David Edwards said: Hi, $headers .= MIME-Version: 1.0\n; $headers .= Content-type: text/plain; charset=iso-8859-1\n; $headers .= X-Priority: 1\n; $headers .= X-MSMail-Priority: High\n; $headers .= X-Mailer: php\n; $headers .= From: $emailfrom\n; I believe the headers have to end with a blank line? If I remeber correctly, the last line in the $headers should have two new lines like $headers .= From: $emailfrom\n\n; mail() will take care of that. You might want to use \r\n instead of just \n, as that's what it's technically supposed to be -- Though I think it works just fine on Un*x-like boxes to use just \n... You might want to add Reply-to: as well as From with the same setting to keep more email clients happy. -- Like Music? http://l-i-e.com/artists.htm -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php
[PHP] mail problem at interland
Hi, I have a fairly simple script written that uses the mail() function on a client site hosted at Interland. I have used a similar script quite a few times before with no problem. However although the script generates no errors, no emails appear at their intended destination. Interland support has not been that helpful and they did suggest I try the '-f' option in the header. That did not work either. Has anyone seen this before, I am running out of ideas. The mail portion of the script is below: $headers .= MIME-Version: 1.0\n; $headers .= Content-type: text/plain; charset=iso-8859-1\n; $headers .= X-Priority: 1\n; $headers .= X-MSMail-Priority: High\n; $headers .= X-Mailer: php\n; $headers .= From: $emailfrom\n; $mailsent = mail($emailto, $subject, $msg, $headers,-f . $emailfrom); Any help would be MUCH appreciated. -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php
Re: [PHP] mail problem at interland
On Friday 28 January 2005 10:09, David Edwards wrote: I have a fairly simple script written that uses the mail() function on a client site hosted at Interland. I have used a similar script quite a few times before with no problem. However although the script generates no errors, no emails appear at their intended destination. Interland support has not been that helpful and they did suggest I try the '-f' option in the header. That did not work either. Has anyone seen this before, I am running out of ideas. The mail portion of the script is below: $headers .= MIME-Version: 1.0\n; $headers .= Content-type: text/plain; charset=iso-8859-1\n; $headers .= X-Priority: 1\n; $headers .= X-MSMail-Priority: High\n; $headers .= X-Mailer: php\n; $headers .= From: $emailfrom\n; $mailsent = mail($emailto, $subject, $msg, $headers,-f . $emailfrom); 1) Use the proper delimiters between headers -- \r\n 2) Check your mailserver logs -- Jason Wong - Gremlins Associates - www.gremlins.biz Open Source Software Systems Integrators * Web Design Hosting * Internet Intranet Applications Development * -- Search the list archives before you post http://marc.theaimsgroup.com/?l=php-general -- New Year Resolution: Ignore top posted posts -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php