How to avoid Spam in Outlook/Hotmail with Mailgun?

天大地大妈咪最大 提交于 2020-06-24 08:29:50

问题


I'm using Mailgun to send transactional emails (tickets for events) and all the emails are sent to Outlook/Hotmail spam and I want to avoid that. I have added the SPF and DKIM records and nothing works. What should I do to avoid the spam filter (actually, I'm not sending spam. The user triggers the transactional email when he register to an event)

Client client = Client.create ();
client.addFilter ( new HTTPBasicAuthFilter ( "api", "MI_API_KEY" ) );
WebResource webResource = client
        .resource ( "MAILGUN_URL" );

MultivaluedMapImpl formData = new MultivaluedMapImpl();

formData.add ( "from", "hola@peewah.co" );
formData.add ( "to", "csacanam@outlook.com" );
formData.add ( "subject", "Camilo, welcome to the event" );
formData.add ( "html", "<h1>Camilo thank you for your registration in the event</h1>") );
formData.add ( "text", "Camilo thank you for your registration in the event" );

ClientResponse clientResponse = webResource.type ( MediaType.APPLICATION_FORM_URLENCODED )
        .post ( ClientResponse.class, formData );

int status = clientResponse.getStatus ();

if ( status >= 400 )
{
    throw new BadRequestException ( "Your message couldn't be sent" );
}

回答1:


Your issue isn't your code, it a problem with using MailGun. If you check the email headers with the following site:

https://testconnectivity.microsoft.com/?tabid=mha

You'll see something similar to the following:

Spam Confidence Level   5 (Spam Confidence Interpretation - Spam)

Bulk Complaint Level    6 (Bulk Complaint Level - The message is from a bulk sender that generates a mixed number of complaints.)

The issue is that MS view anything from a shared MG IP as coming from a bulk sender, this impacts SPL and can raise it to 5 or above (spam).

How do I know this? I'm having the exact same issue. I think the only option will be to go for a private IP, but our sending volume is not high enough, so it looks like we've wasted a lot of time and effort on MG!

Does anybody know another bulk sender that avoids Hotmail spam?


OK, an update to this just in case it helps anybody. We have finally managed to get delivery to Outlook from MailGun, this is what we checked / corrected etc, hope it helps:

  • From address needs to be name@mg.yourdomain.com, not name@yourdomain.com (seems obvious now, be we missed this
  • Add a h:List-Unsubscribe header and use <%unsubscribe_url%> to substitute the unsubscribe link
  • Check your SPF. When adding the MailGun SPF our provider added an additional invalid SPF record automatically, apparently you can only have one SPF per sub domain
  • Make sure that links in your content link to your domain
  • Make sure that branding is relevant and links to your domain
  • Make sure you have a clear unsubscribe message. We initially just had a text link saying 'unsubscribe", we changed this to "Click here to unsubscribe if you no longer want our emails"

It is definitely worth checking the headers with https://testconnectivity.microsoft.com/?tabid=mha This will give you leverage when getting MG to switch out an IP with poor reputation.



来源:https://stackoverflow.com/questions/43264303/how-to-avoid-spam-in-outlook-hotmail-with-mailgun

易学教程内所有资源均来自网络或用户发布的内容,如有违反法律规定的内容欢迎反馈
该文章没有解决你所遇到的问题?点击提问,说说你的问题,让更多的人一起探讨吧!