Mail not being received by hotmail.com

后端 未结 3 1013
挽巷
挽巷 2020-12-12 02:17

For some reason I can receive email with the following code at yahoo.com, but not hotmail.com?? Can somebody please explain?

$usr = \"bob@hotmail.com\";
$su         


        
相关标签:
3条回答
  • 2020-12-12 02:48

    It is probably the spam-filters acting up, due to some header that hasn't been passed to its satisfaction.

    Instead of writing your own implementation of a mailer script, you could use one of the tested existing ones like PHPMailer.

    0 讨论(0)
  • 2020-12-12 02:49

    Disclosure: I'm one of the developers behind AlphaMail

    It's not easy to say exactly what the issue is here. Does the emails end up as spam, or is Hotmail rejecting your messages? If the messages are being rejected, it could be due to the fact that Hotmail has blocked your domain due to some reason. If it's on a shared host, it might be due to spam. If you want to find out the exact reason (spammy domain, missing SPF, missing DKIM), try manually connecting to Hotmail from your server and send the email manually. This way you'll have the error in hand instead of second-guessing.

    If you don't want to do this, and just want it to "work" I would recommend that you use a Transactional Email Service such as:

    • AlphaMail
    • MailGun
    • PostageApp

    Why?

    • You don't have to think that much about email delivery.
    • Statistics. Let's you track Total Sent/Clicks/Opens/Bounces.
    • Often web service-based instead of SMTP. I.e. easier to handle.
    • Cleaner code (at least if you use AlphaMail that separates data from presentation).
    • Scalable and future proof.

    If you choose to go with AlphaMail you could use the AlphaMail PHP-client.

    Example:

    include_once("comfirm.alphamail.client/emailservice.class.php");
    
    $email_service = AlphaMailEmailService::create()
        ->setServiceUrl("http://api.amail.io/v1")
        ->setApiToken("YOUR-ACCOUNT-API-TOKEN-HERE");
    
    $person = new stdClass();
    $person->userId = "1234";
    $person->firstName = "John";
    $person->lastName = "Doe";
    $person->dateOfBirth = 1975;
    
    $response = $email_service->queue(EmailMessagePayload::create()
        ->setProjectId(12345) // Your AlphaMail project (determines template, options, etc)
        ->setSender(new EmailContact("Sender Company Name", "from@example.com"))
        ->setReceiver(new EmailContact("Joe Doe", "to@example.org"))
        ->setBodyObject($person) // Any serializable object
    );
    

    Another advantage with AlphaMail is that you can edit your templates directly in the AlphaMail Dashboard, and you can format your emails using the Comlang template language.

    <html>
        <body>
            <b>Name:</b> <# payload.firstName " " payload.lastName #><br>
            <b>Date of Birth:</b> <# payload.dateOfBirth #><br>
    
            <# if (payload.userId != null) { #>
                <a href="/sign-up">Sign Up Free!</a>
            <# } else { #>
                <a href="/login?id=<# payload.userId #>">Sign In</a>
            <# } #>
        </body>
    </html>
    
    0 讨论(0)
  • 2020-12-12 02:50

    This may not be correct, but not every mail system (e.g. google, yahoo) does not support the fonts. Perhaps Hotmail is attempting to block the fonts, from my other issues. Hotmail has upgraded their spam-filted, some emails from software does not come through either.

    0 讨论(0)
提交回复
热议问题