Skip to main content

smtp_sign_in_with_tokens

Function smtp_sign_in_with_tokens 

Source
async fn smtp_sign_in_with_tokens<T, C, CF, K, KF>(
    login: &str,
    connect: C,
    token: K,
    oauth: OAuth,
) -> Result<SmtpClient<T>, SyncError>
where T: AsyncRead + AsyncWrite + Unpin, C: Fn() -> CF, CF: Future<Output = Result<SmtpClient<T>, SyncError>>, K: Fn(bool) -> KF, KF: Future<Output = Result<String, SyncError>>,
Expand description

AUTH XOAUTH2 on connections connect makes, with the tokens token gives: the one kept first; refused, a fresh one, once; refused again, the access must be given again. A refusal no token changes (Microsoft’s Authenticated SMTP switched off) is said at once (OAuth::smtp_refused).