Introduction
When the comment system of this blog was connected to the email reminder, the SMTP service of Outlook was used, but when using it, it was found that there was no email reminder.
View the log
So I went to Vercel to check the log, as shown below:
The error stack is as follows:
|
|
Source of this article
No one seems to have raised this question in waline’s discussions, maybe I’m the only one using Outlook…
Just look at the first line: Mail send fail: Error: Invalid login: 535 5.7.139 Authentication unsuccessful, basic authentication is disabled.
, which means that Outlook’s SMTP service does not support basic authentication.
I searched and found that Outlook stopped supporting basic authentication for individual users on September 16, 24, and recommended using OAuth2 authentication. See | Microsoft official website
But I didn’t find support for OAuth2 in the waline document.
Write a plug-in yourself?
It seems unnecessary to write one for a comment system, after all, human energy is limited (~~ I won’t say I’m a novice~~)
Solution
So today’s protagonist: sendas.email
I will use the project deployed by the author here, and I won’t redeploy it again. If you want to deploy it yourself, you can fork the author’s project first, and then deploy it yourself. The deployment method is as shown below:
Start solving
Enter sendas.email, then scroll down to the bottom and click Sign in with Microsoft
When logging in, Microsoft will prompt you whether to allow third-party applications to access your account. Click Accept.
After authorization, the Microsoft account team will send an email reminder:
At this time, return to sendas.email, the website automatically redirects to the configuration page, the page is as shown below:
Modify environment variables
Next, return to the deployment of vercel and replace the previous password with the new password.
Please note that if you used SMTP_SERVICE
before, you need to delete it now and add SMTP_HOST
and SMTP_PORT
.
Complete the environment variable configuration of vercel, as shown below:
Restart the project, and then you can send emails normally.
Appendix
Reference
- waline discussions | Github
- sendas.email | This time’s protagonist (this target)
- Gmail-to-outlook-proxy | Github
- Gmail Help | Google Mail Community
- Update Policy | Microsoft Official website
- Wrong Microsoft credentials | Microsoft
Copyright information
This article was originally published on CaiHongTu Blog, following the CC BY-NC-SA 4.0 agreement, please keep the original source when copying.