Skip to content

Open-source Python library for AI browser agents, plus Browser Use Cloud: stealth browsers and a hosted agent API.

Gmail notification

magmueller2e7be647a69c
diff --git a/examples/notification.py b/examples/notification.py
new file mode 100644
index 000000000..20ff4f7ad
--- /dev/null
+++ b/examples/notification.py
@@ -0,0 +1,10 @@
+import yagmail
+
+# STEP 1: go to https://support.google.com/accounts/answer/185833
+# STEP 2: Create an app password
+# STEP 3: Use the app password in the code below for the password
+yag = yagmail.SMTP('[email protected]', 'your_app_password')
+yag.send(
+ to='[email protected]', subject='Test Email', contents='Hello from Python using yagmail!'
+)
+print('Email sent!')