Re: Using IIS 7 to relaying off Yahoo smtp server
- From: "King Coffee" <kcoffee@xxxxxxxxxxx>
- Date: Sun, 1 Mar 2009 20:35:22 -0600
Also, the web.config code snippet is:
<system.net>
<mailSettings>
<smtp deliveryMethod="Network" from="kwcoffee1@xxxxxxxxx">
<network defaultCredentials="false" host="smtp.mail.yahoo.com" password="MyPassword" userName="kwcoffee1@xxxxxxxxx"/>
</smtp>
</mailSettings>
</system.net>
"King Coffee" <kcoffee@xxxxxxxxxxx> wrote in message news:ec7wbIrmJHA.4372@xxxxxxxxxxxxxxxxxxxxxxx
Hi,.
I have a home PC workstation running VISTA-IIS 7. I'm not sure if its prosible,
but I trying to relay my ASP.NET Web email off the the Yahoo! smtp outgoing
mail server. Yahoo literature states: Port 465/587, SSL,
server: smtp.mail.yahoo.com. The Web Development IDE I'm using
is MS ASP.NET 2008 VWD.
The code snippet I used is:
public partial class _Default : System.Web.UI.Page
{
protected void Page_Load(object sender, EventArgs e)
{
MailMessage Msg = new MailMessage();
SmtpClient MailObj = new SmtpClient();
Msg.From = new MailAddress("kwcoffee1@xxxxxxxxx", "KWC");
Msg.To.Add(new MailAddress("kcoffee@xxxxxxxxxxx", "King"));
Msg.Body = "This is the Email body";
Msg.Subject = "This is the subject";
MailObj.DeliveryMethod = SmtpDeliveryMethod.Network;
MailObj.UseDefaultCredentials = false;
MailObj.Host = "smtp.mail.yahoo.com";
// MailObj.EnableSsl = true;
// MailObj.Port = 587;
MailObj.Port = 25;
try
{
MailObj.Send(Msg);
Label1.Text = "Email Send";
}
catch (Exception ex)
{
Label1.Text = ex.ToString();
}
}
}
The following is the port number and the error message returned:
Port: 25
System.Net.Mail.SmtpException: The SMTP server requires a secure connection
or the client was not authenticated. The server response was: authentication required -
"for help go to http://help.yahoo.com/help/us/mail/pop/pop-11.html" at
System.Net.Mail.MailCommand.CheckResponse(SmtpStatusCode statusCode, String
response) at System.Net.Mail.MailCommand.Send(SmtpConnection conn, Byte[]
command, String from) at System.Net.Mail.SmtpTransport.SendMail(MailAddress sender,
MailAddressCollection recipients, String deliveryNotify, SmtpFailedRecipientException&
exception) at System.Net.Mail.SmtpClient.Send(MailMessage message) at
Email._Default.Page_Load(Object sender, EventArgs e) in
C:\Users\owner\Documents\Visual
Studio 2008\Projects\Email\Email\Default.aspx.cs:line 32
Port: 587
System.Net.Mail.SmtpException: The SMTP server requires a secure connection or the client
was not authenticated. The server response was: authentication required - "for help go to
http://help.yahoo.com/help/us/mail/pop/pop-11.html" at
System.Net.Mail.MailCommand.CheckResponse(SmtpStatusCode statusCode, String
response) at System.Net.Mail.MailCommand.Send(SmtpConnection conn, Byte[]
command, String from) at System.Net.Mail.SmtpTransport.SendMail(MailAddress sender,
MailAddressCollection recipients, String deliveryNotify, SmtpFailedRecipientException&
exception) at System.Net.Mail.SmtpClient.Send(MailMessage message) at
Email._Default.Page_Load(Object sender, EventArgs e) in
C:\Users\owner\Documents\Visual
Studio 2008\Projects\Email\Email\Default.aspx.cs:line 31
Port: 587 with SSL
System.Net.Mail.SmtpException: Server does not support secure connections.
at System.Net.Mail.SmtpConnection.GetConnection(String host, Int32 port) at
System.Net.Mail.SmtpTransport.GetConnection(String host, Int32 port) at
System.Net.Mail.SmtpClient.GetConnection() at System.Net.Mail.SmtpClient.Send
(MailMessage message) at Email._Default.Page_Load(Object sender, EventArgs
e) in C:\Users\owner\Documents\Visual Studio
2008\Projects\Email\Email\Default.aspx.cs:line 31
Do I need to set other properties like MailMessage "ServicePoint" or
"Credentials"? Or, modify the Firewall software?
King
- References:
- Using IIS 7 to relaying off Yahoo smtp server
- From: King Coffee
- Using IIS 7 to relaying off Yahoo smtp server
- From: King Coffee
- Using IIS 7 to relaying off Yahoo smtp server
- Prev by Date: Using IIS 7 to relaying off Yahoo smtp server
- Next by Date: Re: Using IIS 7 to relaying off Yahoo smtp server
- Previous by thread: Using IIS 7 to relaying off Yahoo smtp server
- Next by thread: Re: Using IIS 7 to relaying off Yahoo smtp server
- Index(es):
Relevant Pages
|