MoinMoin - email helper functions
Decode obfuscated email address to standard email address
Decode a spam-safe email address in address by applying the following rules:
- Known all-uppercase words and their translation:
- “DOT” -> “.” “AT” -> “@” “DASH” -> “-“
Any unknown all-uppercase words or an uppercase letter simply get stripped. Use that to make it even harder for spam bots!
Blanks (spaces) simply get stripped.
Parameters: address – obfuscated email address string Return type: string Returns: decoded email address
Encode email address to enable non ascii names
E.g. ‘“Jürgen Hermann” <firstname.lastname@example.org>’. According to the RFC, the name part should be encoded, the address should not.
- address (unicode) – email address, possibly using ‘“name” <address>’ format
- charset (email.Charset.Charset instance) – specifying both the charset and the encoding, e.g quoted printable or base64.
Encodes a standard email address to an obfuscated address
- email_address –
mail address to encode. Known characters and their all-uppercase words translation:
"." -> " DOT " "@" -> " AT " "-" -> " DASH "
- obfuscation_text – optional text to obfuscate the email. All characters in the string must be alphabetic and they will be added in uppercase.
- email_address –
sendmail(subject, text, to=None, cc=None, bcc=None, mail_from=None, html=None)¶
Create and send a text/plain message
Return a tuple of success or error indicator and message.
- subject (unicode) – subject of email
- text (unicode) – email body text
- to (list) – recipients
- cc (list) – recipients (CC)
- bcc (list) – recipients (BCC)
- mail_from (unicode) – override default mail_from
- html (unicode) – html email body text
(is_ok, Description of error or OK message)
MoinMoin - Package Initialization
Subpackage containing e-mail support code.