Anonymous ID: 00c1f0 Feb. 7, 2018, 2:08 a.m. No.293189   🗄️.is 🔗kun   >>3196

>>293171

>or something like that. i'm sure it doesn't mean "don't get involved in your government"

 

Which reminds me..

 

HERE IS A SIMPLE PYTHON SCRIPT FOR A BULK EMAILER

 

Yes, you can probably just get away with some type of email list, but this makes it so you can add/delete addresses and save them easily and it's fun to fuck around with.

 

Could be better, but it's a start. All it does is take a message from a text file at [whatever] path and send it to all the recipients you list in the recipients list.

 

#import requests

# Outgoing Mail (SMTP) Server - requires TLS or SSL:

# smtp.gmail.com

# Use Authentication:

# Yes

#

# Port for TLS/STARTTLS:

# 587

 

#

 

# Port for SSL:

# 465

 

#

 

# Server timeouts:

# Greater than 1 minute, we recommend 5

#

 

# Account Name or User Name:

# your full email address (including @gmail.com or @your_domain.com)

 

#

# Email Address:

# your email address (username@gmail.com or username@your_domain.com)

 

#

# Password:

# your Gmail password

import smtplib

import time

from email.mime.multipart import MIMEMultipart

from email.mime.application import MIMEApplication

from email.mime.text import MIMEText

message_path = "path to message text file"

recipients_path = "path to recipients text file"

# read text file for message body

text_file = [line.strip() for line in open(message_path)]

recipients_file = [line.strip().split('\n') for line in open(recipients_path)]

# concatenate the message together

 

complete_msg = ""

 

for l in text_file:

complete_msg += l

 

# TODO: automate this recipient process with a bot to get and populate text file with addy's

 

msg = None

fromaddr = 'YourEmail@email.com'

recipients = ['put recipients here', 'separated by commas']

emaillist = [elem.strip().split(',') for elem in recipients]

# test_address = ['testemail@gmail.com']

 

server = None

msg = MIMEMultipart()

msg['Subject'] = 'subject of your choice'

msg['From'] = fromaddr

msg['Reply-to'] = fromaddr

msg.preamble = 'Multipart message.\n'

part = MIMEText("Please find attached file (resume) \n\n\n" + complete_msg)

msg.attach(part)

 

# Loaded and ready to start sending..

 

for _ in range(7): # For x days (7) send email once per day..

 

server = smtplib.SMTP("smtp.gmail.com:587")

 

server.ehlo()

 

server.starttls()

 

server.login('YourEmail@Email.com', 'YourPasswordForEmailClient')

 

time.sleep(5) # 60 seconds x 60 = 1 hour

 

try:

filename = "attachmentFileNameAndPath"

fp = open(filename, 'rb')

att = MIMEApplication(fp.read(), _subtype="pdf")

att.add_header('Content-Disposition', 'attachment', filename=filename)

fp.close()

# or use this below..

# att.add_header('Content-Disposition', 'attachment; filename=%s' % filename)

msg.attach(att)

print("Sending message..")

server.sendmail(msg['From'], emaillist, msg.as_string())

print("Message sent..")

time.sleep(30)

except Exception as e:

print(e.message)

pass

server.quit()

 

time.sleep(60 * 60 * 24) # 1 day..

Anonymous ID: 00c1f0 Feb. 7, 2018, 2:10 a.m. No.293196   🗄️.is 🔗kun

>>293189

 

You need to set up your web email account with whatever stuff you have. I use Gmail, but.. whatever works.

 

This is just one idea.

 

Use it to send messages to all your representatives on a daily/weekly/monthly basis.