Visit Jeremy's Blog.
Go Back > Forums > Linux Forums > Linux - Newbie
User Name
Linux - Newbie This Linux forum is for members that are new to Linux.
Just starting out and have a question? If it is not in the man pages or the how-to's this is the place!


  Search this Thread
Old 08-31-2005, 01:25 PM   #1
LQ Newbie
Registered: Jun 2005
Posts: 17

Rep: Reputation: 0
How do I send emails by PHP on FC3 (and configure the MTA)?


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
Old 08-31-2005, 05:56 PM   #2
Senior Member
Registered: Aug 2003
Location: Houston, TX
Distribution: Arch
Posts: 1,380

Rep: Reputation: 47

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.

Last edited by bosewicht; 08-31-2005 at 06:06 PM.
Old 08-31-2005, 08:01 PM   #3
Senior Member
Registered: May 2004
Location: In the DC 'burbs
Distribution: Arch, Scientific Linux, Debian, Ubuntu
Posts: 4,290

Rep: Reputation: 378Reputation: 378Reputation: 378Reputation: 378
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.
Old 09-01-2005, 04:20 PM   #4
LQ Newbie
Registered: Jun 2005
Posts: 17

Original Poster
Rep: Reputation: 0
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


Thread Tools Search this Thread
Search this Thread:

Advanced Search

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is Off
HTML code is Off

Similar Threads
Thread Thread Starter Forum Replies Last Post
sendmail doesn't send emails outside dev_mohamed Linux - Networking 2 08-28-2005 03:42 PM
Can snort send emails? mikeghet Linux - Security 3 05-01-2005 07:40 PM
how MTA works? how do they detect files to send? how do they work for queuing message ltcstyle Programming 2 11-30-2004 05:50 PM
Can't recieve emails but can send them mosherben Linux - Software 12 08-10-2004 11:22 AM
Can't send or Receive Emails amohime Linux - Networking 4 04-11-2003 02:42 AM > Forums > Linux Forums > Linux - Newbie

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

Main Menu
Write for LQ is looking for people interested in writing Editorials, Articles, Reviews, and more. If you'd like to contribute content, let us know.
Main Menu
RSS1  Latest Threads
RSS1  LQ News
Twitter: @linuxquestions
Open Source Consulting | Domain Registration