473,804 Members | 2,998 Online
Bytes | Software Development & Data Engineering Community
+ Post

Home Posts Topics Members FAQ

php mail() send to outside addresses

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
2 3752
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*******@attgl obal.net
=============== ===
Aug 18 '07 #2
On Aug 18, 3:22 pm, Jerry Stuckle <jstuck...@attg lobal.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 thread has been closed and replies have been disabled. Please start a new discussion.

Similar topics

2
595
by: AJ | last post by:
Hi all I've written a little newsletter script that takes addresses from a table and sends an e-mail to them. What I don't understand is what happens to wrong addresses. It all works and when I receive an e-mail it says it's from newsletter@domain.com (for example). I've put some rubbish into one row on my table to deliberately make it bounce but I don't get anything bounce back at my end. We want to be able to measure how many...
2
15957
by: Prashanth | last post by:
Hi, I am sending mails using CDO.Message . It is sending mails successfully only if the destination addresses are within the intranet. If you try to send a mail outside the intranet say someone@yahoo.com it gives an error. Error No : -2147220977 Error Desc : The server rejected one or more recipient addresses. The server response was: 550 5.7.1 Unable to relay for someone@yahoo.com
6
11197
by: DigitalRick | last post by:
I have been running CDONTS in my ASPpages to send emails to me sent from my guestbook. It had been working fine untill I upgraded to Server 2003 (I am also running Exchange 2003) all locally. I will include the code I originally used. I understand I should switch from CDONTS to CDO mail but after several sttempts I am finding a very hard time getting the new CDO mail to work properly. Any assistance with this would be greatly...
3
1835
by: Nathan Sokalski | last post by:
I have an ASP.NET page that sends a Mail.MailMessage to several email addresses (all mine). However, one of the addresses, the one ending in @verizon.net, does not seem to be recieving the message even though the other addresses are. I know the spelling is correct because I have tried sending messages from my other accounts to this address and have recieved them successfully. I also do not know of any junkmail filter that would delete the...
39
3330
by: Viken Karaguesian | last post by:
Hello all, <SIGH> I'm soooooo sick and tired of getting spam e-mails. I'm sure that part of the reson for this is that my e-mail address is publicly available on my website, ready to be picked by e-mail harvesting programs. I tried to thwart them by adding a REMOVE_THIS in my e-mail address (username@REMOVE_THISispname.net), but the e-mails have not stopped. As for NG's, I have the return address blocked in a similar fashion.
34
18300
by: antonyliu2002 | last post by:
I've set up the virtual smtp server on my IIS 5.1 like so: 1. Assign IP address to "All Unassigned", and listen to port 25. 2. Access Connection granted to "127.0.0.1". 3. Relay only allow "127.0.0.1". 4. Authentication: "Anonymous access" only. 5. Outbound connection listen to TCP 25. Besides,
10
1685
by: Newbie | last post by:
Hi all, I'm looking for a way to send newsletter to my subscribers (1000+ in total). I've managed to do it using .NET system.net.mail.smtpclient's sendAsync. I read the email addresses from a table (in a MSSQL DB) using sqldatareader, then looping through it to read each email address and add it to the instance's 'TO' property (e.g: mail.to.add(r.item("email_addr")) ). I test run it with my own addresses to see how it works. And...
11
3523
by: Ed Bitzer | last post by:
I have been able using the namespace System.Web.Mail and its method Smtp.mail.send to mail simple text messages to a small group within our 55 and older community. I need help expanding the programs capabilities. Searching this forum I did not find any related information so if I have chosen poorly, I would appreciate a suggestion of a more appropriate dotnet forum. Now what I wish is the ability to send bcc's rather than to: (would be...
1
2881
by: the_ricka | last post by:
Hi all, I'm fairly new to python, but very excited about it's potential. I'm trying to write a simple program that will accept input from a command line and send email. The parameters I used on the command line are for From address, To addresses, Subject and Body. For the body, I thought it would be better to read the input from a file so I could allow someone to nicely format the body with newlines in a text editor and just read it...
0
10332
jinu1996
by: jinu1996 | last post by:
In today's digital age, having a compelling online presence is paramount for businesses aiming to thrive in a competitive landscape. At the heart of this digital strategy lies an intricately woven tapestry of website design and digital marketing. It's not merely about having a website; it's about crafting an immersive digital experience that captivates audiences and drives business growth. The Art of Business Website Design Your website is...
1
10321
by: Hystou | last post by:
Overview: Windows 11 and 10 have less user interface control over operating system update behaviour than previous versions of Windows. In Windows 11 and 10, there is no way to turn off the Windows Update option using the Control Panel or Settings app; it automatically checks for updates and installs any it finds, whether you like it or not. For most users, this new feature is actually very convenient. If you want to control the update process,...
0
10077
tracyyun
by: tracyyun | last post by:
Dear forum friends, With the development of smart home technology, a variety of wireless communication protocols have appeared on the market, such as Zigbee, Z-Wave, Wi-Fi, Bluetooth, etc. Each protocol has its own unique characteristics and advantages, but as a user who is planning to build a smart home system, I am a bit confused by the choice of these technologies. I'm particularly interested in Zigbee because I've heard it does some...
0
9152
agi2029
by: agi2029 | last post by:
Let's talk about the concept of autonomous AI software engineers and no-code agents. These AIs are designed to manage the entire lifecycle of a software development project—planning, coding, testing, and deployment—without human intervention. Imagine an AI that can take a project description, break it down, write the code, debug it, and then launch it, all on its own.... Now, this would greatly impact the work of software developers. The idea...
1
7620
isladogs
by: isladogs | last post by:
The next Access Europe User Group meeting will be on Wednesday 1 May 2024 starting at 18:00 UK time (6PM UTC+1) and finishing by 19:30 (7.30PM). In this session, we are pleased to welcome a new presenter, Adolph Dupré who will be discussing some powerful techniques for using class modules. He will explain when you may want to use classes instead of User Defined Types (UDT). For example, to manage the data in unbound forms. Adolph will...
0
6853
by: conductexam | last post by:
I have .net C# application in which I am extracting data from word file and save it in database particularly. To store word all data as it is I am converting the whole word file firstly in HTML and then checking html paragraph one by one. At the time of converting from word file to html my equations which are in the word document file was convert into image. Globals.ThisAddIn.Application.ActiveDocument.Select();...
0
5522
by: TSSRALBI | last post by:
Hello I'm a network technician in training and I need your help. I am currently learning how to create and manage the different types of VPNs and I have a question about LAN-to-LAN VPNs. The last exercise I practiced was to create a LAN-to-LAN VPN between two Pfsense firewalls, by using IPSEC protocols. I succeeded, with both firewalls in the same network. But I'm wondering if it's possible to do the same thing, with 2 Pfsense firewalls...
0
5651
by: adsilva | last post by:
A Windows Forms form does not have the event Unload, like VB6. What one acts like?
1
4300
by: 6302768590 | last post by:
Hai team i want code for transfer the data from one system to another through IP address by using C# our system has to for every 5mins then we have to update the data what the data is updated we have to send another system

By using Bytes.com and it's services, you agree to our Privacy Policy and Terms of Use.

To disable or enable advertisements and analytics tracking please visit the manage ads & tracking page.