An Email Message To Be Sent Via an Email Sender.
More...
|
def | read_template (filename) |
| Returns a Template object comprising the contents of the file specified by filename. More...
|
|
def | get_contacts (filename) |
| Return two lists names, emails containing names and email addresses read from a file specified by filename. More...
|
|
|
| message |
| The SMTP Message object to be sent by the email sender. More...
|
|
An Email Message To Be Sent Via an Email Sender.
◆ __init__()
def EmailSender.EMail.__init__ |
( |
|
self, |
|
|
|
from_address, |
|
|
|
to_address |
|
) |
| |
The Constructor.
- Parameters
-
from_address | {string} The email address to send the email from |
to_address | {string} The email address to send the email to |
◆ get_contacts()
def EmailSender.EMail.get_contacts |
( |
|
filename | ) |
|
|
static |
Return two lists names, emails containing names and email addresses read from a file specified by filename.
- Parameters
-
filename | {string} Path to the tempalte file to load |
- Returns
- (names, emails) Tuple of contact names and corresponding contact emails
◆ get_from()
def EmailSender.EMail.get_from |
( |
|
self | ) |
|
◆ get_subject()
def EmailSender.EMail.get_subject |
( |
|
self | ) |
|
◆ get_to()
def EmailSender.EMail.get_to |
( |
|
self | ) |
|
◆ read_template()
def EmailSender.EMail.read_template |
( |
|
filename | ) |
|
|
static |
Returns a Template object comprising the contents of the file specified by filename.
- Parameters
-
filename | {string} Path to the tempalte file to load |
- Returns
- Template The template object to be used to construct emails
◆ set_body()
def EmailSender.EMail.set_body |
( |
|
self, |
|
|
|
text |
|
) |
| |
Set the body of the email to some text.
- Parameters
-
text | {string} Text to set the email body to |
◆ set_body_html()
def EmailSender.EMail.set_body_html |
( |
|
self, |
|
|
|
html |
|
) |
| |
Set the body of the emial to some html and package it up correctly.
- Parameters
-
html | {string} String of html code to be packaged and sent as the body |
◆ set_from()
def EmailSender.EMail.set_from |
( |
|
self, |
|
|
|
address |
|
) |
| |
Set the from address.
- Parameters
-
address | {string} From address |
◆ set_subject()
def EmailSender.EMail.set_subject |
( |
|
self, |
|
|
|
subject |
|
) |
| |
Set the subject of the email.
- Parameters
-
subject | {string} The Subject |
◆ set_to()
def EmailSender.EMail.set_to |
( |
|
self, |
|
|
|
address |
|
) |
| |
Set the to address.
- Parameters
-
address | {string} To Address |
◆ message
EmailSender.EMail.message |
The SMTP Message object to be sent by the email sender.
The documentation for this class was generated from the following file: