Issue with sending mails to outlook [Update]

Hello there, I’m facing an issue with sending emails to an Outlook email, when I attach a pdf file in the email, but It works fine with Gmail accounts, here is my mailgun config in the

EMAIL_BACKEND = 'django.core.mail.backends.smtp.EmailBackend'
EMAIL_PORT = 587  
EMAIL_HOST_PASSWORD = '9a5c5bb9f50b8d***********'
MAILGUN_API_KEY = 'pubkey-572f48****'

And I’m using the EmailMessage class for this

email = EmailMessage(
            subject='Invoice PDF',

# ok the issue is here, when I attach a file (In my case pdf) the email is not being sent to outlook, but it works fine with gmail
email.attach(f'invoice_{invoice_id}.pdf', buffer.getvalue(), 'application/pdf')

If anyone has faced this issue before and he manages to solve it, please inform us

Thank you

Please be more specific. What exactly is the issue you’re facing?

Do you have any logs available to you from mailgun that can show you the results of the email being sent?

Generally speaking, if you can’t send an email to one specific domain or address, the cause of the issue is on their end, and there’s nothing you can do about it.

Yes, that’s what i thought, Thanks I will double check the configuration and read more about this