<?xml version="1.0" encoding="UTF-8" ?>
<?xml-stylesheet type="text/xsl" href="https://www.infopathdev.com:443/utility/FeedStylesheets/rss.xsl" media="screen"?><rss version="2.0" xmlns:dc="http://purl.org/dc/elements/1.1/" xmlns:slash="http://purl.org/rss/1.0/modules/slash/" xmlns:wfw="http://wellformedweb.org/CommentAPI/"><channel><title>So you want to send an email.....</title><link>https://www.infopathdev.com:443/blogs/hilary/archive/2008/08/24/so-you-want-to-send-an-email.aspx</link><description>There are two very common email scenarios with InfoPath. One -- you want to use an email submit connection but modify some things before the email goes out (common reasons: you&amp;#39;d like to use form fields in the Information section which is not currently</description><dc:language>en</dc:language><generator>CommunityServer 2007 SP3 (Build: 31118.962)</generator><item><title>re: So you want to send an email.....</title><link>https://www.infopathdev.com:443/blogs/hilary/archive/2008/08/24/so-you-want-to-send-an-email.aspx#100002</link><pubDate>Tue, 11 Nov 2014 03:53:53 GMT</pubDate><guid isPermaLink="false">033a2e2d-04e2-4a9d-be01-a4634161eefd:100002</guid><dc:creator>ShahC</dc:creator><description>&lt;p&gt;Hi Hilary,&lt;/p&gt;
&lt;p&gt;Is it possible to send a section of the infopath form (as is) and not just the data values using SMTP?&lt;/p&gt;
&lt;img src="https://www.infopathdev.com:443/aggbug.aspx?PostID=100002" width="1" height="1"&gt;</description></item><item><title>re: So you want to send an email.....</title><link>https://www.infopathdev.com:443/blogs/hilary/archive/2008/08/24/so-you-want-to-send-an-email.aspx#87658</link><pubDate>Tue, 05 Mar 2013 01:39:10 GMT</pubDate><guid isPermaLink="false">033a2e2d-04e2-4a9d-be01-a4634161eefd:87658</guid><dc:creator>Hilary Stoupa</dc:creator><description>&lt;p&gt;I'm not at all sure how you'd go about sending the email 7 days after the form is completed. I wonder if there might be a way using SharePoint Workflow?&lt;/p&gt;
&lt;img src="https://www.infopathdev.com:443/aggbug.aspx?PostID=87658" width="1" height="1"&gt;</description></item><item><title>re: So you want to send an email.....</title><link>https://www.infopathdev.com:443/blogs/hilary/archive/2008/08/24/so-you-want-to-send-an-email.aspx#86676</link><pubDate>Sun, 03 Feb 2013 22:52:18 GMT</pubDate><guid isPermaLink="false">033a2e2d-04e2-4a9d-be01-a4634161eefd:86676</guid><dc:creator>MDSenoj</dc:creator><description>&lt;p&gt;*forgot to mention I'm trying to accomplish Scenario 2 - I just want to send the email from Outlook using some of the data from the form. &amp;nbsp;&lt;/p&gt;
&lt;p&gt;AND, as if things aren't complex enough, I would like to send the email 7 days after the date the form is completed. &lt;/p&gt;
&lt;img src="https://www.infopathdev.com:443/aggbug.aspx?PostID=86676" width="1" height="1"&gt;</description></item><item><title>re: So you want to send an email.....</title><link>https://www.infopathdev.com:443/blogs/hilary/archive/2008/08/24/so-you-want-to-send-an-email.aspx#86675</link><pubDate>Sun, 03 Feb 2013 22:49:17 GMT</pubDate><guid isPermaLink="false">033a2e2d-04e2-4a9d-be01-a4634161eefd:86675</guid><dc:creator>MDSenoj</dc:creator><description>&lt;p&gt;Hi Hilary, I'm trying to use this code in IR 2010 with VSTA and would like to use Exchange and Outlook email instead of SMTP. &lt;/p&gt;
&lt;p&gt;Can you show me how it would be done in that situation?&lt;/p&gt;
&lt;p&gt;Thanks!&lt;/p&gt;
&lt;img src="https://www.infopathdev.com:443/aggbug.aspx?PostID=86675" width="1" height="1"&gt;</description></item><item><title>re: So you want to send an email.....</title><link>https://www.infopathdev.com:443/blogs/hilary/archive/2008/08/24/so-you-want-to-send-an-email.aspx#73372</link><pubDate>Sat, 31 Dec 2011 00:13:58 GMT</pubDate><guid isPermaLink="false">033a2e2d-04e2-4a9d-be01-a4634161eefd:73372</guid><dc:creator>Hilary Stoupa</dc:creator><description>&lt;p&gt;Hi, Sam - I am really bad about checking my blog posts for comments, sorry about that. &lt;/p&gt;
&lt;p&gt;The code sample does include getting the &amp;quot;from&amp;quot; address - you just need to get the value from your field - something like:&lt;/p&gt;
&lt;p&gt;this.MainDataSource.CreateNavigator().SelectSingleNode(&amp;quot;yourXPath&amp;quot;, NamespaceManager).Value&lt;/p&gt;
&lt;img src="https://www.infopathdev.com:443/aggbug.aspx?PostID=73372" width="1" height="1"&gt;</description></item><item><title>re: So you want to send an email.....</title><link>https://www.infopathdev.com:443/blogs/hilary/archive/2008/08/24/so-you-want-to-send-an-email.aspx#69942</link><pubDate>Thu, 01 Sep 2011 17:07:25 GMT</pubDate><guid isPermaLink="false">033a2e2d-04e2-4a9d-be01-a4634161eefd:69942</guid><dc:creator>Sam R</dc:creator><description>&lt;p&gt;In scenario 2, is there a way code for the From: email field to pull from an email address entered in the InfoPath form or to use Outlook email address of the person completing the form?&lt;/p&gt;
&lt;p&gt;If not, are there any other coding options that would enable users to save the completed InfoPath form to a shared drive and then email a link with the address to the completed form to a set email address? &lt;/p&gt;
&lt;p&gt;The issue we're having is we cannot email the InfoPath form as an attachment because it is getting embedded in the email by Outlook 2007 and then the form can't be displayed by application receiving the email. &lt;/p&gt;
&lt;p&gt;Thanks for your excellent tutotial! &lt;/p&gt;
&lt;img src="https://www.infopathdev.com:443/aggbug.aspx?PostID=69942" width="1" height="1"&gt;</description></item><item><title>re: So you want to send an email.....</title><link>https://www.infopathdev.com:443/blogs/hilary/archive/2008/08/24/so-you-want-to-send-an-email.aspx#65724</link><pubDate>Mon, 04 Apr 2011 18:39:12 GMT</pubDate><guid isPermaLink="false">033a2e2d-04e2-4a9d-be01-a4634161eefd:65724</guid><dc:creator>Hilary Stoupa</dc:creator><description>&lt;p&gt;Hey, sudheshdessai:&lt;/p&gt;
&lt;p&gt;You need to change the trust level of your form.&lt;/p&gt;
&lt;img src="https://www.infopathdev.com:443/aggbug.aspx?PostID=65724" width="1" height="1"&gt;</description></item><item><title>Submit Email | AllGraphicsOnline.com</title><link>https://www.infopathdev.com:443/blogs/hilary/archive/2008/08/24/so-you-want-to-send-an-email.aspx#65705</link><pubDate>Sun, 03 Apr 2011 03:27:54 GMT</pubDate><guid isPermaLink="false">033a2e2d-04e2-4a9d-be01-a4634161eefd:65705</guid><dc:creator>Submit Email | AllGraphicsOnline.com</dc:creator><description>&lt;p&gt;Pingback from &amp;nbsp;Submit Email | AllGraphicsOnline.com&lt;/p&gt;
&lt;img src="https://www.infopathdev.com:443/aggbug.aspx?PostID=65705" width="1" height="1"&gt;</description></item><item><title>re: So you want to send an email.....</title><link>https://www.infopathdev.com:443/blogs/hilary/archive/2008/08/24/so-you-want-to-send-an-email.aspx#65127</link><pubDate>Mon, 14 Mar 2011 09:09:16 GMT</pubDate><guid isPermaLink="false">033a2e2d-04e2-4a9d-be01-a4634161eefd:65127</guid><dc:creator>sudheshdessai</dc:creator><description>&lt;p&gt;Hi Hilary &lt;/p&gt;
&lt;p&gt;I am getting an error at the object smtpclient object creation with no parameter.&lt;/p&gt;
&lt;p&gt;Dim smtpClient as SmtpClient = new SmtpClient()&lt;/p&gt;
&lt;p&gt;Below is the error:&lt;/p&gt;
&lt;p&gt;System.Security.SecurityException was unhandled by user code&lt;/p&gt;
&lt;p&gt; &amp;nbsp;GrantedSet=&amp;quot;&amp;lt;PermissionSet class=&amp;quot;System.Security.PermissionSet&amp;quot; version=&amp;quot;1&amp;quot;&amp;gt; &amp;lt;IPermission class=&amp;quot;System.Security.Permissions.EnvironmentPermission, mscorlib, Version=2.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089&amp;quot; version=&amp;quot;1&amp;quot; Read=&amp;quot;USERNAME&amp;quot;/&amp;gt; &amp;lt;IPermission class=&amp;quot;System.Security.Permissions.FileDialogPermission, mscorlib, Version=2.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089&amp;quot; version=&amp;quot;1&amp;quot; Unrestricted=&amp;quot;true&amp;quot;/&amp;gt; &amp;lt;IPermission class=&amp;quot;System.Security.Permissions.FileIOPermission, mscorlib, Version=2.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089&amp;quot; version=&amp;quot;1&amp;quot; Read=&amp;quot;\\xx.xxx.NET\USERS\xxxxx\Visual Studio 2008\Projects\InfoPathFormTemplate1\InfoPathFormTemplate1\InfoPath Form Template\&amp;quot; PathDiscovery=&amp;quot;\\xxx.xxx.NET\USERS\xxx\Visual Studio 2008\Projects\InfoPathFormTemplate1\InfoPathFormTemplate1\InfoPath Form Template\&amp;quot;/&amp;gt; &amp;lt;IPermission class=&amp;quot;System.Security.Permissions.IsolatedStorageFilePermission, mscorlib, Version=2.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089&amp;quot; version=&amp;quot;1&amp;quot; Allowed=&amp;quot;AssemblyIsolationByUser&amp;quot; UserQuota=&amp;quot;9223372036854775807&amp;quot; Expiry=&amp;quot;9223372036854775807&amp;quot; Permanent=&amp;quot;True&amp;quot;/&amp;gt; &amp;lt;IPermission class=&amp;quot;System.Security.Permissions.ReflectionPermission, mscorlib, Version=2.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089&amp;quot; version=&amp;quot;1&amp;quot; Flags=&amp;quot;ReflectionEmit&amp;quot;/&amp;gt; &amp;lt;IPermission class=&amp;quot;System.Security.Permissions.SecurityPermission, mscorlib, Version=2.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089&amp;quot; version=&amp;quot;1&amp;quot; Flags=&amp;quot;Assertion, Execution, BindingRedirects&amp;quot;/&amp;gt; &amp;lt;IPermission class=&amp;quot;System.Security.Permissions.UIPermission, mscorlib, Version=2.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089&amp;quot; version=&amp;quot;1&amp;quot; Unrestricted=&amp;quot;true&amp;quot;/&amp;gt; &amp;lt;IPermission class=&amp;quot;System.Security.Permissions.UrlIdentityPermission, mscorlib, Version=2.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089&amp;quot; version=&amp;quot;1&amp;quot; Url=&amp;quot;file:///\\xxxxFS01.xxx.net\users\xxxx\Visual%20Studio%202008\Projects\InfoPathFormTemplate1\InfoPathFormTemplate1\InfoPath%20Form%20Template\manifest.xsf&amp;quot;/&amp;gt; &amp;lt;IPermission class=&amp;quot;System.Security.Permissions.ZoneIdentityPermission, mscorlib, Version=2.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089&amp;quot; version=&amp;quot;1&amp;quot; Zone=&amp;quot;Intranet&amp;quot;/&amp;gt; &amp;lt;IPermission class=&amp;quot;System.Net.DnsPermission, System, Version=2.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089&amp;quot; version=&amp;quot;1&amp;quot; Unrestricted=&amp;quot;true&amp;quot;/&amp;gt; &amp;lt;IPermission class=&amp;quot;System.Drawing.Printing.PrintingPermission, System.Drawing, Version=2.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a&amp;quot; version=&amp;quot;1&amp;quot; Level=&amp;quot;DefaultPrinting&amp;quot;/&amp;gt; &amp;lt;IPermission class=&amp;quot;Microsoft.Office.InfoPath.InfoPathPermission, Microsoft.Office.InfoPath.Client.Internal.Host, Version=12.0.0.0, Culture=neutral, PublicKeyToken=71e9bce111e9429c&amp;quot; version=&amp;quot;1&amp;quot; Unrestricted=&amp;quot;true&amp;quot;/&amp;gt; &amp;lt;/PermissionSet&amp;gt; &amp;quot;&lt;/p&gt;
&lt;p&gt; &amp;nbsp;Message=&amp;quot;Request for the permission of type 'System.Net.Mail.SmtpPermission, System, Version=2.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089' failed.&amp;quot;&lt;/p&gt;
&lt;p&gt; &amp;nbsp;PermissionState=&amp;quot;&amp;lt;IPermission class=&amp;quot;System.Net.Mail.SmtpPermission, System, Version=2.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089&amp;quot; version=&amp;quot;1&amp;quot; Access=&amp;quot;Connect&amp;quot;/&amp;gt; &amp;quot;&lt;/p&gt;
&lt;p&gt; &amp;nbsp;RefusedSet=&amp;quot;&amp;quot;&lt;/p&gt;
&lt;p&gt; &amp;nbsp;Source=&amp;quot;mscorlib&amp;quot;&lt;/p&gt;
&lt;p&gt; &amp;nbsp;Url=&amp;quot;file:///C:/Documents and Settings/suddes/Local Settings/Application Data/Microsoft/InfoPath/FormCache2/FFF9F835.D5C/cf2c34269087d44d$7695a4fd7ac888c1/InfoPathFormTemplate1.DLL&amp;quot;&lt;/p&gt;
&lt;p&gt; &amp;nbsp;StackTrace:&lt;/p&gt;
&lt;p&gt; &amp;nbsp; &amp;nbsp; &amp;nbsp; at System.Security.CodeAccessSecurityEngine.Check(Object demand, StackCrawlMark&amp;amp; stackMark, Boolean isPermSet) &amp;nbsp; &amp;nbsp;at System.Security.CodeAccessPermission.Demand() &amp;nbsp; &amp;nbsp;at System.Net.Mail.SmtpClient.Initialize() &amp;nbsp; &amp;nbsp;at System.Net.Mail.SmtpClient..ctor() &amp;nbsp; &amp;nbsp;at InfoPathFormTemplate1.FormCode.Submit_Clicked(Object sender, ClickedEventArgs e) &amp;nbsp; &amp;nbsp;at Microsoft.Office.InfoPath.Internal.ButtonEventHost.OnButtonClick(DocActionEvent pEvent) &amp;nbsp; &amp;nbsp;at Microsoft.Office.Interop.InfoPath.SemiTrust._ButtonEventSink_SinkHelper.OnClick(DocActionEvent pEvent)&lt;/p&gt;
&lt;p&gt; &amp;nbsp;InnerException: &lt;/p&gt;
&lt;img src="https://www.infopathdev.com:443/aggbug.aspx?PostID=65127" width="1" height="1"&gt;</description></item><item><title>re: So you want to send an email.....</title><link>https://www.infopathdev.com:443/blogs/hilary/archive/2008/08/24/so-you-want-to-send-an-email.aspx#64118</link><pubDate>Thu, 10 Feb 2011 19:28:40 GMT</pubDate><guid isPermaLink="false">033a2e2d-04e2-4a9d-be01-a4634161eefd:64118</guid><dc:creator>Hilary Stoupa</dc:creator><description>&lt;p&gt;You are going to need an XPathNodeIterator. Take a quick peek at the MSDN docs on that, or search this forum, and you should find some help....&lt;/p&gt;
&lt;img src="https://www.infopathdev.com:443/aggbug.aspx?PostID=64118" width="1" height="1"&gt;</description></item><item><title>re: So you want to send an email.....</title><link>https://www.infopathdev.com:443/blogs/hilary/archive/2008/08/24/so-you-want-to-send-an-email.aspx#63875</link><pubDate>Fri, 04 Feb 2011 11:43:34 GMT</pubDate><guid isPermaLink="false">033a2e2d-04e2-4a9d-be01-a4634161eefd:63875</guid><dc:creator>DXXPublic</dc:creator><description>&lt;p&gt;Hi Hilary,&lt;/p&gt;
&lt;p&gt;After days and days of &amp;nbsp;looking for a solution i bumped into this WONDERFUL link and 90% of my issues dissapeared &amp;nbsp;:) ... Everything is working great, BUT since im using a repeatable Table it always uses the information of the 1st table. &amp;nbsp;Would you help me with this please?&lt;/p&gt;
&lt;img src="https://www.infopathdev.com:443/aggbug.aspx?PostID=63875" width="1" height="1"&gt;</description></item><item><title>Infopath Email &amp;laquo; Sladescross&amp;#039;s Blog</title><link>https://www.infopathdev.com:443/blogs/hilary/archive/2008/08/24/so-you-want-to-send-an-email.aspx#63449</link><pubDate>Sun, 23 Jan 2011 18:46:01 GMT</pubDate><guid isPermaLink="false">033a2e2d-04e2-4a9d-be01-a4634161eefd:63449</guid><dc:creator>Infopath Email « Sladescross's Blog</dc:creator><description>&lt;p&gt;Pingback from &amp;nbsp;Infopath Email &amp;amp;laquo; Sladescross&amp;amp;#039;s Blog&lt;/p&gt;
&lt;img src="https://www.infopathdev.com:443/aggbug.aspx?PostID=63449" width="1" height="1"&gt;</description></item><item><title>Infopath Email &amp;laquo; Sladescross&amp;#039;s Blog</title><link>https://www.infopathdev.com:443/blogs/hilary/archive/2008/08/24/so-you-want-to-send-an-email.aspx#63448</link><pubDate>Sun, 23 Jan 2011 18:46:00 GMT</pubDate><guid isPermaLink="false">033a2e2d-04e2-4a9d-be01-a4634161eefd:63448</guid><dc:creator>Infopath Email « Sladescross's Blog</dc:creator><description>&lt;p&gt;Pingback from &amp;nbsp;Infopath Email &amp;amp;laquo; Sladescross&amp;amp;#039;s Blog&lt;/p&gt;
&lt;img src="https://www.infopathdev.com:443/aggbug.aspx?PostID=63448" width="1" height="1"&gt;</description></item><item><title>re: So you want to send an email.....</title><link>https://www.infopathdev.com:443/blogs/hilary/archive/2008/08/24/so-you-want-to-send-an-email.aspx#55349</link><pubDate>Wed, 26 May 2010 23:48:38 GMT</pubDate><guid isPermaLink="false">033a2e2d-04e2-4a9d-be01-a4634161eefd:55349</guid><dc:creator>Hilary Stoupa</dc:creator><description>&lt;p&gt;Hey, Nick --&lt;/p&gt;
&lt;p&gt;Sounds like you are using IP 2003. These code samples are for C# or VB.NET. Do you have access to Visual Studio? You can add managed code to an InfoPath 2003 template in Visual Studio. Or, if you are using IP 2007, you can use VSTA.&lt;/p&gt;
&lt;img src="https://www.infopathdev.com:443/aggbug.aspx?PostID=55349" width="1" height="1"&gt;</description></item><item><title>re: So you want to send an email.....</title><link>https://www.infopathdev.com:443/blogs/hilary/archive/2008/08/24/so-you-want-to-send-an-email.aspx#53873</link><pubDate>Mon, 19 Apr 2010 21:52:30 GMT</pubDate><guid isPermaLink="false">033a2e2d-04e2-4a9d-be01-a4634161eefd:53873</guid><dc:creator>ncolyer</dc:creator><description>&lt;p&gt;Hilary,&lt;/p&gt;
&lt;p&gt;I'm trying to do something similar to what you have described here.&lt;/p&gt;
&lt;p&gt;Essentially I want to add various fields to the body of my message.&lt;/p&gt;
&lt;p&gt;What I want to happen now is to have a submit button that doesn't send all the date but just certain fields in the body of the message and doesn't send the attachment.&lt;/p&gt;
&lt;p&gt;When I click &amp;quot;Edit Form Code&amp;quot; I get the Microsoft Script Editor but it is called script.js - is this JavaScript? Can I use the same code or similar code to what you have above or do I have to find another way?&lt;/p&gt;
&lt;p&gt;Thanks,&lt;/p&gt;
&lt;p&gt;Nick&lt;/p&gt;
&lt;img src="https://www.infopathdev.com:443/aggbug.aspx?PostID=53873" width="1" height="1"&gt;</description></item></channel></rss>