how to send a "Multiline" mail with smtplib?

Evan xdicry at gmail.com
Mon Jun 23 10:50:30 CEST 2008


On Jun 19, 6:12 pm, Lie <Lie.1... at gmail.com> wrote:
> On Jun 19, 4:02 pm, Justin Ezequiel <justin.mailingli... at gmail.com>
> wrote:
>
> > perhaps change html
>
> > body=MIMEText('hello,\r\n
> > ok',_subtype='html',_charset='windows-1255')
>
> > to plain
>
> > body=MIMEText('hello,\r\n
> > ok',_subtype='plain',_charset='windows-1255')
>
> If that was the case, and you needed a line break in html-mode, use
> <br /> or <p> tags.


Thanks all,
and yes, if I use "plain" or use HTML tag "<br>", it worked:
(1) HTML:
I use tag "<br />" and "&nbsp;", and when I reply that mail, I will
see "<br>" tag in mail content, it is not a good option.


thanks,
Evan



More information about the Python-list mailing list