-1

So I just set up a new EC2 instance on AWS (Ubuntu AMI) for a WordPress server. I'm pretty good with setting up the LAMP stack stuff but I have no idea how to get the server to allow email to go out. This box will never be used for receiving email, just sending. So is there something special I need to do for this. I installed mailuitls but that's as far as I got and I'm pretty sure I screwed that up.

Philip

5
  • Hi Philip and welcome to server fault. I've downvoted your question as Wordpress is one of the most documented web applications on the internet, and there is quite a bit of documentation on how to do this in a variety of ways. I would recommend looking at this documentation and if you still experience problems coming back with a specific issue and we'll be happy to help.
    – DKNUCKLES
    Jan 31, 2013 at 21:31
  • Thanks. I think. But my question isn't specific to Word Press, it has more to do with the server set up. Clearly there's ton of documentation on that as well, but I came to this site for some direction from other users as to were to start. Jan 31, 2013 at 21:44
  • You'll need a mail server that's agreed to handle your mails. Since you aren't going to accept incoming mail on this server, there would be no place for bounces or administrative replies to go. So you'll have to send the mail to a mail server that can receive those bounces, administrative emails, and so on. You probably want SES. Feb 1, 2013 at 3:58
  • You may need to install postfix and configure it as 'satellite system' (Ubuntu lets you to configure while installing it). Then test your server's mail sending ability with a one-liner provided by @philippe. Feb 1, 2013 at 9:26
  • Thanks for all the feedback. I was able to get this working by installing postfix Feb 20, 2013 at 20:26

2 Answers 2

0

First check out whether mail sending is working or not. Use the bash command

    echo "Mail Body" | mail -s "Mail Subject" your_mail@your_domain

to check it out. If you can receive mails, then this feature is enabled and you can got to the next step; using wordpress instead of basic bash command line. You can for instance go there to install a plugin to to this

0

If you need to test email : http://php.net/manual/fr/function.mail.php Just put a small php script like folowing to your root forder and execute it :

<?php
$to      = '[email protected]';
$subject = 'the subject';
$message = 'hello';
$headers = 'From: [email protected]' . "\r\n" .
    'Reply-To: [email protected]' . "\r\n" .
    'X-Mailer: PHP/' . phpversion();

mail($to, $subject, $message, $headers);
?>

Is it working ?

1
  • Thanks for the feedback. I was able to get it working by installing PostFix on the server. Feb 28, 2013 at 17:14

Not the answer you're looking for? Browse other questions tagged .