Linux - NetworkingThis forum is for any issue related to networks or networking.
Routing, network cards, OSI, etc. Anything is fair game.
Notices
Welcome to LinuxQuestions.org, a friendly and active Linux Community.
You are currently viewing LQ as a guest. By joining our community you will have the ability to post topics, receive our newsletter, use the advanced search, subscribe to threads and access many other special features. Registration is quick, simple and absolutely free. Join our community today!
Note that registered members see fewer ads, and ContentLink is completely disabled once you log in.
If you have any problems with the registration process or your account login, please contact us. If you need to reset your password, click here.
Having a problem logging in? Please visit this page to clear all LQ-related cookies.
Get a virtual cloud desktop with the Linux distro that you want in less than five minutes with Shells! With over 10 pre-installed distros to choose from, the worry-free installation life is here! Whether you are a digital nomad or just looking for flexibility, Shells can put your Linux machine on the device that you want to use.
Exclusive for LQ members, get up to 45% off per month. Click here for more info.
I'm running Opensuse Linux 10.2. I have a web page containing the PHP code
echo mail("abrahams@acm.org","test php mail","test with an echo");
When I look at the web page in Firefox (I assume the browser doesn't matter, though), this line turns into "1", indicating that the mail function succeeded. I could not find any error messages anywhere, including the system log. But nonetheless, I received no mail.
if sendmail is installed correctly on your system - it may be that the pop server does not accept emails from your local box because it cant resolve your ip or whatever reason...
if sendmail is installed correctly on your system - it may be that the pop server does not accept emails from your local box because it cant resolve your ip or whatever reason...
If the problem is with the POP server, how could I determine that?
So how do I convince sendmail to send this message the same way that mail does?
Hmm - I guess it might behave like this because mail calls sendmail through its queueing process (as far as I know) ?? You should have two sendmail process running, one is sendmail itself, one is the sendmail queue process. I'm guessing mail calls this queueing process in the "right" way to get sendmail to send out the mail correctly. Further guess might be that it prepends some form of routing information?
From what you replied to the results in phpinfo() it seems your PHP setup is 100% fine, and your problems does not lie there...
You might need to altery sendmail.cf (the sendmail sending / routing rules) to enable sendmail to work "directly". No idea how or what you will need to do though - PHP seems fine, and thats basically where my experience so far stops...
I think I know now what the problem is, by looking at my .mailrc file:
set from=abrahams@acm.org
set smtp=smtp.comcast.net
set smtp-auth-user=pwabrahams
set smtp-auth-password=xxx
Somehow I need to transmit the information in these lines to php. How can I do that? I'd guess it requires adding something to php.ini, which brings up another question: which copy of php.ini is the active one? I'm guessing it's /etc/php5/apache2/php.ini, but I'm not sure.
I thought I might be able to do it by adding parameters to the sendmail call, but I can't find any sendmail parameters that carry this information.
Hmm - I'm not sure but can't you add these in the "headers" that you send to the PHP mail() call? Although I'm not sure those types of parameters can be passed in the headers section of the mail() call, it does seem the best bet?
I'm no expert on this, but it seems that the headers carry information pertaining to the message, not the agents that handle it. I haven't found any way to put the ISP username/password information there.
I'm now investigating another path: setting up parameters to the SASL authenticator. There's some googlable stuff about it on the Web. But looking into it is drawing me into obscure corners of networking under Linux that I was hoping I would not have to deal with.
as far as i know php on windows is usually cofigured to work with an external smtp server and on unix systems to work with internal sendmail. info regarding the smtp server does not belong to the mail headers.
take a look at php.net -> type "mail" into search box
Without this, the mail relay at your ISP will almost certainly attempt to send an acknowledgment,
which will bounce and cause your mail not to be sent.
LinuxQuestions.org is looking for people interested in writing
Editorials, Articles, Reviews, and more. If you'd like to contribute
content, let us know.