none
sending mail from local smtp server from local host............

    Pregunta

  • hello to all.......,,,,,

                      I am working on window server 2008.I configured smtp server on local host.now when I am sending mail from asp.net code using my smtp server to gmail its working fine.but when I send to yahoo it takes vary much time to recieve at yahoo mail but it working.

    now the problem is when I send email to my company id eg "demo@eevergreen.in" it shows mail send there is no any error.but it never reach at that ID .where could be problem please guide me.........

    thanx....

    code is

            SmtpClient smtp = new SmtpClient();
            MailMessage msg = new MailMessage();
            try
            {

                smtp.UseDefaultCredentials = true;

     msg.From = new MailAddress(TextBox2.Text);

    msg.To.Add("demo@eevergreen.in");

    smtp.DeliveryMethod = SmtpDeliveryMethod.Network;

     msg.CC.Add("info@eevergreen.in");

    msg.Body = TextBox3.Text;
                msg.Subject = "feedback";

     smtp.Host = "172.16.13.2";

    smtp.Port = 587;
                //smtp.Port = 25;
                smtp.Send(msg);
                Label5.Text = "mail send";
                smtp.EnableSsl = false;

            }
            catch(Exception c)
                {
                    Label5.Text=c.Message;
                }

    viernes, 15 de junio de 2012 9:40

Respuestas

  • Hi,

    Towards the internal SMTP mail flow testing, generally speaking, we use Telnet command to do the testing; there is a link for your reference:

    Title: Use Telnet to Test SMTP Communication
    URL: http://technet.microsoft.com/en-us/library/bb123686.aspx

    Note: You need to enable the telnet feature on your server before using the command.

    Of course, you could use one command in the Windows PowerShell to send mail:

    Send-mailmessage -from "User01 <user01@example.com>" -to "User02 <user02@example.com>", "User03 <user03@examp
    le.com>" -subject "Sending the Attachment" -body "Forgot to send the attachment. Sending now." -Attachment "data.cs
    v" -priority High -dno onSuccess, onFailure -smtpServer smtp.fabrikam.com

    If you have any inquiry about the scripting, I think you could ask your inquiry in the following forum:

    Title: The Official Scripting Guys Forum!
    URL: http://social.technet.microsoft.com/Forums/pl-pl/ITCG/threads

    Regards,
    James


    James Xiong

    TechNet Community Support

    lunes, 18 de junio de 2012 5:59

Todas las respuestas

  • Hello:

    You have posted to a forum dedicated to Small Business Server.  Perhaps your question might be more appropriate in a forum dedicated to the particular coding language you are using.  Otoh, there are some very smart people here, some of whom may recognize the difficulty you encountered.


    Larry Struckmeyer[SBS-MVP]

    viernes, 15 de junio de 2012 10:28
  • Is this SBS 2008 or normal Server 2008?

    Robert Pearman SBS MVP (2011) | www.titlerequired.com | www.itauthority.co.uk

    viernes, 15 de junio de 2012 19:49
  • The OP asked a similar question in a thread a few days ago but doesn't seem to want to tell us if this even involves SBS.

    Steve

    viernes, 15 de junio de 2012 22:17
  • Hi,

    Towards the internal SMTP mail flow testing, generally speaking, we use Telnet command to do the testing; there is a link for your reference:

    Title: Use Telnet to Test SMTP Communication
    URL: http://technet.microsoft.com/en-us/library/bb123686.aspx

    Note: You need to enable the telnet feature on your server before using the command.

    Of course, you could use one command in the Windows PowerShell to send mail:

    Send-mailmessage -from "User01 <user01@example.com>" -to "User02 <user02@example.com>", "User03 <user03@examp
    le.com>" -subject "Sending the Attachment" -body "Forgot to send the attachment. Sending now." -Attachment "data.cs
    v" -priority High -dno onSuccess, onFailure -smtpServer smtp.fabrikam.com

    If you have any inquiry about the scripting, I think you could ask your inquiry in the following forum:

    Title: The Official Scripting Guys Forum!
    URL: http://social.technet.microsoft.com/Forums/pl-pl/ITCG/threads

    Regards,
    James


    James Xiong

    TechNet Community Support

    lunes, 18 de junio de 2012 5:59