Forum Discussion
Seyoon_Park
Sep 28, 2020Copper Contributor
I have a question about using SMTP after setting up MFA.
Hi.
What I am trying to do is set up the MFA and send email using the SMTP function.
I installed the Authenticator app and completed the MFA setup for my personal account. I didn't set anything else. In this case, I can send an email using SMTP.
The problem I thought, because of setting up MFA, I thought I wouldn't be able to use SMTP. Or thought additional certification would be necessary. But there was no such problem.
Is there no problem because I tested it with my personal account?
Or is the use of MFA and SMTP irrelevant?
Here is SMTP test code:
You cannot just reuse old code for this, you need to leverage OAuth: https://techcommunity.microsoft.com/t5/exchange-team-blog/announcing-oauth-2-0-support-for-imap-and-smtp-auth-protocols-in/ba-p/1330432
- Seyoon_ParkCopper Contributor
Hi VasilMichev
I read the article you linked. However, it is about SMTP and Exchange Online. All l'm trying to do is send an email using SMTP and end it. Is this related to Exchange Online?
I don't think it's relevant.
- ChristianBergstromSilver ContributorLove jumping into these ”protocol questions” as I know you will reply and enlighten me 🙂 But shouldn’t he be prompted without leverage OAuth? I’m certain I’ve read about it somewhere. Now I didn’t really look at the code to be honest but I suppose it wasn’t about Direct send then (on mobile).
- ChristianBergstromSilver Contributor
Seyoon_Park Hi, as far as I know you should be prompted for an app password when enabling MFA using smtp. Not sure what you're trying to do but sounds like something similar to this? https://docs.microsoft.com/en-us/exchange/mail-flow-best-practices/how-to-set-up-a-multifunction-device-or-application-to-send-email-using-microsoft-365-or-office-365
- Seyoon_ParkCopper Contributor
As you said, when I complete the MFA setup, a pop-up will pop up asking me to enter my app password when I log in. However, when sending an email using SMTP in code, no pop-up occurs.
I have read the article you linked, but this is also related to exchange online. What I don't understand now is what SMTP and Exchange Online have to do with it.
Can I know what Exchange Online and SMTP have to do with it?
- ChristianBergstromSilver Contributor
Seyoon_Park Hello, well according to your attached info you're using SMTP with the setting smtp.office365.com (online) to send, so would you mind elaborate what you're trying to accomplish and how your environment is set up.