References¶
Subscriber Classes¶
Subscriber Functions¶
- easynewsletter.Subscriber.user_name(self) str ¶
Returns the name of the subscriber.
- Returns
Name of the subscriber.
- Return type
str
- easynewsletter.Subscriber.domain(self) str ¶
Returns the domain of the subscriber.
- Returns
Name of the domain.
- Return type
str
- easynewsletter.Subscriber.to_tuple(self) tuple ¶
Returns subscriber information as a tuple.
- Returns
Subscriber informations.
- Return type
tuple
Email Classes¶
- class easynewsletter.Email(user_name: str, password: str, host: str, port: int)[source]¶
Email Class based on Red Mail.
- Parameters
user_name (str) – User name to authenticate on the server.
password (str) – User password to authenticate on the server.
host (str) – SMTP host address.
port (int) – Port to the SMTP server.
Message Classes¶
- class easynewsletter.Message(**kwargs)[source]¶
Class that stores message information.
- Parameters
subject (str) – Subject of the email.
sender (str, optional) – Email address the email is sent from.
receivers (list, optional) – Receivers of the email.
cc (list, optional) – Cc or Carbon Copy of the email.
bcc (list, optional) – Blind Carbon Copy of the email.
html (str, optional) – HTML body of the email.
text (str, optional) – Text body of the email.
html_template (str, optional) – Name of the HTML template loaded using Jinja.
text_template (str, optional) – Name of the text template loaded using Jinja.
body_images (dict of bytes, dict of path-like, dict of plt Figure, dict of PIL Image, optional) – HTML images to embed with the html.
body_tables (dict of Pandas dataframes, optional) – HTML tables to embed with the html.
body_params (dict, optional) – Extra Jinja parameters passed to the HTML and text bodies.
attachments (dict, optional) – Attachments of the email. If dict value is string, the attachment content is the string itself.