Hello,

On 07/15/2004 07:06 PM, Php User wrote:
I am trying unsuccessfully to set up an email form and as far as I know my
code is fine, but it won't send. I suspect that it's because my server
requires authentication.

Running my script on my Windows machine I get the following.

Warning: mail() [function.mail <http://www.php.net/function.mail> ]: SMTP
server response: 550 not local host myhost.ca, not a gateway in...

On Linux I don't get a specific error message, the mail just never shows up.

I am in the right ballpark here with the authentication, and if so, how can
I get around this..?

That error means you need to authenticate to relay the message to the SMTP server. In Linux that does not happen because it does not relay messages to any SMTP server.


The mail() function does not support SMTP authentication. Alternatively you may want to try this class that can connect to a SMTP server of choice and authenticate if necessary. If you do not want to change your PHP programs much, the class comes with a wrapper function named smtp_mail() that works compatibly with the mail() function but sends the message via SMTP:

http://www.phpclasses.org/mimemessage

You also need this for the actual SMTP delivery:

http://www.phpclasses.org/smtpclass


--

Regards,
Manuel Lemos

PHP Classes - Free ready to use OOP components written in PHP
http://www.phpclasses.org/

PHP Reviews - Reviews of PHP books and other products
http://www.phpclasses.org/reviews/

Metastorage - Data object relational mapping layer generator
http://www.meta-language.net/metastorage.html

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



Reply via email to