subversion-users mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Tech Geek <>
Subject Re: Sending attachments in email using script
Date Wed, 06 Oct 2010 22:58:21 GMT
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:
import smtplib
filename = "/tmp/test.txt"
# Define the attachment section
part3 = """Content-Type: multipart/mixed; name=\"%s\"
Content-Disposition: attachment; filename=%s
""" %(filename, filename, encodedcontent, marker)
message = part1 + part2 + part3
   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/ in the filename variable.

View raw message