IIS C# : Some times Mail goes straight a way in to Queue Folder in no time

Started by nomad, Jun 26, 2009, 10:59 AM

Previous topic - Next topic

nomad

Test Case One :
Quote
<system.net>
    <mailSettings>
      <smtp>
        <network host="127.0.0.1" defaultCredentials="true" userName="*******" password="*******"/>
      </smtp>
    </mailSettings>
  </system.net>
Test Case Two :

Quoteprotected void Button2_Click(object sender, EventArgs e)
    {
        try
        {
            MailMessage mail = new MailMessage();
            mail.From = new MailAddress(TextBox1.Text);
            mail.To.Add(TextBox2.Text);
            mail.Subject = TextBox4.Text;
            mail.Body = TextBox5.Text;

            SmtpClient mailClient = new SmtpClient();
           //mailclient.host="127.0.0.1";
            mailClient.Send(mail);
           
        }
        catch (Exception er)
        {
            Label4.Text = er.Message;
        }
    }

Mail Sending Programm Works But SMTP Fails to send mail .. it Works randomly.. ( i got mail few times from the code )
But it works Randomly. Some times Mail goes straight a way in to Queue Folder in no time . Why is that Happens ?

can some explain me how SMTP send mails to Other Servers ?

Quick Reply

Warning: this topic has not been posted in for at least 120 days.
Unless you're sure you want to reply, please consider starting a new topic.

Note: this post will not display until it has been approved by a moderator.

Name:
Email:
Verification:
Please leave this box empty:
Type the letters shown in the picture
Listen to the letters / Request another image

Type the letters shown in the picture:

Shortcuts: ALT+S post or ALT+P preview