gnumed-devel
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

[Gnumed-devel] enigmail


From: scaredycat
Subject: [Gnumed-devel] enigmail
Date: Sat, 09 Oct 2004 12:26:34 +1000
User-agent: Mozilla/5.0 (X11; U; Linux i686; en-US; rv:1.7) Gecko/20040616

This topic was on the list several years ago  :(

Here's some fun code , if you have mozilla mail and enigmail installed ( enigmail will prompt for keys on installation to each account) ( Substitute the correct user and receiver parameters for gpg ( gpg -u -r) in the popen2 statement, and the mail receiver in the SMTP.sendmail statement) Enigmail should be able to decrypt this for you, so it's a kind of application to other application interface.





import popen2


[ins, outs] =popen2.popen2("gpg -a -usjtan -rscaredycat -e", 2000)

outs.write("Hello Bob,\nPlease send a referral letter with the 
patient\nYours,\nFred\n\n")
outs.close()
e = []
for x in ins:
  e.append(x)
ins.close()

import time

h=[]
h.append("Date:"+time.ctime()+"\n")
h.append("From:address@hidden")
h.append("To:address@hidden")
h.append("MIME-Version: 1.0\n")
h.append("Subject:gravy\n")
h.append("X-Enigmail-Version: 0.86.1.0\n")


m = h + ["\n"] + e

import smtplib
s = smtplib.SMTP()
s.connect("mail.swiftdsl.com.au")
s.sendmail("address@hidden", ["address@hidden"], "".join(m) )






reply via email to

[Prev in Thread] Current Thread [Next in Thread]