/ Published in: Python
Expand |
Embed | Plain Text
def sendMail(): sendmail_location = "/usr/sbin/sendmail" # sendmail location p = os.popen("%s -t" % sendmail_location, "w") p.write("Subject: thesubject\n") p.write("\n") # blank line separating headers from body p.write("body of the mail") status = p.close() if status != 0: print "Sendmail exit status", status
You need to login to post a comment.
