sendEmail(smtphost,
fromEmail,
toEmail,
content,
headers=None,
attachments=None,
multipartbody='mixed')
Send an email, optionally with attachments.
-
- Parameters:
smtphost -
hostname of SMTP server to which to connect
(type=str)
fromEmail -
email address to indicate this email is from
(type=str)
toEmail -
email address to which to send this email
(type=str)
content -
The body if this email.
(type=str)
headers -
Dictionary of headers to include in the email
(type=dict)
attachments -
Each 3-tuple should consist of the name of the attachment, the
mime-type of the attachment, and a string that is the attachment
itself.
(type=list of 3-tuples)
multipartbody -
The type of MIME multi-part body. Generally either "mixed"
(as in text and images) or "alternative" (html email
with a fallback to text/plain).
(type=str)
- Returns:
-
The returned Deferred has its callback or errback invoked when the
mail is successfully sent or when an error occurs,
respectively.
(type=Deferred)
|