469,356 Members | 1,930 Online
Bytes | Developer Community
New Post

Home Posts Topics Members FAQ

Post your question to a community of 469,356 developers. It's quick & easy.

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 4314
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 discussion thread is closed

Replies have been disabled for this discussion.

Similar topics

2 posts views Thread by Dan Boyle | last post: by
2 posts views Thread by RandRace | last post: by
6 posts views Thread by erdem kemer | last post: by
1 post views Thread by CARIGAR | last post: by
reply views Thread by suresh191 | last post: by
1 post views Thread by Marylou17 | last post: by
By using this site, you agree to our Privacy Policy and Terms of Use.