Skip to content

Commit

Permalink
Email check
Browse files Browse the repository at this point in the history
m7x committed Jun 23, 2014
1 parent 59ea13e commit 8911756
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions phemail.py
Original file line number Diff line number Diff line change
@@ -54,7 +54,7 @@ def discoverSMTP(self, domain):

def checkEmail(self, emails):
for email in emails:
if not re.match(r"([a-zA-Z\.\-\_1-9]+)\@([a-zA-Z\.\-\_1-9]+)\.([a-z]+)", email):
if not re.match(r"([a-zA-Z\.\-\_0-9]+)\@([a-zA-Z\.\-\_0-9]+)\.([a-z]+)", email):
print "Error: not a valid email "+email
print "Check "+self.filemail
exit()
@@ -176,7 +176,7 @@ def sendMail(self):
FROM, TO, MSG, pict = self.createMail(email)
try:
# Uncomment this for debugging
#server.set_debuglevel(1)
if verbose : server.set_debuglevel(1)
server.sendmail(FROM, TO, MSG)
print "Sent to "+email
time.sleep(delay)

0 comments on commit 8911756

Please sign in to comment.