Linked Questions
61 questions linked to/from How to send an email with Gmail as provider using Python?
87
votes
3
answers
200k
views
SMTPAuthenticationError when sending mail using gmail and python [duplicate]
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
sending email using python after checking some condition [duplicate]
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
Getting error to email through python script [duplicate]
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
Send email in Python [duplicate]
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
SMTP works in Linux but not on Mac [duplicate]
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
How to send email to multiple recipients using python smtplib?
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
How to send an email with Python?
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
Login credentials not working with Gmail SMTP
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
Sending mail from Python using SMTP
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 = ...
17
votes
8
answers
24k
views
Trouble with Django sending email though smtp.gmail.com
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 ...
18
votes
2
answers
38k
views
Gmail SMTP server stopped working as it no longer support "Less Secure Apps"
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 ...
24
votes
2
answers
20k
views
Not able to send email - Django
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
Cant send email via python using gmail - smtplib.SMTPException: SMTP AUTH extension not supported by server
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
What is a secure way to send an email using Python and Gmail as the provider?
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
Sending an email via the Python email library throws error "expected string or bytes-like object"
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 ...