hi Massimo, sending email directly with the mail API isn't the problem. The problem (as explained in the initial post) is for emails sent by auth. Auth requires strings for the messages, which means mail will always send as plain text.
Perhaps mail should expose a flag for setting the format. Passing a tuple to send as HTML feels awkward anyway, and doesn't integrate with auth. Richard On Jul 5, 6:24 am, mdipierro <mdipie...@cs.depaul.edu> wrote: > The line you changed into is already there. You just have to pass > > mail.sent(....,message=(None,html)) > > Did you try it? > > On 4 Lug, 10:38, Richard <richar...@gmail.com> wrote: > > > Changed: > > attachment.attach(MIMEText.MIMEText(text,_charset='utf-8')) -> > > attachment.attach(MIMEText.MIMEText(html, 'html',_charset='utf-8')) > > > so now it always sends as HTML, which is what I want. > > > On Jul 4, 11:55 pm, mdipierro <mdipie...@cs.depaul.edu> wrote: > > > > what changes did you make? > > > > On 4 Lug, 07:52, Richard <richar...@gmail.com> wrote: > > > > > I needed my auth generated emails to send as HTML format instead of > > > > the default text. > > > > > If I understand correctly you have to pass a (text, html) tuple to > > > > activate HTML format, but auth requires strings for > > > > auth.messages.verify_email, etc. > > > > > To activate HTML format I have temporarily modified the default > > > > headers of Mail in gluon/tools.py. > > > > Is there a proper way to send HTML emails with auth? > > > > > Richard