Skip to main content

smtp_xoauth2

Function smtp_xoauth2 

Source
pub(crate) async fn smtp_xoauth2<T>(
    client: &mut SmtpClient<T>,
    user: &str,
    token: &str,
) -> Result<Result<(), String>, Error>
where T: AsyncRead + AsyncWrite + Unpin,
Expand description

AUTH XOAUTH2 on an SMTP connection already encrypted and greeted: Ok when accepted, the refusal’s words otherwise (after the empty line its challenge asks). mail-send’s own XOAUTH2 answers that challenge with the token again, not with the empty line Google’s page asks: done here instead.