Click to See Complete Forum and Search --> : Send EMail to Yahoo! Mail
virlinz
May 17th, 2005, 01:26 PM
Hi..
I'm trying to make an application that can send an E-Mail to a Yahoo! mail account by using the SMTPMail object.
Last two days I happily cheered when I saw the E-Mail I sent from the application appeared in my Inbox! I tried several times and the whole thing was working fine. Just now when I tried again it gaves me this error
The server response was 553 Mail from 60.48.217.65 not allowed - VS99-IP1 deferred
I realized I was using the open relays connection. I got the SMTP server name by accident when I was searching for other alternatives to Yahoo! SMTP server smtp.mail.yahoo.com.
How is it possible if I want to use the legal way of sending mail to my Yahoo! account?
The original code to set the SMTP server is
SmtpMail.SmtpServer = "mx1.mail.yahoo.com;
j0nas
May 17th, 2005, 03:30 PM
Your question is not very clear to me... An Yahoo e-mail address isn't different from any other e-mail address. Maybe you want to send an e-mail from an Yahoo account. That is different.
To send e-mail (to any e-mail address), you will need a SMTP server and probably also an account as well on that SMTP server. Your ISP does normally provide you with an e-mail address and info about the SMTP/POP3 servers.
virlinz
May 17th, 2005, 03:58 PM
I'll rephrase my question :)
I created an ASP.NET web application in which an E-Mail will be sent with a click of a button. The following codes reside in my button click method.
string strSender= "me@you.com";
string strRecipient = "y@yahoo.com";
string emailSubject = "Testing";
string mailServer = "mx1.mail.yahoo.com";
MailMessage message = new MailMessage();
message.From = strSender;
message.To = strRecipient;
message.Subject = emailSubject;
message.Body = "Hi!";
SmtpMail.SmtpServer = mailServer;
SmtpMail.Send(message);
When I hit the button I will get an E-Mail with the subject "Testing" and "Hi!" in the message body. This code works just fine until today.
I know smtp.mail.yahoo.com is Yahoo!'s SMTP server and usually when we configure E-Mails in Outlook we have to specify both SMTP and POP3 but since this code only specifies the SmtpServer, I searched for other possible SmtpServers for Yahoo! and I stumbled upon the mx1.mail.yahoo.com.
Since now mx1.mail.yahoo.com doesn't give the output I wanted, I'd like to know if there's any other way to send an E-Mail to an existing Yahoo! Mail account.
I hope I made myself clear now. Thanks for your response :)
j0nas
May 17th, 2005, 04:17 PM
Yes, and I said that if you want send an e-mail to somebody, you don't need to contact that "somebody's" SMTP server :cool:
In your case, to send an e-mail to "y@yahoo.com", you can use any SMTP server that you have an account on. Most SMTP servers won't let you send e-mail from an e-mail address that doesn't exist on the server. In your case, you should probably use the SMTP server of "you.com" domain... You can lookup SMTP server's IP/name of any domain by quering the domain's name server for its MX record.
virlinz
May 17th, 2005, 09:38 PM
Hmm..
Actually the other day I used quite a few dummy E-Mail addresses for the strSender. I successfully received all E-Mails with strSender as the sender.
Based on my 'small' experience I think this SmtpMail.SmtpServer should match the strRecipient's Email address but since I didn't use the actual Yahoo!'s smtp server then my assumptions might be wrong :)
By the way, I changed the strSender to a valid Yahoo! E-Mail address.
The error was The transport failed to connect to the server
codeguru.com
Copyright Internet.com Inc., All Rights Reserved.