Level 1 - Foundation Training - revamped - Lesson 11 - Workflows - file download - SendMailMessage.xaml gives an error

Hi

I downloaded the Level 1 - Foundation Training - revamped - Lesson 11 - Workflows - file download and tweeked the SendMailMessage.xaml. In the Send SMTP Mail Message activity I changed the “To”-field to my work-email address, and in the Properties > Logon I changed “Email” to my private-email-address (a gmail address) and I changed “Password” to the corresponding password.

When running the script I get this error:
image

And in my Gmail inbox I get a critical security alert email.

What can I do to make the example work?

But Google! I really want to authorize this server to access my email!

Email notification from Google about the blocked sign-in attempt.

It turns out that in order for Google to authorize a third party server to access your account via SMTP now, you have to enable “Less Secure Apps” on your Gmail account. You can read a full explanation of the risks of that here, but essentially, any apps that aren’t using security protocols that Google deems mandatory will be blocked unless you enable the ability for less secure apps to access your Gmail account.

Now while I won’t recommend you allow less secure apps to access your Gmail account, it’s currently the only way I know of to allow WordPress to use your Gmail account to send outgoing mail. If you do choose to enable less secure app access, you can do that on this page in your Gmail account. There’s a screenshot below of where you’ll find the setting. Please don’t enable this access unless you fully understand what’s going on, and what the possible ramifications are.

Ref: https://www.wpsitecare.com/gmail-smtp-settings/

2 Likes

WP-Win offers a range of WordPress website maintenance plans to maintain your site. Cover your WordPress site with our wordpress maintenance packages.