|
|
|
|
|
|
|
|
decode_header(header)
Decode a MIME-encoded header value
source code
|
|
|
|
Variables
LF = '\n'
CR = '\r'
email_re =
re.compile(r'([\w\d_\.-])+@(([\w\d-])+\.)+([\w\d]{2...
header_re =
re.compile(r'^=\?(?P<charset>[\w\d-]+)\?(?P<code>[...
__package__ = 'trac.tests'
Imports:
socket,
string,
threading,
re,
base64,
quopri
Function Details
Strip the leading & trailing <> from an address. Handy for
getting FROM: addresses.
Return 'address' as undressed (host, fulladdress) tuple.
Handy for use with TO: addresses.
Split a SMTP message into its headers and body.
Returns a (headers, body) tuple
We do not use the email/MIME Python facilities here
as they may accept invalid RFC822 data, or data we do not
want to support nor generate
Variables Details
email_re
- Value:
re.compile(r'([\w\d_\.-])+@(([\w\d-])+\.)+([\w\d]{2,4})+')
header_re
- Value:
re.compile(r'^=\?(?P<charset>[\w\d-]+)\?(?P<code>[qb])\?(?P<value>.*)\\
?=$')