platypush.plugins.mail

class platypush.plugins.mail.Mail(id: int, date: datetime.datetime, size: int, from_: Optional[Union[Dict[str, str], List[str]]] = None, to: Optional[Union[Dict[str, str], List[str]]] = None, cc: Optional[Union[Dict[str, str], List[str]]] = None, bcc: Optional[Union[Dict[str, str], List[str]]] = None, subject: str = '', payload: Optional[Any] = None, **kwargs)[source]
__init__(id: int, date: datetime.datetime, size: int, from_: Optional[Union[Dict[str, str], List[str]]] = None, to: Optional[Union[Dict[str, str], List[str]]] = None, cc: Optional[Union[Dict[str, str], List[str]]] = None, bcc: Optional[Union[Dict[str, str], List[str]]] = None, subject: str = '', payload: Optional[Any] = None, **kwargs)[source]

Initialize self. See help(type(self)) for accurate signature.

class platypush.plugins.mail.MailInPlugin(**kwargs)[source]

Base class for mail in plugins.

class platypush.plugins.mail.MailOutPlugin(**kwargs)[source]

Base class for mail out plugins.

send(to: Union[str, List[str]], from_: Optional[str] = None, cc: Optional[Union[str, List[str]]] = None, bcc: Optional[Union[str, List[str]]] = None, subject: str = '', body: str = '', body_type: str = 'plain', attachments: Optional[List[str]] = None, headers: Optional[Dict[str, str]] = None, **connect_args)[source]

Send an email through the specified SMTP sender.

Parameters
  • to – Receiver(s), as comma-separated strings or list.

  • from – Sender email address (from is also supported outside of Python contexts).

  • cc – Carbon-copy addresses, as comma-separated strings or list

  • bcc – Blind carbon-copy addresses, as comma-separated strings or list

  • subject – Mail subject.

  • body – Mail body.

  • body_type – Mail body type, as a subtype of text/ (e.g. html) (default: plain).

  • attachments – List of attachment files to send.

  • headers – Key-value map of headers to be added.

  • connect_args – Parameters for .connect(), if you want to override the default server configuration.

class platypush.plugins.mail.MailPlugin(**kwargs)[source]

Base class for mail plugins.

__init__(**kwargs)[source]

Initialize self. See help(type(self)) for accurate signature.

class platypush.plugins.mail.ServerInfo(server: str, port: int, username: Optional[str], password: Optional[str], ssl: bool, keyfile: Optional[str], certfile: Optional[str], access_token: Optional[str], oauth_mechanism: Optional[str], oauth_vendor: Optional[str], timeout: Optional[int])[source]
__init__(server: str, port: int, username: Optional[str], password: Optional[str], ssl: bool, keyfile: Optional[str], certfile: Optional[str], access_token: Optional[str], oauth_mechanism: Optional[str], oauth_vendor: Optional[str], timeout: Optional[int])None

Initialize self. See help(type(self)) for accurate signature.