Email script not working after upgrade to v. 4.3

PHP programming forum. Ask questions or help people concerning PHP code. Don't understand a function? Need help implementing a class? Don't understand a class? Here is where to ask. Remember to do your homework!

Moderator: General Moderators

Post Reply
User avatar
verabug
Forum Newbie
Posts: 16
Joined: Tue Jun 11, 2002 7:53 pm
Location: San Francisco, CA
Contact:

Email script not working after upgrade to v. 4.3

Post by verabug »

After my host updated the PHP version to 4.3, all of my mail scripts fail.

Code: Select all

$eaddress = blah@blah.com

$subject = "blah";

$msg = "blah blah blah";

$headers = "From: vera@mediasparkles.com\nContent-Type: text/html";

mail($eaddress, $subject, $msg, $headers);
Any idea what I should look into it? This was working fine before the version upgrade.
User avatar
John Cartwright
Site Admin
Posts: 11470
Joined: Tue Dec 23, 2003 2:10 am
Location: Toronto
Contact:

Post by John Cartwright »

maybe have the return sender
User avatar
verabug
Forum Newbie
Posts: 16
Joined: Tue Jun 11, 2002 7:53 pm
Location: San Francisco, CA
Contact:

Post by verabug »

What do you mean?
User avatar
John Cartwright
Site Admin
Posts: 11470
Joined: Tue Dec 23, 2003 2:10 am
Location: Toronto
Contact:

Post by John Cartwright »

Some servers also require a second newline in the headers and
make sure you do not have any newline characters in the to or subject, or the mail may not be sent properly.
kettle_drum
DevNet Resident
Posts: 1150
Joined: Sun Jul 20, 2003 9:25 pm
Location: West Yorkshire, England

Post by kettle_drum »

Maybe also run a phpinfo() to see they have added mail support to the new version - it might not be a problem on your side.
Post Reply