smtp.sendmail read receipt?

Scott Nadeau scott.nadeau at sanmina.com
Mon Sep 10 16:01:43 EDT 2001


I'm trying to figure out how to get a read receipt when a recipient
has read an e-mail that my program is sending.  I've searched the web
for the answer, but I can't seem to find it.  This is my current
(working) code...

filename = os.path.join('/opt', 'BravoFive', 'fet', 'mailer')
def contents():
		if os.path.isfile(filename):
			 fd=open(filename, 'r')
			 a = fd.read()			 	 
			 os.remove(filename)
			 return a
		else:
				 pass		
				 
try:			 
	contentslist = string.split(contents())
	custname=contentslist[1]
	partnum=contentslist[4]
except:
	pass 
		
if os.path.isfile(filename):  
	 try:
	 		 import smtplib	 		  		 
	 		 s = smtplib.SMTP("eagle-r")
	 		 s.sendmail ("me at here.com",tolist, "Subject: " + " " + custname +
" " + partnum + " Ready to Release\n\n%s" % contents())
	 		 s.quit()
	 except:
	 				print('Error:  releaseMailer.py')											
else:
		 pass


any ideas?

Thanks!
Scott Nadeau
Concord, NH



More information about the Python-list mailing list