Changes between Version 5 and Version 6 of Plugins/Execute


Ignore:
Timestamp:
06/08/2010 01:16:22 PM (14 years ago)
Author:
konti
Comment:

--

Legend:

Unmodified
Added
Removed
Modified
  • Plugins/Execute

    v5 v6  
    9797message = """Put your message here 
    9898 
     99#You can change these 
     100from_addr = "fromemail@domain.com" 
     101to_addr = "myemail@domain.com" 
     102smtp_srv = "smtp.myisp.com" 
     103 
    99104It can span multiple lines. It can also contain information by specifying 
    100105%(torrent_id)s or %(torrent_name)s""" % {  
     
    104109} 
    105110 
    106 msg = "Subject: %s\n\n%s" % (subject, message) 
     111msg = "To:%s\nFrom:%s\nSubject: %s\n\n%s" % (to_addr, from_addr, subject, message) 
    107112 
    108 smtp = smtplib.SMTP('smtp.myisp.com') 
    109 smtp.sendmail('fromemail@domain.com', 'myemail@domain.com', msg) 
     113smtp = smtplib.SMTP(smtp_srv) 
     114smtp.sendmail(from_addr, to_addr, msg) 
     115smtp.quit() 
    110116}}}