Hello and welcome to our community! Is this your first visit?
Register
Enjoy an ad free experience by logging in. Not a member yet? Register.
Results 1 to 5 of 5
  1. #1
    New Coder
    Join Date
    Feb 2006
    Posts
    61
    Thanks
    11
    Thanked 0 Times in 0 Posts

    Send Email with PHP

    Hi,

    I am testing a PHP application at the moment. The application is hosted on my machine. When a person successfully registers with the application they are supposed to get an e-mail. I was just wondering how i set it up so that the e-mail is sent from my machine. Do I have to configure my machine as a mail server, or can I use gMail or something? This is on OpenSuse 11.

    /jlar

  • #2
    Supreme Master coder! _Aerospace_Eng_'s Avatar
    Join Date
    Dec 2004
    Location
    In a place far, far away...
    Posts
    19,291
    Thanks
    2
    Thanked 1,043 Times in 1,019 Posts
    You will need an smtp server to send out emails. You can also setup a mail server like Mercury that will route emails to username@localhost

    You'll need to set up the user within the Mercury admin panel.

    XAMPP comes installed with PHP, MySQL, and Mercury.
    ||||If you are getting paid to do a job, don't ask for help on it!||||

  • #3
    New Coder
    Join Date
    Jul 2008
    Posts
    10
    Thanks
    0
    Thanked 1 Time in 1 Post
    Mercury is a really good mail server. There is also Pegasus Mail but that is primarily for windows.

    If you want to download Mercury without having to isntall XAMPP go here

  • #4
    Regular Coder
    Join Date
    Apr 2007
    Posts
    141
    Thanks
    3
    Thanked 1 Time in 1 Post
    i heard that gmail allows use to use their smtp server.

    how does that work wiht the simple php mail() function?

  • #5
    Supreme Master coder! _Aerospace_Eng_'s Avatar
    Join Date
    Dec 2004
    Location
    In a place far, far away...
    Posts
    19,291
    Thanks
    2
    Thanked 1,043 Times in 1,019 Posts
    You would need to use sendmail(). Using something like PHPMailer makes this simple to do.
    ||||If you are getting paid to do a job, don't ask for help on it!||||


  •  

    Posting Permissions

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