I think that next versions of the class could be able to read a standard Python mail.message.Mail instance and compose the the message accordingly as for example with this command:
mail.send_from_message(message) Would be possible to add that feature? Perhaps a simpler way would be to add a send method argument like (no- multipart or something similar) On 21 ene, 11:35, LightDot <light...@gmail.com> wrote: > Good catch, didn't think of that... Didn't work though. :) > > For the sake of completeness, here is the relevant code: > > if form.process().accepted: > response.flash = T('form accepted') > mail.send(to='xxx...@xxxxxx.xxx', > subject='Simply', > message='just some plain ol text', > headers = {'Content-Type' : 'text/plain'} > ) > elif form.errors: > response.flash = T('form has errors') > return dict(form=form) > > and what comes trough now: > > Content-Type: multipart/mixed; > boundary="===============8561316457798710179==" > MIME-Version: 1.0 > From: xxx...@xxxxxx.xxx > To: xxx...@xxxxxx.xxx > Subject: Simple > Date: sat, 21 jan 2012 14:24:25 +0000 > X-Invalid-Content-Type: multipart/mixed; > boundary="===============8561316457798710179==" > Message-ID: <x...@xxx.xxxxxx.xxx> > > --===============8561316457798710179== > Content-Type: multipart/alternative; > boundary="===============5206004524625423259==" > MIME-Version: 1.0 > > --===============5206004524625423259== > Content-Type: text/plain; charset="utf-8" > MIME-Version: 1.0 > Content-Transfer-Encoding: base64 > > anVzdCBzb21lIHBsYWluIG9sIHRleHQ= > > --===============5206004524625423259==-- > > --===============8561316457798710179==--