<?xml version="1.0" encoding="UTF-8"?><rss version="2.0"
	xmlns:content="http://purl.org/rss/1.0/modules/content/"
	xmlns:dc="http://purl.org/dc/elements/1.1/"
	xmlns:atom="http://www.w3.org/2005/Atom"
	xmlns:sy="http://purl.org/rss/1.0/modules/syndication/"
		>
<channel>
	<title>Comments on: Bypass Outlook security warnings when sending email messages in MS Access</title>
	<atom:link href="http://www.add-in-express.com/creating-addins-blog/2007/09/12/disable-outlook-security-warnings-sending-email-messages-in-access/feed/" rel="self" type="application/rss+xml" />
	<link>http://www.add-in-express.com/creating-addins-blog/2007/09/12/disable-outlook-security-warnings-sending-email-messages-in-access/</link>
	<description>All about developing COM add-ins, smart tags and RTD servers in Visual Studio .NET, VSTO and Delphi + Add-in Express</description>
	<lastBuildDate>Wed, 08 Feb 2012 13:13:05 +0000</lastBuildDate>
	<sy:updatePeriod>hourly</sy:updatePeriod>
	<sy:updateFrequency>1</sy:updateFrequency>
	<generator>http://wordpress.org/?v=3.2.1</generator>
	<item>
		<title>By: Andrei Smolin</title>
		<link>http://www.add-in-express.com/creating-addins-blog/2007/09/12/disable-outlook-security-warnings-sending-email-messages-in-access/comment-page-1/#comment-11614</link>
		<dc:creator>Andrei Smolin</dc:creator>
		<pubDate>Tue, 19 Jul 2011 06:41:08 +0000</pubDate>
		<guid isPermaLink="false">/creating-addins-blog/?p=25#comment-11614</guid>
		<description>You are welcome!</description>
		<content:encoded><![CDATA[<p>You are welcome!</p>
]]></content:encoded>
	</item>
	<item>
		<title>By: Saurabh</title>
		<link>http://www.add-in-express.com/creating-addins-blog/2007/09/12/disable-outlook-security-warnings-sending-email-messages-in-access/comment-page-1/#comment-11613</link>
		<dc:creator>Saurabh</dc:creator>
		<pubDate>Tue, 19 Jul 2011 06:06:00 +0000</pubDate>
		<guid isPermaLink="false">/creating-addins-blog/?p=25#comment-11613</guid>
		<description>Andrei, the code runs fine now. But the testing would take around a month&#039;s time as the pop up appears once in a month. Many thanks for your valueable replies. I will get back to you for my further concerns.</description>
		<content:encoded><![CDATA[<p>Andrei, the code runs fine now. But the testing would take around a month&#8217;s time as the pop up appears once in a month. Many thanks for your valueable replies. I will get back to you for my further concerns.</p>
]]></content:encoded>
	</item>
	<item>
		<title>By: Andrei Smolin</title>
		<link>http://www.add-in-express.com/creating-addins-blog/2007/09/12/disable-outlook-security-warnings-sending-email-messages-in-access/comment-page-1/#comment-11544</link>
		<dc:creator>Andrei Smolin</dc:creator>
		<pubDate>Fri, 15 Jul 2011 11:37:30 +0000</pubDate>
		<guid isPermaLink="false">/creating-addins-blog/?p=25#comment-11544</guid>
		<description>Saurabh,

Try the following code:

