1 # Copyright (C) 2012 W. Trevor King <wking@tremily.us>
3 # This file is part of pgp-mime.
5 # pgp-mime is free software: you can redistribute it and/or modify it under the
6 # terms of the GNU General Public License as published by the Free Software
7 # Foundation, either version 3 of the License, or (at your option) any later
10 # pgp-mime is distributed in the hope that it will be useful, but WITHOUT ANY
11 # WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS FOR
12 # A PARTICULAR PURPOSE. See the GNU General Public License for more details.
14 # You should have received a copy of the GNU General Public License along with
15 # pgp-mime. If not, see <http://www.gnu.org/licenses/>.
17 """Python module and tools for constructing and sending pgp/mime email.
19 Uses ``pyassuan`` to connect to ``gpgme-tool`` for the cryptography.
22 import logging as _logging
28 LOG = _logging.getLogger('pgp-mime')
29 LOG.setLevel(_logging.ERROR)
30 LOG.addHandler(_logging.StreamHandler())
33 from .crypt import get_client_params
34 from .pgp import sign, encrypt, sign_and_encrypt, decrypt, verify
36 header_from_text, guess_encoding, encodedMIMEText, strip_bcc, append_text,
37 attach_root, getaddresses, email_sources, email_targets)
38 from .smtp import get_smtp_params, get_smtp, mail