SMTP

Client

class aioaccount.SmtpClient(host: str, port: int, email: str, **kwargs)
confirm_layout(url: str, html: Optional[aioaccount._smtp.SmtpHtml] = None, raw: Optional[str] = None, subject: Optional[str] = None) aioaccount._smtp.SmtpClient

Used for confirm email layout.

Parameters
  • url (str) –

    Url user follows for validation If it doesn’t contain ‘{validation_code}’ the validation code will be append to the end of the url

    e.g. https://example.com/validate?code={validation_code}

  • html (SmtpHtml, optional) – by default None

  • raw (str, optional) – Should contain ‘link’ otherwise appended at the end of the string, by default None

  • subject (str, optional) – Used to set email subject for confirmations. by default None

Returns

Return type

SmtpClient

reset_layout(url: str, html: Optional[aioaccount._smtp.SmtpHtml] = None, raw: Optional[str] = None, subject: Optional[str] = None) aioaccount._smtp.SmtpClient

Used for reset email layout.

Parameters
  • url (str) –

    Url user follows for validation If it doesn’t contain ‘{validation_code}’ the validation code will be append to the end of the url

    e.g. https://example.com/validate?code={validation_code}

  • html (SmtpHtml, optional) – by default None

  • raw (str, optional) – Should contain ‘link’ otherwise appended at the end of the string, by default None

  • subject (str, optional) – Used to set email subject for resets. by default None

Returns

Return type

SmtpClient

HTML

class aioaccount.SmtpHtml(path: str, file: str, url_key: str = 'url')