I am getting the below error while trying to use Django sendmail using Outlook SMTP
SMTPDataError at /distribute/ (554, '5.2.0 STOREDRV.Submission.Exception:SendAsDeniedException.MapiExceptionSendAsDenied; Failed to process message due to a permanent exception with message Cannot submit message. 16.55847:0C0F0000, 17.43559:0000000094000000000000000000000000000000, 20.52176:140F0E852800101064010000, 20.50032:140F0E858817101069010000, 0.35180:0A00E781, 255.23226:6E010000, 255.27962:0A000000, 255.27962:0E000000, 255.31418:0A000000, 16.55847:86000000, 17.43559:0000000068010000000000000000000000000000, 20.52176:140F0E85280010100A00F736, 20.50032:140F0E85881710100A00F836, 0.35180:8C010000, 255.23226:40000730, 255.27962:0A000000, 255.27962:32000000, 255.17082:DC040000, 0.27745:0A001780, 4.21921:DC040000, 255.27962:FA000000, 255.1494:A4010000, 0.37692:05000780, 0.37948:00000000, 5.33852:00000000534D545000000780, 4.56248:DC040000, 7.40748:010000000000010B05000780, 7.57132:000000000000000005000780, 1.63016:32000000, 4.39640:DC040000, 8.45434:824D851FB0676A47B811311E3F17990F00000000, 5.10786:0000000031352E32302E313239342E3032343A5455345052383430314D42303436323A34333038323065332D393530612D346435362D383863332D3037363837616130336664330005000780, 255.1750:0A008984, 255.31418:41010000, 0.22753:0A001986, 255.21817:DC040000, 4.60547:DC040000, 0.21966:4B010000, 4.30158:DC040000 [Hostname=TU4PR8401MB0462.NAMPRD84.PROD.OUTLOOK.COM]')
My settings are as below:
EMAIL_BACKEND = 'django.core.mail.backends.smtp.EmailBackend'
EMAIL_USE_TLS = True
EMAIL_HOST = 'smtp-mail.outlook.com'
EMAIL_HOST_USER = '********'
EMAIL_HOST_PASSWORD = '********'
EMAIL_PORT = 587
Please help