How to get email working? (2 posts)

  1. Sloshy42
    Posted 5 years ago #

    I'm running WordPress 3.1 on a self-hosted LAMP server. I'm very new to this, but so far I have everything working fine. The only problem I have is that WordPress won't send any emails. I know that there are a few workarounds I could use, but I was hoping to fix the problem directly. I couldn't find anything in the documentation about configuring my server for sending emails. I have my php.ini set up for SMTP and I have the sendmail command installed. What should I check?

  2. Sloshy42
    Posted 5 years ago #

    I'm pretty sure that my /etc/hosts file is properly set... I'm using PHP 5.3.5 with the latest Apache on Arch Linux, if it helps.

    Also, I found a suggestion to put a file like the following on my server on one of the support posts here:

    $email = 'you@youremail.com';
    $fromemail = 'me@myemail.com';
    $subject = $_POST['subject'];
    $msg = 'This is a test';
    $headers = "From: ".$fromemail;
    if( !mail($email, $subject, $msg, $headers) ){
    	echo "Problem sending email.";
    	echo "Email successfully sent";

    It said that it sent an email correctly, but my email inbox is still empty. I'm very new to hosting a server, much less a blog. What has to be set properly so that email works properly?

Topic Closed

This topic has been closed to new replies.

About this Topic