php mail() send to outside addresses
am 18.08.2007 20:30:51 von xx75vulcan
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
Re: php mail() send to outside addresses
am 18.08.2007 21:22:00 von Jerry Stuckle
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.
jstucklex@attglobal.net
==================
Re: php mail() send to outside addresses
am 18.08.2007 22:38:01 von zeldorblat
On Aug 18, 3:22 pm, Jerry Stuckle wrote:
> 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."