none
Outlook.Application opening New mail item on web server instead of opening in remote machine. RRS feed

  • Question

  • I am writing a C# code to send outlook messages from web site. i deployed the code on web server (windows server 2008) and when i am opening the site from remote machine its asking outlook Allow or Deny permission on web server instead of asking on remote machine.

    • Edited by bhagann1 Wednesday, July 11, 2012 8:32 AM
    Wednesday, July 11, 2012 8:26 AM

Answers

  • i guess youe exchange is not configured to allow smtp-like communication. Either configure it so or use EWS to send mails.
    Thursday, July 12, 2012 8:44 AM

All replies

  • no office apps (outlook included) should be automated from inside web server process. Rewrite your code to send mails using for example System.Net.Mail or Exchange web services (if you are using exchange)
    Wednesday, July 11, 2012 1:48 PM
  • I dont have SMTP server. i have exchange server. i have implemented code for sending mails through exchange server. its giving me error as below,

    "A connection attempt failed because the connected party did not properly respond after a period of time, or established connection failed because connected host has failed to respond 10.136.68.57:25 "

    My code is as below:

    System.Net.Mail.

    MailMessage message = new System.Net.Mail.MailMessage();

    message.To.Add(System.Web.Configuration.

    WebConfigurationManager.AppSettings["RecipientMailIds"]);

    message.Subject = "Subject";

    message.From =

    new System.Net.Mail.MailAddress("<<Emailid>>");

    message.Body = sBody;

    message.IsBodyHtml = true;

    SmtpClient smtp = new SmtpClient("<<ExchangeServerName>>",25);

    smtp.EnableSsl = false;

    smtp.UseDefaultCredentials = true;

    smtp.Send(message);


    bhagann1

    Thursday, July 12, 2012 8:08 AM
  • i guess youe exchange is not configured to allow smtp-like communication. Either configure it so or use EWS to send mails.
    Thursday, July 12, 2012 8:44 AM