On May15, 10:39am, Massimo Di Pierro <mdipie...@cs.depaul.edu> wrote:
> Thanks to szimszon we have PGP in Mail (trunk only)
>
> mail.send(
>         self,
>         to,
>         subject='None',
>         message='None',
>         attachments=None,
>         cc=None,
>         bcc=None,
>         reply_to=None,
>         encoding='utf-8',
>         cipher_type=None,
>         sign=True,
>         sign_passphrase=None,
>         encrypt=True,
>         )
>
> Please check it. Should
>         cipher_type=None,
>         sign=True,
>         sign_passphrase=None,
>         encrypt=True,
> be set at the send level or at the mail.settings level? Do people tend  
> to use different passphrases for different emails or the same one?


Nice to know that.  And I agree those cipher options be set at send()
level, because a website might want to send out automatic email FROM
different account, say, most normal notice from
"donotre...@mydomain.com", but some interview confirmation from
"h...@mydomain.com", etc.?

But it doesn't harm if mail.settings contains all those cipher
options, and then inside send() we code like this:

  def send(...,
        cipher_type=None,
        sign=True,
        sign_passphrase=None,
        encrypt=True,
        ):
    if not cipher_type:
        cipher_type = self.settings.cipher_type
    ...

Reply via email to