Empresas
Empleos
  • Sobre nosotros
  • Soluciones
    • Publicación de vacantes
      Publica tu vacante y recibe candidatos calificados en 48h.
    • Evaluación de candidatos
      500+ pruebas técnicas y psicológicas, más anti-fraude.
    • Headhunting
      Búsqueda ejecutiva a la medida de principio a fin.
    • Nómina + EOR
      Dispersión de nómina y EOR en más de 15 países de LATAM.
  • Precios
  • Empleos

0

260
Vistas
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" );
}
about 4 years ago · Santiago Trujillo
1 Respuestas
Responde la pregunta

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.

about 4 years ago · Santiago Trujillo Denunciar
Responde la pregunta
Encuentra empleos remotos

¡Descubre la nueva forma de encontrar empleo!

Top de empleos
Top categorías de empleo
Empresas
Publicar vacante Precios Comercial
Legal
Términos y condiciones Política de privacidad
© 2026 PeakU Inc. All Rights Reserved.
Andres GPT
Recomiéndame algunas ofertas
Necesito ayuda