Thanks Richie,

I've tried removing the encode('GB2312') line, so the code looks like
this:

h = Header(subject, 'GB2312')

However, this line still causes the following error message:

Traceback (most recent call last):
File "/home/web88/html/app/sendmail.py", line 314, in
h = Header(subject, 'GB2312')
File "/usr/lib/python2.2/email/Header.py", line 188, in __init__
self.append(s, charset, errors)
File "/usr/lib/python2.2/email/Header.py", line 272, in append
ustr = unicode(s, incodec, errors)
LookupError: unknown encoding: gb2312 )

Any ideas?

-- 
http://mail.python.org/mailman/listinfo/python-list

Reply via email to