Skip to content
This repository has been archived by the owner on May 25, 2022. It is now read-only.

Send email #549

Open
wants to merge 2 commits into
base: master
Choose a base branch
from
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
29 changes: 29 additions & 0 deletions projects/Send_Email/Readme.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,29 @@
# Simplest Script To Send Email Using Python

### Prerequisites

Install yagmail library

```
pip3 install yagmail
```

### Running The Script:-

The script requires:-
1. [email protected]
2. Sender Name you want to display
3. Auth Password:- [Google Support Link] (https://support.google.com/accounts/answer/185833?hl=en)
Generate it using this process explained
4. [email protected]
5. body message

Once you have all these just run:-

```
python3 Send_Email.py
```

## *Abhay Partap Singh* :star_struck:
[Github] (https://github.com/abhaypartap12)
[LinkedIn] (https://www.linkedin.com/in/abhay-partap-singh-aa2898165/)
8 changes: 8 additions & 0 deletions projects/Send_Email/Send_Email.py
Original file line number Diff line number Diff line change
@@ -0,0 +1,8 @@
import yagmail

body = "Hello"

mail = yagmail.SMTP({"[email protected]":"Sender Name"},"Auth Password")
mail.send(to="[email protected]",subject="Test Mail",contents=body)