gmailSaslXoauth2 function
Send through gmail with SASL XOAUTH2 authentication.
This requires an accessToken
for userEmail
with the OAuth2 scope:
https://mail.google.com/
.
Implementation
SmtpServer gmailSaslXoauth2(
String userEmail,
String accessToken,
) =>
SmtpServer(
'smtp.gmail.com',
xoauth2Token: _formatXoauth2Token(userEmail, accessToken),
ssl: true,
port: 465,
);