473,399 Members | 2,278 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,399 software developers and data experts.

Yahoo SMTP


Can someone give me an example of connecting to yahoo's smtp server
and sending mail?
I'm doing this:
msg = MIMEText(self.text_ctrl_1.GetValue())
msg['Subject'] = sub
msg['From'] = 'b*************@yahoo.com'
msg['To'] = to
s = smtplib.SMTP('smtp.mail.yahoo.com')
s.set_debuglevel(1)
s.connect()
s.login('bossierbossman', 'mypassword')
s.sendmail('b*************@yahoo.com', [to], msg)
s.quit()
which isn't working out for me. Any thoughts?

Jul 18 '05 #1
6 4688
Travis <bo************@yahoo.com> wrote:

Can someone give me an example of connecting to yahoo's smtp server
and sending mail?
I'm doing this:
msg = MIMEText(self.text_ctrl_1.GetValue())
msg['Subject'] = sub
msg['From'] = 'bo************@yahoo.com'
msg['To'] = to
s = smtplib.SMTP('smtp.mail.yahoo.com')
s.set_debuglevel(1)
s.connect()
s.login('bossierbossman', 'mypassword')
s.sendmail('bo************@yahoo.com', [to], msg)
s.quit()
which isn't working out for me. Any thoughts?


Where is your code for doing AUTH? Using Telnet, I get

250-smtp104.mail.sc5.yahoo.com
250-AUTH LOGIN PLAIN
250-PIPELINING
250 8BITMIME

which means you have to do issue 'auth login' or 'auth plain'.

--
William Park <op**********@yahoo.ca>
Open Geometry Consulting, Toronto, Canada
Jul 18 '05 #2
Thanks for the reply, recently I have tightened up my code to now reach the
point where my ISP can reject me on port 25...LOL I am curioius about AUTH, I
have no idea how this is done and have seen no mention of it in the module
index under smtplib. If anyone could point me to where I should look for info
on that I'd be grateful.
Jul 18 '05 #3
LutherRevisited wrote:
Thanks for the reply, recently I have tightened up my code to now reach the
point where my ISP can reject me on port 25...LOL I am curioius about AUTH, I
have no idea how this is done and have seen no mention of it in the module
index under smtplib. If anyone could point me to where I should look for info
on that I'd be grateful.


If Googling for "smtp auth" didn't help you, try adding "rfc" and
you should get where you need to be to learn more.

(Unless you are asking "how is this done in Python", in which
case the answer is either "it isn't" (if it isn't), or "use
the source" (if it is). ;-) )

-Peter
Jul 18 '05 #4
Peter L Hansen wrote:
LutherRevisited wrote:
Thanks for the reply, recently I have tightened up my code to now
reach the point where my ISP can reject me on port 25...LOL I am
curioius about AUTH, [...]


If Googling for "smtp auth" didn't help you, try adding "rfc" and
you should get where you need to be to learn more.

(Unless you are asking "how is this done in Python", in which
case the answer is either "it isn't" (if it isn't), or "use
the source" (if it is). ;-) )


SMTP AUTH with Python works using the login() method of the SMTP object.
It supports the methods CRAM-MD5, PLAIN and LOGIN :-)

-- Gerhard
Jul 18 '05 #5
I tried telnetting to Yahoo myself, but I didn't get 250-AUTH LOGIN PLAIN, I
got the other things though
Jul 18 '05 #6
LutherRevisited wrote:
I tried telnetting to Yahoo myself, but I didn't get 250-AUTH LOGIN PLAIN,
I got the other things though telnet smtp.mail.yahoo.com 25

Trying 216.136.173.18...
Connected to smtp.mail.yahoo.com.
Escape character is '^]'.
220 smtp107.mail.sc5.yahoo.com ESMTP
ehlo
250-smtp107.mail.sc5.yahoo.com
250-AUTH LOGIN PLAIN
250-PIPELINING
250 8BITMIME

HELO is the SMTP, where EHLO is accepted by ESMTP servers. The response
should be a list of the enhancements the server supports. Note that '250-'
indicates a line of a multiline response, with '250 ' being the last line.
Jul 18 '05 #7

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

Similar topics

2
by: Dan Boyle | last post by:
Hi, I am having difficulty connection to an smtp host. I am using the following code but I don't think I fully understand what smtp host can be used. function setSMTPParams($host = null,...
21
by: Nancy | last post by:
Hi, Guys, Is there any other way to use python or mod_python writing a web page? I mean, not use "form.py/email", no SMTP server. <form action="form.py/email" method="POST"> ... Thanks a lot. ...
0
by: Almir | last post by:
I hate this Net::SMTP stuff, everything works fine but for the suject field. I see no way of having it show in an email when sent. Has anyone had this problem, can anyone explain why there are no...
2
by: RandRace | last post by:
I'm having some problems with a little script i wrote using net::smtp. I originally wrote it in linux where it works perfectly. I tried to use it from windows the other day and it doesn't work. It...
6
by: erdem kemer | last post by:
i cant send mail to yahoo mail or hotmail while i can send my other mail accounts (pop3) is it becouse yahoo and hotmail is web-based mail here is the code MailMessage mailMsg = new...
1
by: bivin | last post by:
hai i am requesting your technical support. please help me. i have been working with this for five days. the problem is relating with the smtp. i am trying to send an email from the asp.net...
13
by: jcor | last post by:
Hi, I'm trying some code to send a mail with my script. This is it: #!/usr/bin/perl use Net::SMTP; my $smtp_server='62.193.245.15'; my $smtp = Net::SMTP->new($smtp_server) or die "Can't Open...
5
by: jimhill10 | last post by:
I have a perl script that creates an email attachment file from POST data on a web page. This works just fine. I want to customize the email body to contain all of the text data from the file...
7
by: undbund | last post by:
Hi I am creating a newsletter system. The software should run from desktop computer (localhost) but be able to send email to anyone on the internet. Can you guys give me some ideas on how to...
0
by: emmanuelkatto | last post by:
Hi All, I am Emmanuel katto from Uganda. I want to ask what challenges you've faced while migrating a website to cloud. Please let me know. Thanks! Emmanuel
0
BarryA
by: BarryA | last post by:
What are the essential steps and strategies outlined in the Data Structures and Algorithms (DSA) roadmap for aspiring data scientists? How can individuals effectively utilize this roadmap to progress...
1
by: nemocccc | last post by:
hello, everyone, I want to develop a software for my android phone for daily needs, any suggestions?
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:
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
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...
0
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...
0
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,...
0
isladogs
by: isladogs | last post by:
The next Access Europe User Group meeting will be on Wednesday 1 May 2024 starting at 18:00 UK time (6PM UTC+1) and finishing by 19:30 (7.30PM). In this session, we are pleased to welcome a new...

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.