Linked Questions

87 votes
3 answers
200k views

when i try to send mail using gmail and python error occurred this type of question are already in this site but doesn't help to me gmail_user = "[email protected]" gmail_pwd = "password" TO = 'friend@...
mans's user avatar
  • 1,053
0 votes
1 answer
953 views

I am trying to build a prototype in python. The used case is fairly simple. Upon running the program will accept an input x and will execute something like if(x<=3){ send email to [email protected] ...
soum's user avatar
  • 1,159
1 vote
2 answers
823 views

I am very new to python. I was trying to send a mail using a python script. But getting the below mentioned error: $ python main.py Traceback (most recent call last): File "main.py", line 8, in <...
3 votes
2 answers
360 views

Now, as the Lesser secure apps feature in Gmail has been disabled, I am trying to find alternatives for email sending. I am trying freemail.hu as an alternative which supports SMTP protocol, but any ...
0 votes
0 answers
71 views

When I run the following code in Linux, it sends, the email, however, in Mac, it fails to run at line server = smtplib.SMTP("smtp.gmail.com", "587") import smtplib from email.mime.text import ...
307 votes
18 answers
471k views

After much searching I couldn't find out how to use smtplib.sendmail to send to multiple recipients. The problem was every time the mail would be sent the mail headers would appear to contain ...
281 votes
21 answers
672k views

This code works and sends me an email just fine: import smtplib #SERVER = "localhost" FROM = '[email protected]' TO = ["[email protected]"] # must be a list SUBJECT = "Hello!" TEXT = "This ...
174 votes
20 answers
399k views

I am attempting to send an email in Python, through Gmail. Here is my code: import smtplib fromaddr = '......................' toaddrs = '......................' msg = 'Spam email Test' ...
154 votes
16 answers
431k views

I'm using the following method to send mail from Python using SMTP. Is it the right method to use or are there gotchas I'm missing ? from smtplib import SMTP import datetime debuglevel = 0 smtp = ...
Eli Bendersky's user avatar
17 votes
8 answers
24k views

I am trying to configure Django's send_email so I can send password reset emails to users. So far I've had no luck on getting it to work. I've set up a basic Gmail account (no Google App etc) and in ...
Yue Y's user avatar
  • 593
18 votes
2 answers
38k views

I am working on Laravel project and suddenly emails stopped working. After searching I figured out that Google as stopped support for Less Secure Apps and now I no longer see the option to enable or ...
Akhilesh's user avatar
  • 998
24 votes
2 answers
20k views

My settings.py: EMAIL_BACKEND = 'django.core.mail.backends.console.EmailBackend' EMAIL_USE_TLS = True EMAIL_HOST = 'smtp.gmail.com' EMAIL_PORT = 587 EMAIL_HOST_USER = '[email protected]' ...
10 votes
2 answers
33k views

I just want to send an email in python with an attachment import smtplib, os from email.MIMEMultipart import MIMEMultipart from email.MIMEBase import MIMEBase from email.MIMEText import MIMEText from ...
15 votes
3 answers
14k views

I am trying to send emails to myself using a Python script, and luckily I came across this post: How to send an email with Gmail as provider using Python? The trouble is, smtplib sends out the ...
9 votes
1 answer
9k views

I am trying to send a csv file as an attachment via a simple function in python 3.6. from email.message import Message from email.mime.base import MIMEBase from email.mime.multipart import ...

15 30 50 per page
1
2 3 4 5