public void sendEMailThroughOUTLOOK()
{
    Outlook.Application oApp = null;
    SecurityManager m_ObjSM = null;
    Outlook._MailItem oMsg = null;
    Outlook.Recipients oRecips = null;
    Outlook.Recipient oRecip = null;
    try
    {
        oApp = new Outlook.Application();
        m_ObjSM = new SecurityManager();
        m_ObjSM.ConnectTo(oApp);
        m_ObjSM.DisableOOMWarnings = true;

        oMsg = (Outlook._MailItem)oApp.CreateItem(Outlook.OlItemType.olMailItem);
        oMsg.HTMLBody = &quot;Hello, This is a test mail !!!&quot;;
        oMsg.Subject = &quot;BMW Test&quot;;
        oRecips = (Outlook.Recipients)oMsg.Recipients;
        oRecip = (Outlook.Recipient)oRecips.Add(&quot;xxxxx@xxxxx-xx.com&quot;);
        oRecip.Resolve();
        oMsg.Send();
    }
    catch (Exception ex)
    {
        System.Windows.Forms.MessageBox.Show(ex.Message);
    }
    finally
    {
        if (oMsg != null) Marshal.ReleaseComObject(oMsg); oMsg = null;
        if (oRecip != null) Marshal.ReleaseComObject(oRecip); oRecip = null;
        if (oRecips != null) Marshal.ReleaseComObject(oRecips); oRecips = null;
        if (oApp != null)
        {
            if (m_ObjSM != null)
            {
                m_ObjSM.DisableOOMWarnings = false;
                m_ObjSM.Disconnect(oApp);
            }
            Marshal.ReleaseComObject(oApp); oApp = null;
        }
    }
}</description>
		<content:encoded><![CDATA[<p>Saurabh,</p>
<p>Try the following code:</p>
<p>public void sendEMailThroughOUTLOOK()<br />
{<br />
    Outlook.Application oApp = null;<br />
    SecurityManager m_ObjSM = null;<br />
    Outlook._MailItem oMsg = null;<br />
    Outlook.Recipients oRecips = null;<br />
    Outlook.Recipient oRecip = null;<br />
    try<br />
    {<br />
        oApp = new Outlook.Application();<br />
        m_ObjSM = new SecurityManager();<br />
        m_ObjSM.ConnectTo(oApp);<br />
        m_ObjSM.DisableOOMWarnings = true;</p>
<p>        oMsg = (Outlook._MailItem)oApp.CreateItem(Outlook.OlItemType.olMailItem);<br />
        oMsg.HTMLBody = &#8220;Hello, This is a test mail !!!&#8221;;<br />
        oMsg.Subject = &#8220;BMW Test&#8221;;<br />
        oRecips = (Outlook.Recipients)oMsg.Recipients;<br />
        oRecip = (Outlook.Recipient)oRecips.Add(&#8220;xxxxx@xxxxx-xx.com&#8221;);<br />
        oRecip.Resolve();<br />
        oMsg.Send();<br />
    }<br />
    catch (Exception ex)<br />
    {<br />
        System.Windows.Forms.MessageBox.Show(ex.Message);<br />
    }<br />
    finally<br />
    {<br />
        if (oMsg != null) Marshal.ReleaseComObject(oMsg); oMsg = null;<br />
        if (oRecip != null) Marshal.ReleaseComObject(oRecip); oRecip = null;<br />
        if (oRecips != null) Marshal.ReleaseComObject(oRecips); oRecips = null;<br />
        if (oApp != null)<br />
        {<br />
            if (m_ObjSM != null)<br />
            {<br />
                m_ObjSM.DisableOOMWarnings = false;<br />
                m_ObjSM.Disconnect(oApp);<br />
            }<br />
            Marshal.ReleaseComObject(oApp); oApp = null;<br />
        }<br />
    }<br />
}</p>
]]></content:encoded>
	</item>
	<item>
		<title>By: Saurabh</title>
		<link>http://www.add-in-express.com/creating-addins-blog/2007/09/12/disable-outlook-security-warnings-sending-email-messages-in-access/comment-page-1/#comment-11537</link>
		<dc:creator>Saurabh</dc:creator>
		<pubDate>Fri, 15 Jul 2011 06:16:11 +0000</pubDate>
		<guid isPermaLink="false">/creating-addins-blog/?p=25#comment-11537</guid>
		<description>One thing I want to tell is that we cannot make the outlook application as oApp.Quit. This will kill the outlook instance on the machine. We need to make it open all the time as other tasks are dependent on this.This there any other way to do this as we dont want to close the outlook process.
Can this problem which we are facing may be of network connection of the Microsoft Exchange Server ?</description>
		<content:encoded><![CDATA[<p>One thing I want to tell is that we cannot make the outlook application as oApp.Quit. This will kill the outlook instance on the machine. We need to make it open all the time as other tasks are dependent on this.This there any other way to do this as we dont want to close the outlook process.<br />
Can this problem which we are facing may be of network connection of the Microsoft Exchange Server ?</p>
]]></content:encoded>
	</item>
	<item>
		<title>By: Saurabh</title>
		<link>http://www.add-in-express.com/creating-addins-blog/2007/09/12/disable-outlook-security-warnings-sending-email-messages-in-access/comment-page-1/#comment-11533</link>
		<dc:creator>Saurabh</dc:creator>
		<pubDate>Fri, 15 Jul 2011 03:44:34 +0000</pubDate>
		<guid isPermaLink="false">/creating-addins-blog/?p=25#comment-11533</guid>
		<description>Thank you Andrei for your reply.
Let me follow your guidelines, I will get back to you for my further concerns.</description>
		<content:encoded><![CDATA[<p>Thank you Andrei for your reply.<br />
Let me follow your guidelines, I will get back to you for my further concerns.</p>
]]></content:encoded>
	</item>
	<item>
		<title>By: Andrei Smolin</title>
		<link>http://www.add-in-express.com/creating-addins-blog/2007/09/12/disable-outlook-security-warnings-sending-email-messages-in-access/comment-page-1/#comment-11521</link>
		<dc:creator>Andrei Smolin</dc:creator>
		<pubDate>Thu, 14 Jul 2011 13:53:41 +0000</pubDate>
		<guid isPermaLink="false">/creating-addins-blog/?p=25#comment-11521</guid>
		<description>First off, I modified your comment to hide your email address: as you probably know, spammers collect email addresses whenever possible. 

Please pay attention to the template code we provide at http://www.add-in-express.com/outlook-security/:

Dim SecurityManager As New AddinExpress.Outlook.SecurityManager  
SecurityManager.DisableOOMWarnings = True  
Try  
    &#039; ... any action with protected objects ...  
Finally  
    &#039; In any case please remember to turn on   
    &#039; Outlook Security after your code,   
    &#039; since now it is very easy to switch it off! :-)   
    SecurityManager.DisableOOMWarnings = False  
End Try  

A) You need to use the only Disable*Warnings property: the one corresponding to the way you access Outlook. since you do this via the Outlook object model, you need to use DisableOOMWarnings only; all other properties should be removed. 

