Juan Torres wrote:

Hi,

I have a problem with mail() function. I'm using PHP with Windows 2000
Professional and Internet Information Server 5.0.

My php code is:
mail("[EMAIL PROTECTED]", "Prueba Envio Email PHP", "Linea 1\nLinea 2\nLinea
3");

And my browser shows:
Warning: mail(): SMTP server response: 550 5.7.1 Unable to relay for
[EMAIL PROTECTED] in
c:\inetpub\wwwroot\projects_php\testing\email\default.php on line 21


Why? Can anybody help me?


Thanks!
Juan Torres.

It means that the SMTP server you set in your php.ini won't let you send mail like that. If yhe SMTP server you're using is your ISP's, it will probably not let you send messages from a yahoo address. Try using the e-mail address they gave you when you signed up. If you don't have one, ask whoever owns the SMTP server how to allow relaying. Likely this will take changing your From: address. If you want replies to go to your yahoo address, use the Reply-To: header.


If you do need authentication or more control, I'd suggest using PEAR's Mail package.

http://pear.php.net/package/Mail

PEAR takes a little getting used to, but you'll thank me in the end.

An easier solution would be to set up an SMTP server on your machine. This website may be useful: http://www.softstack.com/advsmtp.html The problem with this is that some mail providers (aol.com, etc.) may not accept your mail. Your best bet is to figure out what to send to the SMTP server of your ISP to allow you to send mail.

--
paperCrane <Justin Patrin>

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



Reply via email to