NuSphere Forums Forum Index
NuSphere Forums
Reply to topic
SMTP errors from within debugger


Joined: 18 Jul 2006
Posts: 3
Location: Lacey, Washington
Reply with quote
I am having trouble with the mail() function in PHP when running in the debugger. I get an "SMTP server response: 501 5.5.4 Invalid Address" error when I call the mail function, but only in the debugger. The code works fine on the normal web site. Can somebody point me in the right direction?

I am sure it is an INI file tweak I need to do on my development machine, but I am not sure which one.

Thanks!

Kevin

Code snippet follows:

$subject_internal = "[Waiting List: $eventname]";
$headers_internal = 'Date: '.date('r')."\r\n";
$headers_internal .= "From: <$FromEmail>" . "\r\n";
$headers_internal .= "Reply-To: $FromEmail" . "\r\n";
$headers_internal .= "X-Mailer: CorgiMail 1.0" . "\r\n";
$headers_internal .= 'MIME-Version: 1.0' . "\r\n";
$headers_internal .= 'Content-type: text/html; charset=iso-8859-1' . "\r\n";

// Mail it to everyone on the internal event mailing list
$l = connectcw();
$q = "select * from eventmailinglist where eid=$eid";
$res = @mysql_query($q, $l);
while ($mt = @mysql_fetch_array($res))
{
@mail($mt['email'], $subject_internal, $message_internal, $headers_internal);
}

// now mail it to the member
@mail($FromEmail, $subject_member, $message_member, $headers_member);

disconnectcw($l);

_________________
Best regards,

Kevin
View user's profileFind all posts by kgmccoySend private message
Site Admin

Joined: 13 Jul 2003
Posts: 8344
Reply with quote
Probably your web site runs SMTP server (like sendmail) locally and therefore defaul setting for SMTP (localhost) works fine.
Your Windows machine probably runs without SMTP servers and you just have to get the probelem with the defaults Smile

_________________
The PHP IDE team
View user's profileFind all posts by dmitriSend private messageVisit poster's website
SMTP errors from within debugger
You cannot post new topics in this forum
You cannot reply to topics in this forum
You cannot edit your posts in this forum
You cannot delete your posts in this forum
You cannot vote in polls in this forum
All times are GMT - 5 Hours  
Page 1 of 1  

  
  
 Reply to topic