473,387 Members | 2,436 Online
Bytes | Software Development & Data Engineering Community
Post Job

Home Posts Topics Members FAQ

Join Bytes to post your question to a community of 473,387 software developers and data experts.

smtplib "authentication required" error

In using a simple smtp routine:

# begin example
import smtplib
server = smtplib.SMTP('outgoing.verizon.net')
server.sendmail('m*@address.net', 'a******@address.net', """To: an*****@address.net
From: my@address.net
Subject: Shakespeare Quote

Tis like the breath of an unfeed lawyer...
""") server.quit()

# end example

I find the following error:

raise SMTPSenderRefused(code, resp, from_addr)
smtplib.SMTPSenderRefused: (550, '5.7.1 Authentication Required',
'm*******@verizon.net')
I have attempted to incorporate into the interactive session:

server.login = ('userid', 'password') # the same ones I use in my
email program

But I get the same error result. My objective is to have a simple way
to send email from the command line. To do this I will write a script
which can read in a file and send it to the address on top of the file.
What is the procedure for authentication?

Using the KMail email program (Linux, KDE desktop), I send mail through
my Verizon account. Under the Configure KMail / Accounts / Modify
Account / Extras tab, I clicked "Check what the server supports" and it
came back 'no encryption' and 'cleartext'. So it doesn't seem that it
would involve complex procedures.

Any help welcome.

Apr 1 '06 #1
2 6437
On 31 Mar 2006 18:20:27 -0800, ca**********@gmail.com
<ca**********@gmail.com> wrote:
In using a simple smtp routine:

# begin example
import smtplib
server = smtplib.SMTP('outgoing.verizon.net')
server.sendmail('m*@address.net', 'a******@address.net', """To: an*****@address.net
From: my@address.net
Subject: Shakespeare Quote

Tis like the breath of an unfeed lawyer...
""") server.quit()

# end example

I find the following error:

raise SMTPSenderRefused(code, resp, from_addr)
smtplib.SMTPSenderRefused: (550, '5.7.1 Authentication Required',
'm*******@verizon.net')
I have attempted to incorporate into the interactive session:

server.login = ('userid', 'password') # the same ones I use in my
email program


I had some trouble with this not too long ago. I don't know what kind
of authentication your mail server requires, but to send through gmail
I had to do the following.

s = smtplib.SMTP('smtp.gmail.com')
s.set_debuglevel(1)
s.ehlo()
s.starttls()
s.ehlo()
s.login('foo', 'bar')
s.sendmail(from_address, to_addresses, msg)
s.close()

Hope that helps.

--
Stand Fast,
tjg.
Apr 1 '06 #2
Dear tjg: That was extremely helpful. Thank you very kindly. The server
did not respond to the .starttls() method but authentication was
successful after, it seems, the .ehlo() was specified. I have tried the
script without the first s.ehlo() and without s.starttls() and it works
perfectly. My authentication problems seem to have been that the server
uses EHLO, which must be specified! Thank you very kindly.

Apr 1 '06 #3

This thread has been closed and replies have been disabled. Please start a new discussion.

Similar topics

2
by: Frank | last post by:
I have observed that a temporary loss of a domain controller can cause problems creating new ado connections between a client machine running ado and a separate sql server machine that are members...
2
by: Dave Hammond | last post by:
I've got what should be a simple assignment of either an element value or a default string to a variable, but when the element doesn't exist I get an "Object required" error rather than an...
0
by: VB Programmer | last post by:
I am getting this error when trying to do a 'Copy Project': Unable to create web project 'xxxx'. The web server does not appear to have any authentication methods enabled. It asked for user...
0
by: Carl Gilbert | last post by:
Hi I am trying to use a custom attribute that takes in an array or list of custom objects. Ths custom object has a text property and a type property. I have a custom attribute which has a...
3
by: Learning.Net | last post by:
Hi All, I have an windows application created in C# &it is running fine on several of our customer. It does a httpWebrequest in the background. Everything was working fine but some customer are...
0
by: cher | last post by:
Hey, Don't know if you can help, but I'm trying to import archived messages from Thunderbird into my gmail account and keep getting these types of errors. I am using the GML program to help...
0
by: 7stud | last post by:
On May 17, 12:18 pm, cher <cheryl.gi...@comcast.netwrote: Can you get the following program to work? #Uses gmail to send an email to someone import smtplib sender = "Tom"
0
by: sa6113 | last post by:
I am using this code to connect to a windows machine using paramiko, I have installed sshd on the machine and it works properly: sock.connect((hostname, port)) t = paramiko.Transport(sock)...
10
by: andersond | last post by:
On a webpage that has a variety of questions I get an "object required" error on lines like this... document.getElementById('tableQuestion17').style.visibility="visible"; This is the code...
0
by: taylorcarr | last post by:
A Canon printer is a smart device known for being advanced, efficient, and reliable. It is designed for home, office, and hybrid workspace use and can also be used for a variety of purposes. However,...
0
by: Charles Arthur | last post by:
How do i turn on java script on a villaon, callus and itel keypad mobile phone
0
by: aa123db | last post by:
Variable and constants Use var or let for variables and const fror constants. Var foo ='bar'; Let foo ='bar';const baz ='bar'; Functions function $name$ ($parameters$) { } ...
0
by: ryjfgjl | last post by:
If we have dozens or hundreds of excel to import into the database, if we use the excel import function provided by database editors such as navicat, it will be extremely tedious and time-consuming...
1
by: Sonnysonu | last post by:
This is the data of csv file 1 2 3 1 2 3 1 2 3 1 2 3 2 3 2 3 3 the lengths should be different i have to store the data by column-wise with in the specific length. suppose the i have to...
0
by: Hystou | last post by:
There are some requirements for setting up RAID: 1. The motherboard and BIOS support RAID configuration. 2. The motherboard has 2 or more available SATA protocol SSD/HDD slots (including MSATA, M.2...
0
marktang
by: marktang | last post by:
ONU (Optical Network Unit) is one of the key components for providing high-speed Internet services. Its primary function is to act as an endpoint device located at the user's premises. However,...
0
by: Hystou | last post by:
Most computers default to English, but sometimes we require a different language, especially when relocating. Forgot to request a specific language before your computer shipped? No problem! You can...
0
Oralloy
by: Oralloy | last post by:
Hello folks, I am unable to find appropriate documentation on the type promotion of bit-fields when using the generalised comparison operator "<=>". The problem is that using the GNU compilers,...

By using Bytes.com and it's services, you agree to our Privacy Policy and Terms of Use.

To disable or enable advertisements and analytics tracking please visit the manage ads & tracking page.