platypush/plugins/mail/__init__.py
def send(self, 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):
        """
        Send an email through the specified SMTP sender.

        :param to: Receiver(s), as comma-separated strings or list.
        :param from_: Sender email address (``from`` is also supported outside of Python contexts).
        :param cc: Carbon-copy addresses, as comma-separated strings or list
        :param bcc: Blind carbon-copy addresses, as comma-separated strings or list
        :param subject: Mail subject.
        :param body: Mail body.
        :param body_type: Mail body type, as a subtype of ``text/`` (e.g. ``html``) (default: ``plain``).
        :param attachments: List of attachment files to send.
        :param headers: Key-value map of headers to be added.
        :param connect_args: Parameters for ``.connect()``, if you want to override the default server configuration.
        """
        if not from_ and 'from' in connect_args:
            from_ = connect_args.pop('from')

        msg = self.create_message(to=to, from_=from_, cc=cc, bcc=bcc, subject=subject, body=body, body_type=body_type,
                                  attachments=attachments, headers=headers)

        return self.send_message(msg, **connect_args)

        Send an email through the specified SMTP sender.

        :param to: Receiver(s), as comma-separated strings or list.
        :param from_: Sender email address (``from`` is also supported outside of Python contexts).
        :param cc: Carbon-copy addresses, as comma-separated strings or list
        :param bcc: Blind carbon-copy addresses, as comma-separated strings or list
        :param subject: Mail subject.
        :param body: Mail body.
        :param body_type: Mail body type, as a subtype of ``text/`` (e.g. ``html``) (default: ``plain``).
        :param attachments: List of attachment files to send.
        :param headers: Key-value map of headers to be added.
        :param connect_args: Parameters for ``.connect()``, if you want to override the default server configuration.
        
Send an email through the specified SMTP sender.
Send an email through the specified SMTP sender .
def send(self, 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):
        if not from_ and 'from' in connect_args:
            from_ = connect_args.pop('from')
        msg = self.create_message(to=to, from_=from_, cc=cc, bcc=bcc, subject=subject, body=body, body_type=body_type,
                                  attachments=attachments, headers=headers)
        return self.send_message(msg, **connect_args)
def send ( self , 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 ) : if not from_ and 'from' in connect_args : from_ = connect_args . pop ( 'from' ) msg = self . create_message ( to = to , from_ = from_ , cc = cc , bcc = bcc , subject = subject , body = body , body_type = body_type , attachments = attachments , headers = headers ) return self . send_message ( msg , ** connect_args )
Send an email through the specified SMTP sender.
Send an email through the specified SMTP sender .
"""
        Send an email through the specified SMTP sender.

        :param to: Receiver(s), as comma-separated strings or list.
        :param from_: Sender email address (``from`` is also supported outside of Python contexts).
        :param cc: Carbon-copy addresses, as comma-separated strings or list
        :param bcc: Blind carbon-copy addresses, as comma-separated strings or list
        :param subject: Mail subject.
        :param body: Mail body.
        :param body_type: Mail body type, as a subtype of ``text/`` (e.g. ``html``) (default: ``plain``).
        :param attachments: List of attachment files to send.
        :param headers: Key-value map of headers to be added.
        :param connect_args: Parameters for ``.connect()``, if you want to override the default server configuration.
        """
self
to
Union[str, List[str]]
Receiver(s), as comma-separated strings or list.
Receiver ( s ) as comma - separated strings or list .
from_
Optional[str]
Sender email address (``from`` is also supported outside of Python contexts).
Sender email address ( ` ` from ` ` is also supported outside of Python contexts ) .
cc
Optional[Union[str, List[str]]]
Carbon-copy addresses, as comma-separated strings or list
Carbon - copy addresses as comma - separated strings or list
bcc
Optional[Union[str, List[str]]]
Blind carbon-copy addresses, as comma-separated strings or list
Blind carbon - copy addresses as comma - separated strings or list
subject
str
None
body
str
None
body_type
str
Mail body type, as a subtype of ``text/``  (default: ``plain``).
Mail body type as a subtype of ` ` text / ` ` ( default : ` ` plain ` ` ) .
attachments
Optional[List[str]]
List of attachment files to send.
List of attachment files to send .
headers
Optional[Dict[str, str]]
Key-value map of headers to be added.
Key - value map of headers to be added .
connect_args
Parameters for ``.connect()``, if you want to override the default server configuration.
Parameters for ` ` . connect () ` ` if you want to override the default server configuration .