none
Disable Outlook Security Question RRS feed

  • Question

  • Hi,
    I will send an E-Mail via a c# Program....

            private void button1_Click(object sender, RoutedEventArgs e)
            {
                try
                {
    
                    Outlook.Application oApp = new Outlook.Application();
                    Outlook.MailItem oMsg = (Outlook.MailItem)oApp.CreateItem(Outlook.OlItemType.olMailItem);
                    Outlook.Recipient oRecip = (Outlook.Recipient)oMsg.Recipients.Add(textBoxAn.Text);
                    oRecip.Resolve();
                    oMsg.Subject = textBoxUeberschrift.Text;
                    oMsg.Body = textBoxMailText.Text;
                    oMsg.CC = textBoxCC.Text;
                    oMsg.BCC = textBoxBC.Text;
                    oMsg.Save();
                    oMsg.Send();
                    oRecip = null;
                    oMsg = null;
                    oApp = null;
                }
                catch
                {
                   // Abbruch....
                }
    
            }
        }
    So far so good...
    After the "oMsg.Send();" is comming up an outlook security question...

    Thats what the customer not will see..

    There must be a way WITOUT any extern Tools to disable this question...

    Bernd

    Thursday, October 22, 2009 3:58 PM

Answers

All replies

  • Bernd,

    you simply cannot sent email via outlook programmatically without the security question. you could, however, use the mailmessage class that comes with the framework to send mail w/o any security dialogs.

    WM_HOPETHISHELPS
    -thomas woelfer
    http://www.die.de/blog
    Thursday, October 22, 2009 5:23 PM
  • Thats not realy right......

    Because there are some tools where you can switch off the hints notice and message boxes
    in the time where you send an e-mail.

    But for that you mus pay and install something....
    So there must be a way for it...

    Best Regards

    Bernd
    Friday, October 23, 2009 5:53 AM
  • Hello

    The article http://office.microsoft.com/en-us/outlook/HA012299431033.aspx explains the security warning and its resolution in detail. Please check if the solutions work for your customer's enviroment. I also found on the internet some third party solutions, but I have never tried them by myself.
    http://www.contextmagic.com/express-clickyes/
    http://www.mapilab.com/outlook/security

    MailMessage mentioned by Thomas is a possible alternative. It utilizes SMTP to send the email. You can find the working and well-documented samples of SMTP in my team's sample code project: All-In-One Code Framework (http://cfx.codeplex.com). Please check out the CSSMTPSendEmail sample.

    If you have any other questions, please feel free to post here.

    This response contains a reference to a third party World Wide Web site. Microsoft is providing this information as a convenience to you. Microsoft does not control these sites and has not tested any software or information found on these sites; therefore, Microsoft cannot make any representations regarding the quality, safety, or suitability of any software or information found there. There are inherent dangers in the use of any software found on the Internet, and Microsoft cautions you to make sure that you completely understand the risk before retrieving any software from the Internet.

    Regards,
    Jialiang Ge
    Please remember to mark the replies as answers if they help and unmark them if they provide no help.
    Welcome to the All-In-One Code Framework! If you have any feedback, please tell us.
    Friday, October 23, 2009 5:57 AM
    Moderator
  • I can not find the "CSSMTPSendEmail" on the side...

    I found the small programs (tools) too but for this you must pay or install more then your own software...


    Best Regards

    Bernd
    Friday, October 23, 2009 6:18 AM
  • Hello Bernd

    Have you checked out the solutions mentioned in http://office.microsoft.com/en-us/outlook/HA012299431033.aspx ?

    To get the CSSMTPSendEmail sample, please download the main package from http://cfx.codeplex.com/Release/ProjectReleases.aspx. The sample is in the folder \CodeFx\Visual Studio 2008\CSSMTPSendEmail.

    Regards,
    Jialiang Ge
    Please remember to mark the replies as answers if they help and unmark them if they provide no help.
    Welcome to the All-In-One Code Framework! If you have any feedback, please tell us.
    • Marked as answer by Bernd Riemke Friday, October 23, 2009 7:04 AM
    Friday, October 23, 2009 6:32 AM
    Moderator