Question

Do I need to install a mail server?

  • Posted April 10, 2013

Magento, WordPress and many other platforms often need to send emails to users. Password resets, new users etc.

Do I need to install a mail server for this to work? If so what would you recommend?

Subscribe
Share

Sendmail is not installed by defaut on Debian distribution. It could sent php mails.


Submit an answer
You can type!ref in this text area to quickly search our full set of tutorials, documentation & marketplace offerings and insert the link!

These answers are provided by our Community. If you find them useful, show some love by clicking the heart. If you run into issues leave a comment, or add your own answer to help others.

For WordPress, I think a send only MTA such as <a href=“https://www.digitalocean.com/community/articles/how-to-install-the-send-only-mail-server-exim-on-ubuntu-12-04”>Exim</a> or <a href=“http://www.htpcbeginner.com/lightweight-mail-server-for-linux-nullmailer-mta/”>Nullmailer</a> are good. I use nullmailer and it has worked well for 3 years now. <br>

Hi thanks for the response. Yeah I am not looking to manage my own mail server a this point (unless this is the only solution to my problem below). I currently use Google Apps too for my mailboxes / users which is excellent! <br> <br>My issue is with the ability for web apps / platforms to send emails. My experience is with shared hosting where this just works and I am a bit stumped at what the solution is on a VPS. Your example plugin could be a solution but I have never needed it before which makes me think that there is something I need to configure on the VPS. <br> <br>Thanks again.

Thanks for the response on mandrillapp.com. I used to setup this smtp and posfix on my server for hours. Now with mandrillapp and wpmandrill plugin I am super happy and secure. Setupp litteraly took 2min and even a non programmer could do it easily. And even better, it is much less probable that you will end up in spam than using your own serer. I will use mandrillapp on all my upcoming wp projects.

Here’s another solution <a href=“https://www.digitalocean.com/community/questions/wordpress-email-notifications”>WordPress email notifications</a>

WordPress: <br>I installed the WP-Mail-SMTP plugin (http://wordpress.org/plugins/wp-mail-smtp/) and notifications for news users (for instance) are working now.

sorry this comment not accept some characters simple send mail code <br> <br><?php <br> <br>mail(“test@test.com”,“subject”,“bodytext”); <br> <br>?>

@d ssmtp not need actively development its not have daemon also <br> <br>just follow commands <br> <br>apt-get update <br>apt-get install ssmtp <br> <br>edit => nano /etc/ssmtp/ssmtp.conf <br> <br>if you will use gmail or gmail domain look your gmail settings page smtp configuration then <br> <br>Sample conf below <br> <br> <br> <br> <br># <br># Config file for sSMTP sendmail <br># <br># The person who gets all mail for userids < 1000 <br># Make this empty to disable rewriting. <br>root=someone@gmail.com <br> <br># The place where the mail goes. The actual machine name is required no <br># MX records are consulted. Commonly mailhosts are named mail.domain.com <br>mailhub:587=smtp.gmail.com <br> <br># Where will the mail seem to come from? <br>rewriteDomain= <br> <br># The full hostname <br>hostname=someone@gmail.com <br> <br>UseSTARTTLS=YES <br> <br>AuthUser=someone@gmail.com <br>AuthPass=your-account-password <br> <br># Are users allowed to set their own From: address? <br># YES - Allow the user to specify their own From: address <br># NO - Use the system generated From: address <br>FromLineOverride=YES <br> <br>this conf file not encrypte password then be sure your file permission is set to 640 <br> <br>save file after test simple command to write some code to test file <br> <br>echo ‘<?php mail(“test@test.com”,“subject”,“textbody”); ?>’ > /var/www/test.php <br> <br>after check your inbox. <br> <br>Sorry for bad english :) <br> <br>if any problem feel free i will help you <br>bye.

@brooqs, @goran, <br> <br>please note that ssmtp is not being developed anymore and is replaced by msmtp afaik. <br> <br>anyway, ssmtp works great and I’m using it on almost all machines that need to send the emails out off the box only. <br> <br>so, @goran, Im using this: <br> <br># noComments /etc/ssmtp/ssmtp.conf <br>root=admin@example.net <br>mailhub:465=mailhub.example.net <br>rewriteDomain=example.net <br>hostname=example.net <br>AuthUser=<user>@example.net <br>AuthPass=<your_pass> <br>FromLineOverride=YES <br>UseTLS=YES <br> <br># noComments /etc/ssmtp/revaliases <br>root:<user>@example.net:mailhub.example.net <br>

Hi Brooqs, <br> <br>I’m on Ubuntu 12.04. I’d be happy if you could elaborate a bit more on the subject. Noob here… :)