View Full Version : Send Email with PHP

07-16-2008, 12:51 PM

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.


07-16-2008, 04:04 PM
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.

07-16-2008, 06:25 PM
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 (http://www.pmail.com/downloads_s3_t.htm)

07-18-2008, 06:31 AM
i heard that gmail allows use to use their smtp server.

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

07-18-2008, 06:38 AM
You would need to use sendmail(). Using something like PHPMailer makes this simple to do.