Re: Using IIS 7 to relaying off Yahoo smtp server

Tech-Archive recommends: Speed Up your PC by fixing your registry



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


.



Relevant Pages

  • Using IIS 7 to relaying off Yahoo smtp server
    ... server: smtp.mail.yahoo.com. ... The following is the port number and the error message returned: ... System.Net.Mail.MailCommand.CheckResponse(SmtpStatusCode statusCode, String ... command, String from) at System.Net.Mail.SmtpTransport.SendMail(MailAddress sender, ...
    (microsoft.public.inetserver.iis.smtp_nntp)
  • Using IIS 7 to relaying off Yahoo smtp server
    ... smtp outgoing mail server. ... The following is the port number and the error message returned: ... System.Net.Mail.MailCommand.CheckResponse(SmtpStatusCode statusCode, String ... String from) at System.Net.Mail.SmtpTransport.SendMail(MailAddress sender, ...
    (microsoft.public.inetserver.iis.smtp_nntp)
  • Jython socket typecasting problems
    ... I try to port a server application to Jython. ... Currently I do face problems with casting the string "localhost" to the ... This is the code section of my server class (I cut this from a Python ...
    (comp.lang.python)
  • Re: E-Mail-Benachrichtigung funktioniert nimmer
    ... Ein Telnet vom WSUS Server auf Port 25 funktioniert einwandfrei. ... 5.7.1 Client does not have permissions to send as this sender ... emailLanguage, String smtpUserName, String senderEmailAddress, String ...
    (microsoft.public.de.exchange)
  • Einfaches TCP Socketservertool in C
    ... ich würde gerne einen Linux Shell Befehl "Warte auf Port X auf String Y" ... printf("\n Der Server wartet..."); ... Irgendwie funktioniert der Vergleich der empfangenen Zeichen mit dem String "tanga" nicht so wirklich. ...
    (de.comp.os.unix.programming)