Skip to content

Commit bfa4065

Browse files
committed
Updating with review feedback, adding two other samples
1 parent f7cadec commit bfa4065

3 files changed

Lines changed: 24 additions & 1 deletion

File tree

python-email/csv_email.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -15,6 +15,6 @@
1515
msg["to"] = f"{name} <{email}>"
1616
msg["from"] = f"Me <{sender_email}>"
1717
msg["Subject"] = "Your grade"
18-
msg.set_content(f"Congratulations, {name}, you got a {grade}.")
18+
msg.set_content(f"Congratulations, {name}, your grade is {grade}.")
1919

2020
send(msg, sender_email)

python-email/proton_example.py

Lines changed: 11 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,11 @@
1+
from proton_mail_bridge_client import ProtonMailClient
2+
3+
with ProtonMailClient(
4+
email="your-email@proton.me",
5+
password="your-bridge-password", # Bridge password, NOT account password
6+
) as client:
7+
client.send_mail(
8+
to="you@proton.com",
9+
subject="Test",
10+
body="This is a test",
11+
)

python-email/yagmail_example.py

Lines changed: 12 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,12 @@
1+
import yagmail
2+
3+
receiver = "your@gmail.com"
4+
body = "Hello there from Yagmail"
5+
filename = "document.pdf"
6+
7+
yag = yagmail.SMTP("my@gmail.com")
8+
yag.send(
9+
to=receiver,
10+
subject="Yagmail test with attachment",
11+
contents=[body, filename],
12+
)

0 commit comments

Comments
 (0)