(self, sender, options=())
return self.getreply()
SMTP 'mail' command -- begins mail xfer session.

        This method may raise the following exceptions:

         SMTPNotSupportedError  The options parameter includes 'SMTPUTF8'
                                but the SMTPUTF8 extension is not supported by
                                the server.
SMTP 'mail' command -- begins mail xfer session.
SMTP mail command -- begins mail xfer session .
def mail(self, sender, options=()):
        """SMTP 'mail' command -- begins mail xfer session.

        This method may raise the following exceptions:

         SMTPNotSupportedError  The options parameter includes 'SMTPUTF8'
                                but the SMTPUTF8 extension is not supported by
                                the server.
        """
        optionlist = ''
        if options and self.does_esmtp:
            if any(x.lower()=='smtputf8' for x in options):
                if self.has_extn('smtputf8'):
                    self.command_encoding = 'utf-8'
                else:
                    raise SMTPNotSupportedError(
                        'SMTPUTF8 not supported by server')
            optionlist = ' ' + ' '.join(options)
        self.putcmd("mail", "FROM:%s%s" % (quoteaddr(sender), optionlist))
        return self.getreply()
def mail ( self , sender , options = ( ) ) : optionlist = '' if options and self . does_esmtp : if any ( x . lower ( ) == 'smtputf8' for x in options ) : if self . has_extn ( 'smtputf8' ) : self . command_encoding = 'utf-8' else : raise SMTPNotSupportedError ( 'SMTPUTF8 not supported by server' ) optionlist = ' ' + ' ' . join ( options ) self . putcmd ( "mail" , "FROM:%s%s" % ( quoteaddr ( sender ) , optionlist ) ) return self . getreply ( )