Skip to content

Commit 1eb5f97

Browse files
authored
Add files via upload
1 parent 3d4110a commit 1eb5f97

File tree

4 files changed

+58
-0
lines changed

4 files changed

+58
-0
lines changed
15.1 KB
Loading

Automatic Email Sender/main.py

+27
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,27 @@
1+
import smtplib
2+
import ssl
3+
from email.message import EmailMessage
4+
5+
email_sender = '[email protected]'
6+
email_password = 'write-password-here'
7+
8+
# List of email addresses
9+
email_receivers = ['[email protected]', '[email protected]']
10+
11+
subject = 'Check out my Project'
12+
body = """
13+
This is demo of automated email sender,
14+
Hope you like this
15+
"""
16+
17+
em = EmailMessage()
18+
em['From'] = email_sender
19+
em['To'] = ', '.join(email_receivers)
20+
em['Subject'] = subject
21+
em.set_content(body)
22+
23+
context = ssl.create_default_context()
24+
25+
with smtplib.SMTP_SSL('smtp.gmail.com', 465, context=context) as smtp:
26+
smtp.login(email_sender, email_password)
27+
smtp.sendmail(email_sender, email_receivers, em.as_string())

Automatic Email Sender/readme.md

+27
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,27 @@
1+
**Automatic Email Sender**
2+
3+
**GOAL**
4+
Send email in one go by clicking the run button.
5+
6+
**DESCRIPTION**
7+
If person want to send same mail to many persons. this programme can help it.
8+
9+
**WHAT I HAD DONE**
10+
11+
1. set 2-step verifiaction
12+
2. import some files like smtpib, ssl, EmailMessage
13+
3. set Sender and recieve, subject.
14+
4. send EmailMessage()
15+
16+
**LIBRARIES NEEDED**
17+
18+
smtpib, ssl, EmailMessage
19+
20+
**DEMONSTRATION**
21+
22+
![Image1](Images/image-1.png)
23+
24+
**YOUR NAME**
25+
26+
Nikunj Rohit
27+
Twitter: @nikunj_rohit10
+4
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,4 @@
1+
1. Turn On 2-Step Verification
2+
2. save 16 alfabet password
3+
3. Send Email with Python code
4+
4. Log in and send the email

0 commit comments

Comments
 (0)