clockworkpc

Looped List for Wunderlist

Nov 13th, 2014
411
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
Python 2.48 KB | None | 0 0
  1. #!/usr/bin/python
  2. #/home/clockworkpc/bin/southern_blues_packing.py
  3.  
  4. # Released under a GPLv3 Licence by Clockwork PC 2014
  5. # www.clockworkpc.com.au
  6.  
  7. # You are entitled to the following four freedoms:
  8. # Freedom 0: To run this program for any purpose
  9. # Freedom 1: To study how this program works and change it to make it do what you wish
  10. # Freedom 2: To redistribute copies so you can help your neighbour
  11. # Freedom 3: To distribute copies of your modified version to others
  12.  
  13. #Sending email via Gmail
  14.  
  15. import smtplib
  16.  
  17. gmail_user = "<username>"
  18. gmail_pwd = "<password>"
  19. smtpserver = smtplib.SMTP("smtp.gmail.com", 587)
  20. smtpserver.ehlo()
  21. smtpserver.starttls()
  22. smtpserver.ehlo
  23. smtpserver.login(gmail_user, gmail_pwd)
  24.  
  25.  
  26. server = smtplib.SMTP('smtp.gmail.com', 587)
  27.  
  28. server.ehlo()
  29. server.starttls()
  30. server.ehlo()
  31.  
  32. server.login(gmail_user, gmail_pwd)
  33.  
  34. #Basic Details
  35. wunderPackPrefix = "#sbe_pack_melb"
  36. wunderDoPrefix = "#sbe_do_melb"
  37. wunderPackPrefix2 = "#sbe_pack_adel"
  38. wunderDoPrefix2 = "#sbe_do_adel"
  39.  
  40. wunderPack = [
  41. "Dance shoes",
  42. "Dancing t-shirts",
  43. "Fresh t-shirts",
  44. "Fisherman pants",
  45. "Sleeping shorts",
  46. "Undies",
  47. "Socks",
  48. "Cargo pants",
  49. "Jumper",
  50. "Gloves",
  51. "Toiletry bag",
  52. "Toothbrush",
  53. "Dental floss",
  54. "Toothpaste",
  55. "Shower wash",
  56. "Shampoo",
  57. "Conditioner",
  58. "Wallet",
  59. "Phone",
  60. "Phone charger",
  61. "Earphones",
  62. "Boarding pass",
  63. "Snacks for the flight",
  64. "Notebook",
  65. "Pencil",
  66. "Pen",
  67. "Ruler"
  68. ]
  69.  
  70. wunderDo = [
  71. "Check in online",
  72. "Add Virgin mobile as bookmark",
  73. "Empty wallet",
  74. "Take in washing",
  75. "Put away washing",
  76. "Fill up shampoo bottle",
  77. "Fill up conditioner bottle",
  78. "Fisherman pants, draw money",
  79. "Fisherman pants, pick up from tailor"
  80. ]
  81.  
  82. for item in wunderPack:
  83.     print ""
  84.     wunderBundle = wunderPackPrefix + " " + item
  85.     print wunderBundle
  86.     header = 'To: ' + to + '\n' + 'From:' + gmail_user + '\n' + 'Subject:' + wunderBundle
  87.     smtpserver.sendmail(gmail_user, to, header)
  88.     print 'done!'
  89.  
  90. for item in wunderDo:
  91.     print ""
  92.     wunderBundle = wunderDoPrefix + " " + item
  93.     print wunderBundle
  94.     header = 'To: ' + to + '\n' + 'From:' + gmail_user + '\n' + 'Subject:' + wunderBundle
  95.     smtpserver.sendmail(gmail_user, to, header)
  96.     print 'done!'
  97.  
  98. for item in wunderPack:
  99.     print ""
  100.     wunderBundle = wunderPackPrefix2 + " " + item
  101.     print wunderBundle
  102.     header = 'To: ' + to + '\n' + 'From:' + gmail_user + '\n' + 'Subject:' + wunderBundle
  103.     smtpserver.sendmail(gmail_user, to, header)
  104.     print 'done!'
  105.  
  106. print ""
  107. smtpserver.close()
Advertisement
Add Comment
Please, Sign In to add comment