Hack Forums
[Python] help with my email spammer - Printable Version

+- Hack Forums (https://hackforums.net)
+-- Forum: Tech (https://hackforums.net/forumdisplay.php?fid=444)
+--- Forum: Coding (https://hackforums.net/forumdisplay.php?fid=151)
+---- Forum: Software Development (https://hackforums.net/forumdisplay.php?fid=118)
+---- Thread: [Python] help with my email spammer (/showthread.php?tid=6166015)



help with my email spammer - SIM-4910684 - Jul 31, 2021

Hi everyone I am new to coding and this is my first project I was trying to code an email spammer and for some reason, it won't send the email

-I've allowed less secure apps on Gmail

any help would be greatly appreciated Thanks

Code
import smtplib,ssl

email="[email protected]"
password="password"

message="""

test!!!!!

"""


port = 465

reciver=""

sslcontext=ssl.create_default_context()

for i in range (0,1000):
    connection = smtplib.SMTP_SSL("smtp.gmail.com",port,context=sslcontext)

    connection.login(email,password)

    connection.sendmail(email,reciver,message)
    print("Sent")



RE: help with my email spammer - MntlPrblm - Aug 16, 2021

It worked fine for me!
Make sure your credentials are correct

(And also your code is very messy so fix that) ;)


RE: help with my email spammer - SIM-4910684 - Aug 24, 2021

(Aug 16, 2021 11:05 PM)MntlPrblm Wrote:  It worked fine for me!
Make sure your credentials are correct

(And also your code is very messy so fix that) ;)

thank you Ive fixed the problem and made the script a gui and made the code less messy


RE: help with my email spammer - m4j33d - Sep 1, 2021

You can try this as well works for me

Code
import smtplib
import imghdr
from email.message import EmailMessage
#smtp email
EMAIL_ADDRESS = ""
#smtp pass
EMAIL_PASSWORD = ""
#enter receipients email address
contacts = ['']

#Edit subject
msg = EmailMessage()
msg['Subject'] = 'subject here'
msg['From'] = EMAIL_ADDRESS
msg['To'] = contacts

msg.set_content('This is a plain text email')
#html letter
msg.add_alternative("""\
<!DOCTYPE html>
<html>
    <body>
        <h1 style="color:SlateGray;">This is an HTML Email!</h1>
    </body>
</html>
""", subtype='html')

#smtp server inside ''
with smtplib.SMTP_SSL('', 465) as smtp:
    smtp.login(EMAIL_ADDRESS, EMAIL_PASSWORD)
    smtp.send_message(msg)



RE: help with my email spammer - ThinWhiteDuke - Sep 9, 2021

That’s quite impressive for someone new to coding or is your definition of new different to mine ? 😀


RE: help with my email spammer - SIM-4910684 - Oct 6, 2021

Thanks, everyone I figured out how to do it let me know if you want the code I also made it a GUI and rotate the emails it is using


RE: help with my email spammer - ThinWhiteDuke - Oct 7, 2021

(Oct 6, 2021 03:40 PM)kgoat777 Wrote:  Thanks, everyone I figured out how to do it let me know if you want the code I also made it a GUI and rotate the emails it is using

Yes I’d very much like to get a look at the code Thanks 👍


RE: help with my email spammer - hackhim - Oct 7, 2021

pls can someone help me with python programming. tutorials ,videos and where i can learn for self study. any referral or links will be helpful. thanks