I guess my biggest hurdle at this time is how to extract the file from the
repository that I would like to send it as an attachment.

Most of the examples on the net simply specifies an explicit filename (to
show as an example) like this:
*********************************************************************************
#!/usr/bin/python
import smtplib
......
filename = "/tmp/test.txt"
.....
# Define the attachment section
part3 = """Content-Type: multipart/mixed; name=\"%s\"
Content-Transfer-Encoding:base64
Content-Disposition: attachment; filename=%s
.......
%s
--%s--
""" %(filename, filename, encodedcontent, marker)
message = part1 + part2 + part3
try:
   smtpObj = smtplib.SMTP('localhost')
   smtpObj.sendmail(sender, reciever, message)
   print "Successfully sent email"
except Exception:
   print "Error: unable to send email"

*********************************************************************************
So basically I would want the path
/var/lib/svn/projectA/tags/REL-1.0/source.zip in the filename variable.

Reply via email to