I am a newbie to Microsoft API and was trying the Microsoft graph API Outlook for sending mail to different emails in nodejs. I tried the below example but I am able to send mail as spam. Github sample:https://github.com/microsoftgraph/nodejs-connect-sample. Why mail is sent to Gmail spam?
Please help. Thank u
This is not related to Graph. It's not even related to Outlook. Judging by the format of the e-mail address I'm seeing you used to send an e-mail through Microsoft Graph, you've created your Microsoft account using a different e-mail address than what Microsoft provides you by default (ex: [email protected]
). Your GMail address perhaps? When you do that, Microsoft creates an internal mapping from an address that they create to the e-mail address that you provide. I'm referring to [email protected]
that you see in your spam marked email as the sender.
Because the formatting of this looks super weird and the spam detectors are using Machine Learning for all of the major e-mail providers, GMail's trained (and trained and trained over years) spam filters are thinking that the e-mail address looks like a spam one.
Easiest solution would be to create a new Microsoft account - using a proper mail address from outlook.com - rather than giving them an already existing (ex: gmail) one.