~bzr-pqm/bzr/bzr.dev

« back to all changes in this revision

Viewing changes to bzrlib/mail_client.py

  • Committer: Jelmer Vernooij
  • Date: 2012-04-16 11:08:11 UTC
  • mfrom: (6521 +trunk)
  • mto: This revision was merged to the branch mainline in revision 6522.
  • Revision ID: jelmer@samba.org-20120416110811-0y996ihqy9o2bb1t
Merge bzr.dev.

Show diffs side-by-side

added added

removed removed

Lines of Context:
24
24
 
25
25
import bzrlib
26
26
from bzrlib import (
 
27
    config as _mod_config,
27
28
    email_message,
28
29
    errors,
29
30
    msgeditor,
111
112
        if body == '':
112
113
            raise errors.NoMessageSupplied()
113
114
        email_message.EmailMessage.send(self.config,
114
 
                                        self.config.username(),
 
115
                                        self.config.get('email'),
115
116
                                        to,
116
117
                                        subject,
117
118
                                        body,
378
379
                 extension, body=None, from_=None):
379
380
        """See ExternalMailClient._compose"""
380
381
        if from_ is None:
381
 
            from_ = self.config.get_user_option('email')
 
382
            from_ = self.config.get('email')
382
383
        super(Claws, self)._compose(prompt, to, subject, attach_path,
383
384
                                    mime_subtype, extension, body, from_)
384
385
 
617
618
        """See MailClient.compose"""
618
619
        try:
619
620
            return self._mail_client().compose(prompt, to, subject,
620
 
                                               attachment, mimie_subtype,
 
621
                                               attachment, mime_subtype,
621
622
                                               extension, basename, body)
622
623
        except errors.MailClientNotFound:
623
624
            return Editor(self.config).compose(prompt, to, subject,
624
 
                          attachment, mimie_subtype, extension, body)
 
625
                          attachment, mime_subtype, extension, body)
625
626
 
626
627
    def compose_merge_request(self, to, subject, directive, basename=None,
627
628
                              body=None):
636
637
                              help=DefaultMail.__doc__)
637
638
mail_client_registry.default_key = 'default'
638
639
 
639
 
 
 
640
opt_mail_client = _mod_config.RegistryOption('mail_client',
 
641
        mail_client_registry, help='E-mail client to use.', invalid='error')