Yahoo SMTP

T

Travis

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'] = '(e-mail address removed)'
msg['To'] = to
s = smtplib.SMTP('smtp.mail.yahoo.com')
s.set_debuglevel(1)
s.connect()
s.login('bossierbossman', 'mypassword')
s.sendmail('(e-mail address removed)', [to], msg)
s.quit()
which isn't working out for me. Any thoughts?
 
W

William Park

Travis said:
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'] = '(e-mail address removed)'
msg['To'] = to
s = smtplib.SMTP('smtp.mail.yahoo.com')
s.set_debuglevel(1)
s.connect()
s.login('bossierbossman', 'mypassword')
s.sendmail('(e-mail address removed)', [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'.
 
L

LutherRevisited

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.
 
P

Peter L Hansen

LutherRevisited said:
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
 
?

=?ISO-8859-1?Q?Gerhard_H=E4ring?=

Peter said:
LutherRevisited said:
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
 
L

LutherRevisited

I tried telnetting to Yahoo myself, but I didn't get 250-AUTH LOGIN PLAIN, I
got the other things though
 
B

bowman

LutherRevisited said:
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.
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Members online

Forum statistics

Threads
473,779
Messages
2,569,606
Members
45,239
Latest member
Alex Young

Latest Threads

Top