Results 1 to 7 of 7

Thread: How do I set up a mail server and use it with PHP?

  1. #1
    Join Date
    Nov 2008
    Beans
    19

    Question How do I set up a mail server and use it with PHP?

    I have an old computer running out the back. At the moment it is running Apache (apache2 i think) with PHP. It is here. I want to be able to send emails to/from ben@bennym.zapto.org. What do i need to do? I need it in command line form, as it is running ubuntu server, so no GUI.

    I then need to be able to use PHP scripts to send email e.g. from a form.

    I don't need all of this to be professional quality, I just want to do it so I know how. It's a kind of "because I can" situation.

    Thank you for your help.

  2. #2
    Join Date
    Nov 2006
    Location
    40.31996,-80.607213
    Beans
    Hidden!
    Distro
    Ubuntu

    Re: How do I set up a mail server and use it with PHP?

    Code:
    drsmall@mycroft:~$ mail
    The program 'mail' can be found in the following packages:
     * mailx
     * mailutils
    Try: sudo apt-get install <selected package>
    Make sure you have the 'universe' component enabled
    Try that and see if it works.
    "Security lies within the user of who runs the system. Think smart, live safe." - Dr Small
    Linux User #441960 | Wiki: DrSmall

  3. #3
    Join Date
    Jan 2008
    Location
    Sittingbourne, UK
    Beans
    196
    Distro
    Ubuntu 10.10 Maverick Meerkat

    Re: How do I set up a mail server and use it with PHP?

    Quote Originally Posted by Dr Small View Post
    Code:
    drsmall@mycroft:~$ mail
    The program 'mail' can be found in the following packages:
     * mailx
     * mailutils
    Try: sudo apt-get install <selected package>
    Make sure you have the 'universe' component enabled
    Try that and see if it works.

    If you want a proper MTA you need to install one of exim, postfix, sendmail etc.

  4. #4
    Join Date
    Nov 2008
    Beans
    19

    Re: How do I set up a mail server and use it with PHP?

    Quote Originally Posted by Philio View Post
    If you want a proper MTA you need to install one of exim, postfix, sendmail etc.
    I have postfix, but i cant send mail (using the mail command, it already works) to my hotmail or receive t from hotmail. I can send mail to other users of the computer with 'mail blink@bennym.zapto.org'. What now?

  5. #5
    Join Date
    Oct 2005
    Location
    Aldan, PA
    Beans
    552

    Re: How do I set up a mail server and use it with PHP?

    I am in the same situation as the original poster. I have followed all types of tutorials from these forums and ubuntu wiki, but gave up on sendmail and postfix. However, I followed this tutorial today: https://help.ubuntu.com/community/Exim4 and have been successfully sending emails to "localhost". But when I try to send an email outside localhost (e.g. user@gmail.com) it fails. Any idea why? Darn, I wish Linux were simpler to use
    Photography by Indians
    I'm registered Linux User # 406032

  6. #6
    Join Date
    Nov 2008
    Beans
    19

    Re: How do I set up a mail server and use it with PHP?

    Bump!!
    I'm still having problems...

  7. #7
    Join Date
    Mar 2007
    Location
    Hillsboro, OR
    Beans
    169
    Distro
    Ubuntu 12.10 Quantal Quetzal

    Re: How do I set up a mail server and use it with PHP?

    Quote Originally Posted by squeakyneb View Post
    I have an old computer running out the back.
    First... you should go catch it!!

    Second, Hotmail is terrible. They're fairly nazi-ish when it comes to spam protection. If you don't have correct reverse/forward DNS, HELO/Banner issues, or simply start sending them a fair amount of email without slowly ramping up, they'll just ignore your messages. Actually, they'll accept them, and then silently discard them. Unfortunately, there's not much you can do about it, other than tell your users to use a real email service (gmail and fastmail both come to mind.)
    Apollo(ss): Ubuntu 8.10, Pentium T2330, 2GB RAM, 200GB(Laptop)
    Hestia: Ubuntu 8.04.1, 2.4Ghz P4, 1GB RAM, 500GB, (SMB/FTP/Torrent) {Rebuilding}
    Poseidon: Ubuntu Server 8.04.1, 512MB, LAMP, Mail (VPS)

Tags for this Thread

Bookmarks

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •