By using this site, you agree to our updated Privacy Policy and our Terms of Use. Manage your Cookies Settings.
459,290 Members | 1,403 Online
Bytes IT Community
+ Ask a Question
Need help? Post your question and get tips & solutions from a community of 459,290 IT Pros & Developers. It's quick & easy.

php mail() send to outside addresses

P: n/a
Howdy,

I have successfully setup my php.ini file on a web server to
communicate with my Microsoft Exchange Mail server, and can test the
ability to send mail using the mail() function to internet mail
addresses. (mailboxes on our network),

However, when attempting to send mail to an outside address (ex:
someone at gmail dot com) the mail() returns "failed".

Here's my setup.
Windows 2003 IIs 6.0 webserver
Windows 2003 box running Exchange 2003
Is it a change I need to make to php.ini to allow mail to outside e-
mail domains? Is it a setting I need to change within Exchange? Or is
it simply a limitation of mail() to not be able to send mail to
outside domains?

Greatly appreciate your responses!

Chris

Aug 18 '07 #1
Share this Question
Share on Google+
2 Replies


P: n/a
xx75vulcan wrote:
Howdy,

I have successfully setup my php.ini file on a web server to
communicate with my Microsoft Exchange Mail server, and can test the
ability to send mail using the mail() function to internet mail
addresses. (mailboxes on our network),

However, when attempting to send mail to an outside address (ex:
someone at gmail dot com) the mail() returns "failed".

Here's my setup.
Windows 2003 IIs 6.0 webserver
Windows 2003 box running Exchange 2003
Is it a change I need to make to php.ini to allow mail to outside e-
mail domains? Is it a setting I need to change within Exchange? Or is
it simply a limitation of mail() to not be able to send mail to
outside domains?

Greatly appreciate your responses!

Chris
Chris,

No problem from the PHP end itself - I send mail to outside domains all
the time. It'd be rather pointless if you couldn't, wouldn't it?

Rather, your MTA is probably set up to not be an open relay - which
would make your server invaluable to spammers (for a few hours, at least
- until you get blacklisted).

You need to first understand your Exchange configuration. Depending on
how its set up determines what you need to do from the PHP end.

I suggest you start with an Exchange newsgroup. I doubt many people
here will be able to help you with Exchange configuration.

--
==================
Remove the "x" from my email address
Jerry Stuckle
JDS Computer Training Corp.
js*******@attglobal.net
==================
Aug 18 '07 #2

P: n/a
On Aug 18, 3:22 pm, Jerry Stuckle <jstuck...@attglobal.netwrote:
xx75vulcan wrote:
Howdy,
I have successfully setup my php.ini file on a web server to
communicate with my Microsoft Exchange Mail server, and can test the
ability to send mail using the mail() function to internet mail
addresses. (mailboxes on our network),
However, when attempting to send mail to an outside address (ex:
someone at gmail dot com) the mail() returns "failed".
Here's my setup.
Windows 2003 IIs 6.0 webserver
Windows 2003 box running Exchange 2003
Is it a change I need to make to php.ini to allow mail to outside e-
mail domains? Is it a setting I need to change within Exchange? Or is
it simply a limitation of mail() to not be able to send mail to
outside domains?
Greatly appreciate your responses!
Chris

Chris,

No problem from the PHP end itself - I send mail to outside domains all
the time. It'd be rather pointless if you couldn't, wouldn't it?

Rather, your MTA is probably set up to not be an open relay - which
would make your server invaluable to spammers (for a few hours, at least
- until you get blacklisted).

You need to first understand your Exchange configuration. Depending on
how its set up determines what you need to do from the PHP end.

I suggest you start with an Exchange newsgroup. I doubt many people
here will be able to help you with Exchange configuration.

--
Jerry is correct. Well, on all but that last part, anyway :)

You need to configure your Exchange server to allow relaying from a
specific machine (like your webserver) or specific networks (like you
internal network). In the Exchange System Manager, find the SMTP
Virtual server and open the properties for it. On the "Access" tab
click on "Relay" and add the IP address of your webserver. If you
trust your entire local network you could add that, too. Just make
sure you have it set to allow relay for "only the list below" -- not
"all except the list below."

Aug 18 '07 #3

This discussion thread is closed

Replies have been disabled for this discussion.