B) You should allow the warnings in the finally clause.

In addition to the general case, your code could leave OUTLOOK.EXE hanging in the Task Manager window. I&#039;d suggest that you use oApp.Quit.</description>
		<content:encoded><![CDATA[<p>First off, I modified your comment to hide your email address: as you probably know, spammers collect email addresses whenever possible. </p>
<p>Please pay attention to the template code we provide at <a href="http://www.add-in-express.com/outlook-security/" rel="nofollow">http://www.add-in-express.com/outlook-security/</a>:</p>
<p>Dim SecurityManager As New AddinExpress.Outlook.SecurityManager<br />
SecurityManager.DisableOOMWarnings = True<br />
Try<br />
    &#8216; &#8230; any action with protected objects &#8230;<br />
Finally<br />
    &#8216; In any case please remember to turn on<br />
    &#8216; Outlook Security after your code,<br />
    &#8216; since now it is very easy to switch it off! :-)<br />
    SecurityManager.DisableOOMWarnings = False<br />
End Try  </p>
<p>A) You need to use the only Disable*Warnings property: the one corresponding to the way you access Outlook. since you do this via the Outlook object model, you need to use DisableOOMWarnings only; all other properties should be removed. </p>
<p>B) You should allow the warnings in the finally clause.</p>
<p>In addition to the general case, your code could leave OUTLOOK.EXE hanging in the Task Manager window. I&#8217;d suggest that you use oApp.Quit.</p>
]]></content:encoded>
	</item>
	<item>
		<title>By: Saurabh</title>
		<link>http://www.add-in-express.com/creating-addins-blog/2007/09/12/disable-outlook-security-warnings-sending-email-messages-in-access/comment-page-1/#comment-11518</link>
		<dc:creator>Saurabh</dc:creator>
		<pubDate>Thu, 14 Jul 2011 09:24:12 +0000</pubDate>
		<guid isPermaLink="false">/creating-addins-blog/?p=25#comment-11518</guid>
		<description>Thnak you for the immediate reply.
