Last
Last
---
### ✅ Prerequisites:
```bash
pip install secure-smtplib
```
---
```python
import smtplib
from email.message import EmailMessage
import os
# List of recipients
recipients = [
"[email protected]",
"[email protected]",
"[email protected]",
# Add more...
]
# Email content
subject = "Exploring Opportunities – Backend Software Engineer"
body = """
I wanted to reach out to discuss potentially working together.
I’m a Backend software engineer working in LendingKart and currently seeking new
opportunities.
PFA my resume for your reference
LinkedIn: https://www.linkedin.com/in/ashish-singh-39127b288
# Path to resume
resume_file = "Ashish_Resume.pdf" # Change to your resume file path
# Add attachment
with open(resume_file, 'rb') as f:
file_data = f.read()
file_name = os.path.basename(resume_file)
msg.add_attachment(file_data, maintype='application', subtype='pdf',
filename=file_name)
# Send email
with smtplib.SMTP_SSL('smtp.gmail.com', 465) as smtp:
smtp.login(EMAIL_ADDRESS, EMAIL_PASSWORD)
smtp.send_message(msg)
except Exception as e:
print(f"Failed to send email to {recipient}: {e}")
```
---
### ✅ Notes:
Let me know if you want a version that reads recipients from a file.