LinuxQuestions.org

LinuxQuestions.org (/questions/)
-   Linux - Newbie (https://www.linuxquestions.org/questions/linux-newbie-8/)
-   -   How do I send emails by PHP on FC3 (and configure the MTA)? (https://www.linuxquestions.org/questions/linux-newbie-8/how-do-i-send-emails-by-php-on-fc3-and-configure-the-mta-358885/)

murr4y 08-31-2005 01:25 PM

How do I send emails by PHP on FC3 (and configure the MTA)?
 
Hi,

I don't have much experience with linux but I know basic commands and stuff.
I've installed Apache, PHP and MySQL on an old computer running Fedora Core 3. I don't need the computer for much else than web serving, except I want to be able to send emails by the mail() function in PHP from the website.

I recall trying to fix this some time in the past and I think I tried switching the default MTA (Mail Transport Agent) from sendmail to postfix. I don't remember if I succeeded...

All I know is that it doesn't work sending mails now. I created a small test script sending to a hotmail account but it never arrived. So I don't know where to go from here... Please ask me for any logs, settings etc. that you need to help me setup the MTA.

Yeah I'm asking for a complete guide to make this work. I know it's much to ask, but I'm not going to use it for anything else than sending emails from the web site. I don't ask in this manner very often, but I do now because I'm not going to get into and learn every detail about linux MTA's. I just want it to work... (I'm more into the web serving and webdesign part ;))

I also wonder; is it possible to
1) Specify an smtp server which the server always sends to?
2) Specify the "return-path" and/or "from" header? PHP won't automatically insert and some servers won't accept emails without those headers.
(I think it does with one of them, I don't remember which one. I could also be wrong though.)

If you have any links, previous threads or similar, I'll be more than happy to look into them. I already tried searching, though.

I know this is alot to ask from experts on a forum but I'd be REALLY grateful if anyone is willing to help me!
Thanks in advance,
Heia Tufte

bosewicht 08-31-2005 05:56 PM

http://www.postfix.org/documentation.html

I highly doubt that someone is going to walk you thru setting up postfix or any other mailserver here. I would look into the documentation or find tutorials online. If you want a easy mailserver setup, look into the hula project.

btmiller 08-31-2005 08:01 PM

In terms of logs, verify that you actually have your mailserver running and listening on port 25 (use ps or netstat -- read the man pages for more detail) and then look in /var/log/maillog to see if you can spot any obvious error messages. There are all sorts of reasons why it might not be working.

murr4y 09-01-2005 04:20 PM

Thanks - I didn't expect more of an answer than what you gave me and I hope and assume it will be sufficient.
I'll look into it tomorrow, and probably reply stating my progress. Thanks again :)


All times are GMT -5. The time now is 10:34 PM.