We're building a service that sends emails for Office365 users using EWS (or REST API) with OAuth2. For some reason when testing email sending using our _.onmicrosoft.com accounts we get the following errors:
Your message wasn't delivered because the recipient's email provider rejected it. Remote Server returned '550 5.7.501 Access denied, spam abuse detected.
Noticed that DKIM signature is missing when emails are sent via EWS/API.
Authentication-Results: target-domain; dkim=none (message not signed)
header.d=none;target-domain; dmarc=none action=none
header.from=sender-domain.onmicrosoft.com;
Received: from DM3PR1201MB1039.namprd12.prod.outlook.com (10.164.197.149) by DM3PR1201MB1039.namprd12.prod.outlook.com (10.164.197.149) with Microsoft SMTP Server (TLS) id 15.1.534.14; Wed, 6 Jul 2016 16:42:03 +0000
Received: from DM3PR1201MB1039.namprd12.prod.outlook.com ([10.164.197.149]) by DM3PR1201MB1039.namprd12.prod.outlook.com ([10.164.197.149]) with mapi id 15.01.0534.020; Wed, 6 Jul 2016 16:42:03 +0000
Emails are delivered just fine if we send them manually from our Office365 UI.
Any idea why this may be happening?