Contact 7 form email not received in outlook.com

The contact 7 form in one of wordpress website is configured to send email to an account created in outlook.com

The form on submission shows success message but the message is never received in my outlook account.

Read More

Setting the recipient email to any gmail account works fine as email is received successfully.

Please suggest any possible solution for this.

Related posts

Leave a Reply

1 comment

  1. I had the exact same problem, and emails never even reached the junk folder, they just never arrived. Here is what I did:

    In outlook.com:

    In your account -> click the settings gear -> More mail settings -> Safe and blocked senders -> safe senders.

    Add your domain: example.com

    For hostname it wont be white listed automatically so add it as well: yourhost.example.com

    PHP:

    Make sure your $senderEmail (that is attached to the $headers) is within the safe sender you have added.

    $headers = "From: " . $senderName . " <" . $senderEmail . ">";
    $success = mail( $recipient, EMAIL_SUBJECT, $message, $headers );
    

    This made it go straight to inbox.

    Hope this helps.

    EDIT:

    It may also be far easier and productive to use a 3rd party service such as SendGrid or MailGun since directly meddling with email and servers configurations could be a major time sink.