Portal Home > Knowledgebase > Articles Database > PHP Mail Help
PHP Mail Help
|Posted by Danny159, 06-20-2011, 11:38 AM|
We are having some trouble with a script that send an email from a template file, it used to work...
it will send to one email address on another server, but wont sent to any other email address on a serten server... This is the code... does this look right to anyone?
The emails that the script sends appear in my mail manager on WHM as undelivered see below:
Mail Manager from WHM
Last edited by writespeak; 06-20-2011 at 12:31 PM.
Reason: Edited by request
|Posted by raulgonzalez, 06-20-2011, 12:11 PM|
|Would it have anything to do with the extra space after the email address:
$headers .= 'From: << address removed by request >> ' . "\r\n";
Might be nothing, it's just that it is the first thing I saw.
Last edited by writespeak; 06-20-2011 at 12:32 PM.
Reason: Address removed by request
|Posted by webEsun, 06-20-2011, 02:15 PM|
|Are you still looking for help for PHP mail?
|Posted by Danny159, 06-20-2011, 02:43 PM|
|Posted by webEsun, 06-20-2011, 02:44 PM|
|Can I see the URL?
|Posted by Danny159, 06-20-2011, 02:48 PM|
its our development site, you only need to fill in the email address on the form.
|Posted by webEsun, 06-20-2011, 02:53 PM|
|I just fill up the form , Can u please did u get any email or not.
|Posted by Danny159, 06-20-2011, 03:11 PM|
|Yes, I got the email to 1 email address but not to the other... (the 2 accounts are on different servers...
|Posted by webEsun, 06-20-2011, 03:13 PM|
|First of all u don't have any validation and check your spam folder.
|Posted by idevspot, 06-21-2011, 03:33 AM|
|Who is your web host? Some hosts place restrictions on which email address is the sender (from) address, Yahoo I believe has this restriction and requires that outgoing PHP sent mail comes from a designated @yourdomain.com address (set in the Yahoo hosting control panel)
On some servers, it is required to make a modification to the sendmail script:
mail("$to", "$subject", "$body", "From: YOU@YOURDOMAIN\r\nContent-type: text/html\r\n", "-fYOU@YOURDOMAIN.COM");
( Leave the "-f" )
May or may not be your issue, but worth a look.
Add to Favourites Print this Article
Java error (Views: 257)