+MailHost object provide a way to send email from Zope code in DTML or +Python Scripts. SMTP host is the name of the mail server machine. +SMTP port is the port on which the mail server is running the +SMTP service. +
+ + + +This is html.
+--===============2078950065==-- +--===============0490954888==-- +""") + + mailhost = self._makeOne('MailHost') + # Specifying a charset for the header may have unwanted side + # effects in the case of multipart mails. + # (TypeError: expected string or buffer) + mailhost.send(msg, charset='utf-8') + self.assertEqual(mailhost.sent, msg) + + def testSendMultiPartMixedMessage(self): + msg = ("""\ +Content-Type: multipart/mixed; boundary="XOIedfhf+7KOe/yw" +Content-Disposition: inline +MIME-Version: 1.0 +Date: Sun, 27 Aug 2006 17:00:00 +0200 +Subject: My multipart email +To: Foo Bar