Start sending from the first subject.
authorIvan Alejandro <ivanalejandro0@gmail.com>
Wed, 22 Jan 2014 14:54:53 +0000 (11:54 -0300)
committerIvan Alejandro <ivanalejandro0@gmail.com>
Wed, 22 Jan 2014 14:54:53 +0000 (11:54 -0300)
src/send-mail-batch.py

index fceea74..17c9543 100755 (executable)
@@ -191,10 +191,10 @@ gmail = GMail(FROM, SECRET)
 
 print "Sending {0} mails batch...".format(MAX_MAILS)
 
-count = 1
-while count <= MAX_MAILS:
+count = 0
+while count < MAX_MAILS:
     idx = (count % len(lorem_subjects))
-    subject = "[TEST] {0:03} - {1}".format(count, lorem_subjects[idx])
+    subject = "[TEST] {0:03} - {1}".format(count+1, lorem_subjects[idx])
     print "Sending '{0}' ... ".format(subject),
     try:
         problems = send_test_mail(subject)