Empresas
Empregos
  • Sobre nós
  • Soluções
    • Publicação de vagas
      Publique sua vaga e receba candidatos qualificados em 48h.
    • Avaliações de candidatos
      Mais de 500 testes técnicos e psicológicos, mais anti-fraude.
    • Headhunting
      Busca executiva personalizada do início ao fim.
    • Folha de Pagamento + EOR
      Dispersão de folha e EOR em mais de 15 países da LATAM.
  • Preços
  • Empregos

0

267
Visualizações
How to avoid Spam in Outlook/Hotmail with Mailgun?

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" );
}
over 4 years ago · Santiago Trujillo
1 Respostas
Responde à pergunta

0

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.

over 4 years ago · Santiago Trujillo Relatório
Responde à pergunta
Encontrar trabalhos remotos

Descubra a nova forma de encontrar um emprego!

melhores empregos
Principais categorias de trabalho
Empresas
Postar vaga Preços Comercial
Jurídico
Termos e Condições Política de privacidade
© 2026 PeakU Inc. All Rights Reserved.
Andres GPT
Recomende algumas ofertas para mim
Preciso de ajuda