Returning "result" will not break the compatibility?

if someone has made a system which test  "if mail.send(...): ...." or "if
mail.send(...) == True"   ?

2010/11/22 mdipierro <[email protected]>

> Perhaps this:
>
>                result = server.sendmail(self.settings.sender, to,
> payload.as_string())
>                server.quit()
>        except Exception, e:
>            logger.warn('Mail.send failure:%s' % e)
>            self.result = result
>            self.error = e
>            return False
>        self.result = result
>        self.error = None
>        return True
>
> should be
>
>                result = server.sendmail(self.settings.sender, to,
> payload.as_string())
>                server.quit()
>        except Exception, e:
>            logger.warn('Mail.send failure:%s' % e)
>            self.result = result
>            self.error = e
>            return False
>        self.result = result
>        self.error = None
>        return result
>
> Any objection to change it?
>
> On Nov 22, 8:12 am, Bruno Rocha <[email protected]> wrote:
> > Is there a result dictionary in Mail class, method send.
> >
> > http://code.google.com/p/web2py/source/browse/gluon/tools.py#549
> >
> > But I dont know it this got message_id from the SMTP server.
> >
> > 2010/11/22 selecta <[email protected]>
> >
> >
> >
> > > If you look into the header of an email message, you will find a key
> > > called message-id, the value looks something like
> > > <[email protected]> this message id is for
> > > example used when you reply to a mail
> > > then the header contains something like In-Reply-To:
> > > <[email protected]>
> >
> > > I am currently working on a mailing-list plugin and for that I need
> > > the message ids of the outgoing mails to see if incoming mails are
> > > answers to resend incoming mails. This way I can build up a nice
> > > treaded/tree view for all email communication.
> >
> > > Btw wouldn't it be nice to have a completely web2py based platform for
> > > all web2py communication ;-)
> >
> > > On Nov 22, 2:39 pm, mdipierro <[email protected]> wrote:
> > > > What is the "message-id"?
> >
> > > > On Nov 22, 6:02 am, selecta <[email protected]> wrote:
> >
> > > > > I was wondering if there is a proper way to get the message-id of a
> > > > > send mail.
> > > > > mail.send just returns true or false
> > > > > So far I tried to send the mail also to my own account and guess
> from
> > > > > comparing header and body that this is the mail that I send out.
> This
> > > > > however gives me quite some headaches with all the different
> character
> > > > > encodings ...
> >
> > > > > Is there a better way to get the message-id of a send mail?
> >
> > --
> >
> > Bruno Rochahttp://about.me/rochacbruno/bio
>



-- 

Bruno Rocha
http://about.me/rochacbruno/bio

Reply via email to