W
Wesley Chen
[Note: parts of this message were removed to make it a legal post.]
Hi, Guys,
I can read my sina.com email by the following code:
require 'net/pop'
Net:
OP3.foreach('*pop3.sina.com.cn*', 110,
'(e-mail address removed)', 'my_password' ) do |email|
hdr = email.header
if hdr =~ /\d+/
language = hdr.to_s
else
language = "INVALID"
end
puts language
end
I would like to send email by *smtp.sina.com.cn*, there is code on the net:
Net::SMTP.start('smtp.sina.com.cn',25) do |smtp|
smtp.send_message "hello", '(e-mail address removed)', ['(e-mail address removed)']
end
But I get error message:
*e:/ruby/lib/ruby/1.8/net/smtp.rb:680:in `check_response': 530
Authentication required (Net::SMTPUnknownError)*
So, how can make it I can send the email by the ruby code?
Any suggestion would be quite appreciated.
Thanks.
Wesley Chen.
Hi, Guys,
I can read my sina.com email by the following code:
require 'net/pop'
Net:
'(e-mail address removed)', 'my_password' ) do |email|
hdr = email.header
if hdr =~ /\d+/
language = hdr.to_s
else
language = "INVALID"
end
puts language
end
I would like to send email by *smtp.sina.com.cn*, there is code on the net:
Net::SMTP.start('smtp.sina.com.cn',25) do |smtp|
smtp.send_message "hello", '(e-mail address removed)', ['(e-mail address removed)']
end
But I get error message:
*e:/ruby/lib/ruby/1.8/net/smtp.rb:680:in `check_response': 530
Authentication required (Net::SMTPUnknownError)*
So, how can make it I can send the email by the ruby code?
Any suggestion would be quite appreciated.
Thanks.
Wesley Chen.