Problem Sending Emails
Posted by: sanfly (
Date: December 05, 2006 08:15PM


I installed WAMP5 on my PC for testing my php pages, and im having a little trouble with scripts that require emails to be sent. I will point out straght away that these scripts all work fine when I upload them to my webhost

The error message I am getting is along these lines:

Warning: mail() [function.mail]: SMTP server response: 501 <New Zealand Society for Oncology <>>: "@" or "." expected after "New" in C:\server\www\NZSO\sendmessage.php on line 108

This is my sendmail script

$user_passwords_sender = "New Zealand Society for Oncology";
$user_passwords_email = "";

$sendmail = mail($mail_to_email, $subject, $message, "From: $user_passwords_sender <$user_passwords_email>\nX-Mailer: PHP/" . phpversion());

If I change my sendmail script to:

$sendmail = mail($mail_to_email, $subject, $message, "From: $user_passwords_email \nX-Mailer: PHP/" . phpversion());

it works fine, so it likes the format "" but not "New Zealand Society for Oncology <>"

All I can guess from this is that for some reason it thinks that the name of recipient + email address is the email address, ie: it doesnt recogonise the format the "From" header is in.

Can anyone suggest a way to fix this? I dont know if its a PHP issue, or server issue or what...


Options: ReplyQuote
Re: Problem Sending Emails
Posted by: yfastud (72.236.169.---)
Date: December 05, 2006 09:49PM

wampserver doesn't come w/ mail server

Options: ReplyQuote

Sorry, only registered users may post in this forum.