ASP.NET : Sending mail fail :_COMPlusExceptionCode = -532459699
<p>I tried to send mail using my outlook account;it works well before deploying the Web site on the IIS but after deploying it always fail sending mail with this exception : _COMPlusExceptionCode = -532459699</p>

<p>here my code snippet:</p>

<pre><code> public static void SendEmail(string _ToEmail, string _Subject, string _EmailBody)
{
    try
    {
       Application oApp = new Application();

       NameSpace oNS = oApp.GetNamespace("mapi");

        oNS.Logon(Missing.Value, Missing.Value, false, true);

        Microsoft.Office.Interop.Outlook.MailItem email = (Microsoft.Office.Interop.Outlook.MailItem)(oApp.CreateItem(Microsoft.Office.Interop.Outlook.OlItemType.olMailItem));
        email.Recipients.Add(_ToEmail);
        email.Subject = _Subject;
        email.Body = _EmailBody;
        ((Microsoft.Office.Interop.Outlook.MailItem)email).Send();

    }
    catch (System.Exception)
    {

        throw;
    }

}
</code></pre>

<p>any help will be appreciated!</p>