The code which i am using is:

public void sendEMailThroughOUTLOOK()
		{			
			Outlook.Application oApp=null;
			SecurityManager m_ObjSM=null;
			try
			{
				
				try
				{
					oApp = new Outlook.Application();		
					m_ObjSM = new SecurityManager(); 		
					m_ObjSM.ConnectTo(oApp); 
					m_ObjSM.DisableCDOWarnings = true; 
					m_ObjSM.DisableOOMWarnings = true; 
					m_ObjSM.DisableSMAPIWarnings = true; 	
				}
				catch (Exception ex1)
				{
					System.Windows.Forms.MessageBox.Show(ex1.Message);
				}				
				Outlook.NameSpace oNS = oApp.GetNamespace(&quot;mapi&quot;);				
				Outlook.MailItem oMsg = (Outlook.MailItem)oApp.CreateItem(Outlook.OlItemType.olMailItem);				
				oMsg.HTMLBody = &quot;Hello, This is a test mail !!!&quot;;
				oMsg.Subject = &quot;BMW Test&quot;;				
				Outlook.Recipients oRecips = (Outlook.Recipients)oMsg.Recipients;				
				Outlook.Recipient oRecip = (Outlook.Recipient)oRecips.Add(&quot;xxxxx@xxxxx-xx.com&quot;);				
				oRecip.Resolve();				
				oMsg.Send();
				
				oRecip = null;
				oRecips = null;
				oMsg = null;
				oApp = null;
			}
			catch (Exception ex)
			{
				System.Windows.Forms.MessageBox.Show(ex.Message);
			}
		}

