Logo Search packages:      
Sourcecode: pythoncard version File versions  Download package

def textRouter::TextRouter::sendEmailTo (   self,
  emailRcpt,
  body,
  subject 
)

Sends the text specified to the address specified.

Definition at line 2261 of file textRouter.py.

02261                                                    :
        """Sends the text specified to the address specified."""
        # build up the email.
        msg = "From: %s <%s>\r\n" % (self.emailPrefs["name"], self.emailPrefs["email"])
        msg = msg + "To: %s\r\n" % emailRcpt
        msg = msg + "Subject: %s\r\n" % subject
        msg = msg + "User-Agent: TextRouter/0.40\r\n\r\n"
        msg = msg + body.replace("\n", "\r\n")
        msg = msg + "\r\n"
        
        # send the email
        smtpServer = smtplib.SMTP(self.emailPrefs["serverName"], self.emailPrefs["serverPort"])
        smtpServer.sendmail(self.emailPrefs["email"], emailRcpt, msg)
        smtpServer.quit()

    def checkManilaAccounts(self, toCheck = 0):


Generated by  Doxygen 1.6.0   Back to index