Questions tagged [smtplib]

`smtplib` is a Python module that defines an SMTP client session object. It can be used to send mail to any Internet machine with an SMTP or ESMTP listener daemon.

smtplib is a Python module that defines an SMTP client session object. It can be used to send mail to any Internet machine with an SMTP or ESMTP listener daemon. For details of SMTP and ESMTP operation, consult RFC 821 (Simple Mail Transfer Protocol) and RFC 1869 (SMTP Service Extensions).

Reference: http://docs.python.org/library/smtplib.html

1300 questions
-2
votes
1 answer

In Python how do I test that the gmail password is correct?

I want to test whether the password entered by the user of his google account is correct or not, but I am always getting INCORRECT as an output How do I perform this? Before asking this question I've tried : import smtplib as s ID = input("ENTER…
CopyrightC
  • 857
  • 2
  • 7
  • 15
-2
votes
1 answer

Unable to send mail using smtplib in python

I am running the below code in Ubuntu OS. When I run this code in stand alone machine, I am not getting any error. But when I connect the remote machine and run the same code, I am getting the following error message. I have also modified the port…
Chandra
  • 939
  • 1
  • 6
  • 12
-2
votes
1 answer

Send email reply to specific outlook email from python

I have added outlook mail parsing functionality in my project. Now i want to reply to specific email using python code. How to do this?
Uday Magdum
  • 77
  • 1
  • 6
-2
votes
1 answer

Error in Email Program in Python

I started with a very simple email program in python where I am trying to send an message from my GMail address. I am always getting the error below, Traceback (most recent call last): File…
-2
votes
1 answer

How to get instance variable recognized as string? For an email?

A class I created has a function .email_template that produces a string. In my code, I have stored instance variables in a list, inst. As such, inst[randint(1,100)].email_template() produces a string. I'm using smtplib in Python to send an email…
zthomas.nc
  • 3,689
  • 8
  • 35
  • 49
-3
votes
1 answer

How can I make this smtplib code send emails in an infinite loop?

How can I adjust the code below to send emails to the given recipient in an infinite loop?. I have tried below but I am getting an error: # Import smtplib for the actual sending function import smtplib # Import the email modules we'll need from…
user2361290
-3
votes
1 answer

raw_input for Subject line [python smtp]

I need to have 'cid' in this script as the subject line in an email. It can't just be in the message body or header, but the actual subject line in the recipient's inbox import smtplib cid = raw_input() cmd = #output from a script to =…
ardtus
  • 13
  • 3
-4
votes
1 answer

How To stop smtp lib from sending in discord py?

how can i stop smtplib from send with a command in discord py ? Hello beautiful people , so i am coding a discord bot that can send emails on given smtp server and letter,maillist but lets say i have a list of 20 emails and i started sending , and i…
yxxhixx
  • 29
  • 6
-4
votes
2 answers

Sending Email attachment (.txt file) using Python 2.7 (smtplib)

So I'm trying to send a .txt file as an attachment and I can't find the right code to work. Here is my code: import pythoncom import win32gui import win32console import smtplib from email.mime.multipart import MIMEMultipart from email.mime.text…
Zover Lul
  • 1
  • 1
  • 2
-4
votes
1 answer

Python SMTP Function Issue

I have a python script sending emails via a Gmail SMTP setup shown below which works fine. However when I try to turn this into a function it no longer sends any emails. Any help you can give me would be appreciated. import smtplib SMTP_SERVER =…
1 2 3
86
87