Please suggest if i am missing anything.</description>
		<content:encoded><![CDATA[<p>Thnak you for the immediate reply.<br />
The code which i am using is:</p>
<p>public void sendEMailThroughOUTLOOK()<br />
		{<br />
			Outlook.Application oApp=null;<br />
			SecurityManager m_ObjSM=null;<br />
			try<br />
			{</p>
<p>				try<br />
				{<br />
					oApp = new Outlook.Application();<br />
					m_ObjSM = new SecurityManager();<br />
					m_ObjSM.ConnectTo(oApp);<br />
					m_ObjSM.DisableCDOWarnings = true;<br />
					m_ObjSM.DisableOOMWarnings = true;<br />
					m_ObjSM.DisableSMAPIWarnings = true;<br />
				}<br />
				catch (Exception ex1)<br />
				{<br />
					System.Windows.Forms.MessageBox.Show(ex1.Message);<br />
				}<br />
				Outlook.NameSpace oNS = oApp.GetNamespace(&#8220;mapi&#8221;);<br />
				Outlook.MailItem oMsg = (Outlook.MailItem)oApp.CreateItem(Outlook.OlItemType.olMailItem);<br />
				oMsg.HTMLBody = &#8220;Hello, This is a test mail !!!&#8221;;<br />
				oMsg.Subject = &#8220;BMW Test&#8221;;<br />
				Outlook.Recipients oRecips = (Outlook.Recipients)oMsg.Recipients;<br />
				Outlook.Recipient oRecip = (Outlook.Recipient)oRecips.Add(&#8220;xxxxx@xxxxx-xx.com&#8221;);<br />
				oRecip.Resolve();<br />
				oMsg.Send();</p>
<p>				oRecip = null;<br />
				oRecips = null;<br />
				oMsg = null;<br />
				oApp = null;<br />
			}<br />
			catch (Exception ex)<br />
			{<br />
				System.Windows.Forms.MessageBox.Show(ex.Message);<br />
			}<br />
		}</p>
<p>Please suggest if i am missing anything.</p>
]]></content:encoded>
	</item>
	<item>
		<title>By: Andrei Smolin</title>
		<link>http://www.add-in-express.com/creating-addins-blog/2007/09/12/disable-outlook-security-warnings-sending-email-messages-in-access/comment-page-1/#comment-11516</link>
		<dc:creator>Andrei Smolin</dc:creator>
		<pubDate>Thu, 14 Jul 2011 07:21:40 +0000</pubDate>
		<guid isPermaLink="false">/creating-addins-blog/?p=25#comment-11516</guid>
		<description>Hi Saurabh,

You can send me your code for review: please find the support email address in {Security Manager installation folder}\readme.txt. The business logic and sencitive info can be removed; I&#039;ll need to look at ALL Outlook-related code, however.</description>
		<content:encoded><![CDATA[<p>Hi Saurabh,</p>
<p>You can send me your code for review: please find the support email address in {Security Manager installation folder}\readme.txt. The business logic and sencitive info can be removed; I&#8217;ll need to look at ALL Outlook-related code, however.</p>
]]></content:encoded>
	</item>
	<item>
		<title>By: Saurabh</title>
		<link>http://www.add-in-express.com/creating-addins-blog/2007/09/12/disable-outlook-security-warnings-sending-email-messages-in-access/comment-page-1/#comment-11515</link>
		<dc:creator>Saurabh</dc:creator>
		<pubDate>Thu, 14 Jul 2011 06:55:34 +0000</pubDate>
		<guid isPermaLink="false">/creating-addins-blog/?p=25#comment-11515</guid>
		<description>Hi, i am using this component to restrict the security warnings in my code. But once in a month i got this pop up. Can you please help me in this regard ?
What other thing i need to do ? Earlier i used to get many warnings but after deploying this code the problem gets 99.9 % solved but .1 is still there.</description>
		<content:encoded><![CDATA[<p>Hi, i am using this component to restrict the security warnings in my code. But once in a month i got this pop up. Can you please help me in this regard ?<br />
What other thing i need to do ? Earlier i used to get many warnings but after deploying this code the problem gets 99.9 % solved but .1 is still there.</p>
]]></content:encoded>
	</item>
	<item>
		<title>By: Andrei Smolin</title>
		<link>http://www.add-in-express.com/creating-addins-blog/2007/09/12/disable-outlook-security-warnings-sending-email-messages-in-access/comment-page-1/#comment-9993</link>
		<dc:creator>Andrei Smolin</dc:creator>
		<pubDate>Wed, 01 Sep 2010 12:34:59 +0000</pubDate>
		<guid isPermaLink="false">/creating-addins-blog/?p=25#comment-9993</guid>
		<description>Larry,

Ususally, that line produces an exception if the Security Manager isn&#039;t registered on the target PC. Please find more info about deploying Outlook Security Manager at &lt;a href=&quot;http://www.add-in-express.com/creating-addins-blog/2010/06/16/outlook-security-manager2010-deployment/&quot; rel=&quot;nofollow&quot;&gt;Outlook Security Manager 2010 deployment: Summary&lt;/a&gt;.

If you develop an add-in than you will not see security warnings in Outlook 2007 provided that you have an antivirus software installed. 

However, there are other scenarios in which you&#039;ll need to use Security Manager. Say, an Exchange administrator can use some settings that cause your code to produce warnings when accessing Outlook.Namespace.CurrentUser. You can find if this is your case by looking at the About window of your Outlook; it displays either &quot;Security Mode: Default&quot; or &quot;Security Mode: Administrator controlled&quot;.

You can send me extra details about the issue to the support e-mail address (see readme.txt or use any contact form on the web site).</description>
		<content:encoded><![CDATA[<p>Larry,</p>
<p>Ususally, that line produces an exception if the Security Manager isn&#8217;t registered on the target PC. Please find more info about deploying Outlook Security Manager at <a href="http://www.add-in-express.com/creating-addins-blog/2010/06/16/outlook-security-manager2010-deployment/" rel="nofollow">Outlook Security Manager 2010 deployment: Summary</a>.</p>
<p>If you develop an add-in than you will not see security warnings in Outlook 2007 provided that you have an antivirus software installed. </p>
<p>However, there are other scenarios in which you&#8217;ll need to use Security Manager. Say, an Exchange administrator can use some settings that cause your code to produce warnings when accessing Outlook.Namespace.CurrentUser. You can find if this is your case by looking at the About window of your Outlook; it displays either &#8220;Security Mode: Default&#8221; or &#8220;Security Mode: Administrator controlled&#8221;.</p>
<p>You can send me extra details about the issue to the support e-mail address (see readme.txt or use any contact form on the web site).</p>
]]></content:encoded>
	</item>
</channel>
</rss>

