Menu

#19 qMail's send is not functional

closed
nobody
QPS (15)
5
2004-10-12
2004-10-11
McV
No

>>> import qps
>>> qps.__version__
'2.6a2'
>>> from qps import qMail as mail
>>> sender = mail.SMTPSender(host = '')
>>> composer = mail.Composer(charset = 'windows-1251')
>>> status = mail.send("", "", "test subj", "test
body", composer, sender)
Traceback (most recent call last):
File "<stdin>", line 1, in ?
File "C:\bin\python\Lib\site-packages\qps\qMail.py",
line 103, in send
message = composer.compose(body, From=mfrom,
To=mto, Subject=subject)
File "C:\bin\python\Lib\site-packages\qps\qMail.py",
line 79, in compose
message = self.messageClass(body,
_charset=self.charset) #body, _charse
t=self.charset
TypeError: __init__() takes exactly 1 non-keyword
argument (2 given)

*** Patch ***
qMail.py:
- message = self.messageClass(body, _charset=self.charset)
+ message = self.messageClass()
+ message.set_payload(body, self.charset)

Discussion

  • Alexey Melchakov

    Logged In: YES
    user_id=621821

    Bug was fixed in cvs

     
  • Alexey Melchakov

    • status: open --> closed
     

Log in to post a comment.