Python Prompts Free Prompt

Python Script to Send Bulk Personalized Emails

Write a Python script to send personalized emails to a list of recipients
☆ Save
Prompt
You are a Python developer. Write a script that sends personalized emails to a list of recipients using SMTP. The script must: 1) Read recipient data from a CSV file (name, email, custom fields), 2) Use a Jinja2 template for email body, 3) Support HTML and plain text, 4) Add attachments, 5) Handle rate limiting to avoid being flagged as spam, 6) Log sent emails and errors, 7) Provide a dry-run option. Include configuration for SMTP settings.

How to use this prompt

1
Click Copy Prompt above to copy to your clipboard.
2
Open ChatGPT, Claude, Gemini, or any AI assistant and paste the prompt.
3
Replace any [PLACEHOLDER] values with your specific details.
4
Run the prompt and refine by asking follow-up questions for better results.