Commit Graph

70 Commits

Author SHA1 Message Date
Matt Mackall
642f4d7151 move encoding bits from util to encoding
In addition to cleaning up util, this gets rid of some circular dependencies.
2009-04-03 14:51:48 -05:00
Christian Ebert
e8342a5b19 mail: correct typo in variable name 2008-10-21 10:29:57 +02:00
Christian Ebert
febc2f8f3c mail: mime-encode patches that are utf-8
utf-8 can be safely detected without making assumptions on the
encoding/locale used by the recipient.

Content-Transfer-Encoding for utf-8 patches is base64 (default of
python's email module).
2008-10-20 17:40:29 +02:00
Christian Ebert
1d544eec15 mail: add methods to handle non-ascii chars
- headencode, addressencode: encode headers
- mimeencode: encode message parts not containing patches
- new email config "charsets"

Users may configure email.charsets as a list of charsets they
consider appropriate for the recipients of their outgoing mails.

Conversion is tried in this order:
1. us-ascii
   (ascii, us-ascii are removed from email.charsets if present)
2. email.charsets (if present) in order given
3. util._fallbackencoding, util._encoding, utf-8
   if not already in email.charsets
2008-07-12 19:11:59 +01:00
Dirkjan Ochtman
2f149e4634 replace usage of os.popen() with util.popen()
To make this possible, I added a mode parameter to both implementations of
util.popen(), defaulting to 'r' (as it does in the Python stdlib).
2008-04-14 14:34:38 +02:00
Matt Mackall
a849fab9e4 templater: move email function to util 2008-01-31 14:44:19 -06:00
Matt Mackall
9b6f4fc222 patchbomb: undo backout and fix bugs in the earlier patch 2008-01-31 14:44:19 -06:00
Bryan O'Sullivan
0b03cc2a5a Backed out changeset 6ac32dcf78a6 2008-01-25 16:04:32 -08:00
Matt Mackall
7a268371b0 patchbomb: prompt only once for SMTP password
- simplify mail._sendmail to be a function rather than a class
- simplify connect to return a function rather than a class
- move exception handling from mail.sendmail to mail.connect
- use a single connection for all messages in patchbomb
2008-01-17 13:51:59 -06:00
Arun Thomas
2948ac84bf Patchbomb: Prompt password when using SMTP/TLS and no password in .hgrc.
If .hgrc specifies SMTP/TLS and a username without specifying a password,
prompt for a password.
2007-12-19 11:56:19 -05:00
Christian Ebert
61e3b4ba58 Catch smtp exceptions 2007-09-07 16:48:42 +02:00
Bryan O'Sullivan
37507376a2 patchbomb: Validate email config before we start prompting for info. 2007-05-27 14:40:14 -07:00
Alexis S. L. Carvalho
d4de823a64 merge with crew-stable 2007-02-16 05:27:37 -02:00
Alexis S. L. Carvalho
90f1713401 mail.py: don't try to use TLS if python doesn't have SSL support
This should hide the traceback from issue501.
2007-02-16 04:54:47 -02:00
Benoit Boissinot
cd66ae056f remove various unused import 2006-12-25 13:37:00 +01:00
Matt Mackall
296d6a7cb8 Simplify i18n imports 2006-12-14 20:25:19 -06:00
Matt Mackall
f17a4e1934 Replace demandload with new demandimport 2006-12-13 13:27:09 -06:00
Alexis S. L. Carvalho
a717a94148 fix typo in mail.py 2006-08-20 02:21:59 -03:00
Brendan Cully
a42c271a0d mail: fix connect 2006-08-16 11:03:32 -07:00
Matt Mackall
f849bdf704 Move ui.sendmail to mail.connect/sendmail 2006-08-15 14:06:50 -05:00