Page 1 of 1

Configuring to 'send' non-local mail

PostPosted: 06. April 2007 18:57
by Tim Dawson
I'm using XAMPP with WinXP Home SP2 to test my website locally.

I've been able to set up the mail server to send mail (from a form on a web page) that is addressed to a non-local address (and receive it in Thunderbird on my localhost account). However, if I try sending from any address other than username@localhost I get the following message:

"Warning: mail() [function.mail]: SMTP server response: 553 We do not relay non-local mail, sorry. in D:\xampp\htdocs\maolbhuidheBBdev\pages\email.php on line 75"

email.php line 75 is where the mail() function is called as 'mail($mailTo, $subject, $message, $mailFrom)'
It's happy with $mailTo as non-local, but not when $mailFrom is non-local

For testing purposes I'd quite like to be able to set $mailFrom to a non-local address (it just seems a better test that way). But is it actually possible ?

PostPosted: 06. April 2007 21:45
by Codesmith
For test purposes you can temporarily change your sendmail.ini file to connect to your ISP's mail server.

---
I am assuming you are trying to have sendmail connect to Mercury mail. At least I ran into the same problem as you when I tried that approach.

Since I just need to send out test email, bypassing Mercury altogether was my best solution.

PostPosted: 06. April 2007 22:24
by Tim Dawson
Yes, I'm trying to connect to Mercury Mail. It seemed reasonable to assume it would receive e-mail from anywhere (I'm rather more surprised it doesn't object to the $mailTo being non-local).

However, I'll try connecting to my ISP's SMTP. Then if both the mailTo and mailFrom are e-mail addresses of mine I should achieve my objective at all times.

Thanks for the suggestion.

Later: Yes, it worked perfectly.

PostPosted: 07. April 2007 17:18
by Codesmith
When just testing, having all incoming email forwarded to your ISPs email account without ever reaching the server, and having all outgoing mail passed through your ISP's mail server is good enough.

If I found a very detailed, step by step tutorial I would probably setup Mercury mail just for fun, but for now its really low on a long list of things to learn.

PostPosted: 07. April 2007 18:42
by Tim Dawson
Yes, I'm inclined to agree with that. I'm frightened witless by all those little windows. And now I'm happily testing via my ISP, which is better anyway !