Let me point something out here: I was a goof and had an authentication setting wrong. When I changed it back to LOGIN, it sends e-mail just fine. So, all is well... sort of. Every 3rd or 4th run of the script still generates the Access Violation message. However, since it happens intermittently, it makes it a pain in the rear to track down.

DVD> Also, you don't need a mailserver on localhost to use mail()

I'm on Windows Server 2003...
Here's the error I get when I use mail() and no SMTP authentication:

Code:
mail("[EMAIL PROTECTED]","This is a test","This is the message");

Error:
Warning: mail() [function.mail]: Failed to connect to mailserver at "localhost" port 25, verify your "SMTP" and "smtp_port" setting in php.ini or use ini_set() in E:\path\to\test.php on line 5


When I explicitly set the correct mail server with ini_set(), I get:

Warning: mail() [function.mail]: SMTP server response: 550 Relaying is prohibited in E:\path\to\test.php on line 6

This is why I've gone with using the PEAR class Mail_smtp. It seems the easiest thing to use without having to write a whole lot of socket connection code.

--
Regards,
 Ben Ramsey
 http://benramsey.com
 http://www.phpcommunity.org/wiki/People/BenRamsey

--
PHP General Mailing List (http://www.php.net/)
To unsubscribe, visit: http://www.php.net/unsub.php



Reply via email to