the gluon Mail class supports customized headers: In .send(), the headers kwarg is a "...dictionary of headers to refine the headers just before sending mail, e.g. ..."
Have you tried to set the mail header to text/plain? Is the email still being sent as multipart? Maybe there should be a Mail.send() mail kwarg to pass an email.message.Mail instance. On 21 ene, 07:12, LightDot <light...@gmail.com> wrote: > The code itself works, mails get properly sent. The problem is on the other > side - I need to send mails to a pretty aged interface that parses them and > over which I have no control. It doesn't accept and parse anything that > isn't plain text, so mails with Content-Type: multipart/mixed and encoded > contents get rejected. > > I solved the problem temporarily by using smtplib directly. As soon as I > manually send messages with body simply consisting of: > > /n Some simple text here. /n/n > > everything works fine, they get parsed properly on the other end. > > Is there is any way to trick web2py's Mail class into sending emails with > absolutely no body encoding? I looked at the gluon/tools.py in the mean > time and it seems that what I'm looking for is impossible to achieve trough > web2py's Mail class. Unless I'm mistaken... > > Anyway, Thanks for looking into this!