pythonemailpython-2.xemail-spam

Python Email Spammer multiple Emails not working


im currently making a Email Spammer that can send one message to multiple emails.

Now.

This is my Code:

 print '    '
    sender =  raw_input('Attacker Email:   ')
    print '    '

    subjcet = raw_input('Subject:    ')
    print '    '
    password = raw_input('Password:   ') 
    print '    '
    recipients = raw_input('Emails,  Multiple with "," :  ')
    print '    '
    msg = raw_input('Message:  ')

    print '    '

    s = smtplib.SMTP(host='smtp.gmail.com', port=587)

    s.ehlo()
    s.starttls()
    s.ehlo()
    s.login(sender, password)

    s.sendmail(sender, recipients, msg)

    print "Email sent to: " + ', '.join(recipients)

What i get is: Email sent to: k, l, e, e, b, l, a, t, t, g, a, m, i, n, g, @, g, m, a, i, l, ., c, o, m, ,, , z, e, r, b, i, m, a, x, 0, 7, @, g, m, a, i, l, ., c, o, m

What is the Problem? Thanks


Solution

  • I don't know what you input as recipients but changing ', '.join(recipients) to ', '.join(recipients.split(',')) will probably work. Since you're asking the user to split the email with a ,.

    PS: Don't spam emails that are not yours, nobody likes that.