Linux - NetworkingThis forum is for any issue related to networks or networking.
Routing, network cards, OSI, etc. Anything is fair game.
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.
Introduction to Linux - A Hands on Guide
This guide was created as an overview of the Linux Operating System, geared toward new users as an exploration tour and getting started guide, with exercises at the end of each chapter.
For more advanced trainees it can be a desktop reference, and a collection of the base knowledge needed to proceed with system and network administration. This book contains many real life examples derived from the author's experience as a Linux system and network administrator, trainer and consultant. They hope these examples will help you to get a better understanding of the Linux system and that you feel encouraged to try out things on your own.
Click Here to receive this Complete Guide absolutely free.
I'm running Opensuse Linux 10.2. I have a web page containing the PHP code
echo mail("firstname.lastname@example.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.
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:
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