locked
Send email RRS feed

  • Question

  • Hi

    I am sending email on different cloud hosting on windows 2003 server and all works fine

    MailMessage mailObj = new MailMessage(
                txtFrom.Text, txtTo.Text, txtSubject.Text, txtBody.Text);
            SmtpClient SMTPServer = new SmtpClient("localhost");

    Now on windows 2008 r2 vm server I get below. I have installed the smtp server role.

    Any help would be most appreciated

    A first chance exception of type 'System.Security.SecurityException' occurred in System.dll

    A first chance exception of type 'System.Net.Mail.SmtpFailedRecipientException' occurred in System.dll

    A first chance exception of type 'System.Security.SecurityException' occurred in System.dll

    A first chance exception of type 'System.Net.Mail.SmtpFailedRecipientException' occurred in System.dll

    A first chance exception of type 'System.Security.SecurityException' occurred in System.dll

    A first chance exception of type 'System.Net.Mail.SmtpFailedRecipientException' occurred in System.dll

    Tuesday, October 23, 2012 7:19 AM

Answers