473,748 Members | 10,569 Online
Bytes | Software Development & Data Engineering Community
+ Post

Home Posts Topics Members FAQ

smtplib "authentica tion required" error

In using a simple smtp routine:

# begin example
import smtplib
server = smtplib.SMTP('o utgoing.verizon .net')
server.sendmail ('m*@address.ne t', 'a******@addres s.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 SMTPSenderRefus ed(code, resp, from_addr)
smtplib.SMTPSen derRefused: (550, '5.7.1 Authentication Required',
'm*******@veriz on.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 6480
On 31 Mar 2006 18:20:27 -0800, ca**********@gm ail.com
<ca**********@g mail.com> wrote:
In using a simple smtp routine:

# begin example
import smtplib
server = smtplib.SMTP('o utgoing.verizon .net')
server.sendmail ('m*@address.ne t', 'a******@addres s.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 SMTPSenderRefus ed(code, resp, from_addr)
smtplib.SMTPSen derRefused: (550, '5.7.1 Authentication Required',
'm*******@veriz on.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('s mtp.gmail.com')
s.set_debugleve l(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
4466
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 of the domain. I understand why this happens when creating connections with windows authentication. What is a mystery is that it also sometimes effects new connections that use "sql authentication". Below is a description of my test scenario. ...
2
24675
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 assignment of the default value. I originally used the simple statement: var v = document.getElementById('foo').value || parent.document.getElementById('foo').value || 'unknown';
0
1020
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 authentication, but did not send a www-authenticate header. Any ideas?
0
2182
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 constructor that takes a class as follows: ======================================================= Public Class MyAttribute Inherits System.Attribute
3
25811
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 facing "The Remote server returned an error :(407) Proxy Authentication Required " {
0
252
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 incorporate, but the SMTP server is not being recognized by gmail. Am I doing something wrong? Anything else I can try? SMTP I've tried: smtp.gmail.com gsmtp56.google.com
0
1132
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
2187
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) event = threading.Event() t.start_client(event) event.wait() if not t.is_active(): print 'SSH negotiation failed.'
10
7639
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 for the table "tableQuestion17" <table border="0" width="100%" id="tableQuestion17" cellpadding="0" style="visibility:hidden">
0
8831
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 effortlessly switch the default language on Windows 10 without reinstalling. I'll walk you through it. First, let's disable language synchronization. With a Microsoft account, language settings sync across devices. To prevent any complications,...
0
9548
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, it seems that the internal comparison operator "<=>" tries to promote arguments from unsigned to signed. This is as boiled down as I can make it. Here is my compilation command: g++-12 -std=c++20 -Wnarrowing bit_field.cpp Here is the code in...
0
9374
jinu1996
by: jinu1996 | last post by:
In today's digital age, having a compelling online presence is paramount for businesses aiming to thrive in a competitive landscape. At the heart of this digital strategy lies an intricately woven tapestry of website design and digital marketing. It's not merely about having a website; it's about crafting an immersive digital experience that captivates audiences and drives business growth. The Art of Business Website Design Your website is...
1
9325
by: Hystou | last post by:
Overview: Windows 11 and 10 have less user interface control over operating system update behaviour than previous versions of Windows. In Windows 11 and 10, there is no way to turn off the Windows Update option using the Control Panel or Settings app; it automatically checks for updates and installs any it finds, whether you like it or not. For most users, this new feature is actually very convenient. If you want to control the update process,...
0
8244
agi2029
by: agi2029 | last post by:
Let's talk about the concept of autonomous AI software engineers and no-code agents. These AIs are designed to manage the entire lifecycle of a software development project—planning, coding, testing, and deployment—without human intervention. Imagine an AI that can take a project description, break it down, write the code, debug it, and then launch it, all on its own.... Now, this would greatly impact the work of software developers. The idea...
0
4607
by: TSSRALBI | last post by:
Hello I'm a network technician in training and I need your help. I am currently learning how to create and manage the different types of VPNs and I have a question about LAN-to-LAN VPNs. The last exercise I practiced was to create a LAN-to-LAN VPN between two Pfsense firewalls, by using IPSEC protocols. I succeeded, with both firewalls in the same network. But I'm wondering if it's possible to do the same thing, with 2 Pfsense firewalls...
0
4876
by: adsilva | last post by:
A Windows Forms form does not have the event Unload, like VB6. What one acts like?
2
2787
muto222
by: muto222 | last post by:
How can i add a mobile payment intergratation into php mysql website.
3
2215
bsmnconsultancy
by: bsmnconsultancy | last post by:
In today's digital era, a well-designed website is crucial for businesses looking to succeed. Whether you're a small business owner or a large corporation in Toronto, having a strong online presence can significantly impact your brand's success. BSMN Consultancy, a leader in Website Development in Toronto offers valuable insights into creating effective websites that not only look great but also perform exceptionally well. In this comprehensive...

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.