<?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>Code</title><link>https://www.infopathdev.com:443/forums/45.aspx</link><description /><dc:language>en</dc:language><generator>CommunityServer 2007 SP3 (Build: 31118.962)</generator><item><title>Re: HTML in email</title><link>https://www.infopathdev.com:443/forums/thread/14046.aspx</link><pubDate>Tue, 27 Mar 2007 11:47:02 GMT</pubDate><guid isPermaLink="false">033a2e2d-04e2-4a9d-be01-a4634161eefd:14046</guid><dc:creator>skrile</dc:creator><slash:comments>0</slash:comments><comments>https://www.infopathdev.com:443/forums/thread/14046.aspx</comments><wfw:commentRss>https://www.infopathdev.com:443/forums/commentrss.aspx?SectionID=45&amp;PostID=14046</wfw:commentRss><description>When I try to download this toolkit I get an error and it stops.  I have InfoPath 2003 sp2 and Visual Studio 2005 installed on my machine.  The error says I need InfoPath 2003 sp1 and Visual Studio 2003 installed.  Am I just thick, or am I missing something important.&lt;br /&gt;&lt;br /&gt;&lt;a target="_blank" href=http://www.microsoft.com/downloads/details.aspx?FamilyId=7E9EBC57-E115-4CAC-9986-A712E22879BB&amp;displaylang=en&gt;http://www.microsoft.com/downloads/details.aspx?FamilyId=7E9EBC57-E115-4CAC-9986-A712E22879BB&amp;displaylang=en&lt;/a&gt;)</description></item><item><title>Re: HTML in email</title><link>https://www.infopathdev.com:443/forums/thread/14045.aspx</link><pubDate>Tue, 27 Mar 2007 11:19:44 GMT</pubDate><guid isPermaLink="false">033a2e2d-04e2-4a9d-be01-a4634161eefd:14045</guid><dc:creator>nukkumatti</dc:creator><slash:comments>0</slash:comments><comments>https://www.infopathdev.com:443/forums/thread/14045.aspx</comments><wfw:commentRss>https://www.infopathdev.com:443/forums/commentrss.aspx?SectionID=45&amp;PostID=14045</wfw:commentRss><description>Oh sorry I think this will only work with managed code and not with scripting. So you had to use the InfoPath toolkit for visual studio.</description></item><item><title>Re: HTML in email</title><link>https://www.infopathdev.com:443/forums/thread/14044.aspx</link><pubDate>Tue, 27 Mar 2007 11:13:47 GMT</pubDate><guid isPermaLink="false">033a2e2d-04e2-4a9d-be01-a4634161eefd:14044</guid><dc:creator>skrile</dc:creator><slash:comments>0</slash:comments><comments>https://www.infopathdev.com:443/forums/thread/14044.aspx</comments><wfw:commentRss>https://www.infopathdev.com:443/forums/commentrss.aspx?SectionID=45&amp;PostID=14044</wfw:commentRss><description>Yeah, I tried that, &lt;br /&gt;&lt;br /&gt;&lt;pre&gt;&lt;br /&gt;&lt;br /&gt;function CTRL1_5::OnClick(eventObj)&lt;br /&gt;{&lt;br /&gt;&lt;br /&gt;var objMail = new MailMessage();&lt;br /&gt;objMail.BodyFormat	= System.Web.Mail.MailFormat.Html;&lt;br /&gt;objMail.From		= "from@address.ca";&lt;br /&gt;objMail.To			= "to@address.ca";&lt;br /&gt;objMail.Subject		= "Test Subject";&lt;br /&gt;objMail.Body		=  "&amp;lt;b&amp;gt;FROM:&amp;lt;/b&amp;gt;" + "&amp;lt;font color=red&amp;gt;" + "Sample TEXT"&lt;br /&gt;&lt;br /&gt;}&lt;br /&gt;&lt;/pre&gt;&lt;br /&gt;&lt;br /&gt;but when I click the button, now I get:&lt;br /&gt;&lt;br /&gt;&lt;blockquote id="quote"&gt;&lt;font size="1" face="Verdana, Arial, Helvetica" id="quote"&gt;quote:&lt;hr height="1" noshade id="quote"&gt;&lt;br /&gt;A run-time error has occurred....&lt;br /&gt;&lt;br /&gt;&lt;br /&gt;'MailMessage' is undefined&lt;br /&gt;File:script.js&lt;br /&gt;Line 25&lt;br /&gt;&lt;hr height="1" noshade id="quote"&gt;&lt;/font id="quote"&gt;&lt;/blockquote id="quote"&gt;</description></item><item><title>Re: HTML in email</title><link>https://www.infopathdev.com:443/forums/thread/14043.aspx</link><pubDate>Tue, 27 Mar 2007 11:10:43 GMT</pubDate><guid isPermaLink="false">033a2e2d-04e2-4a9d-be01-a4634161eefd:14043</guid><dc:creator>nukkumatti</dc:creator><slash:comments>0</slash:comments><comments>https://www.infopathdev.com:443/forums/thread/14043.aspx</comments><wfw:commentRss>https://www.infopathdev.com:443/forums/commentrss.aspx?SectionID=45&amp;PostID=14043</wfw:commentRss><description>It just gives you the freedom to create your own eMail body including html tags for formating.&lt;br /&gt;&lt;br /&gt;You need to change MailMessage objMail = .....&lt;br /&gt;to var objMail = new MailMessage();&lt;br /&gt;&lt;br /&gt;Like this you should get rid of the error.</description></item><item><title>Re: HTML in email</title><link>https://www.infopathdev.com:443/forums/thread/14042.aspx</link><pubDate>Tue, 27 Mar 2007 11:07:15 GMT</pubDate><guid isPermaLink="false">033a2e2d-04e2-4a9d-be01-a4634161eefd:14042</guid><dc:creator>skrile</dc:creator><slash:comments>0</slash:comments><comments>https://www.infopathdev.com:443/forums/thread/14042.aspx</comments><wfw:commentRss>https://www.infopathdev.com:443/forums/commentrss.aspx?SectionID=45&amp;PostID=14042</wfw:commentRss><description>Hmmm... Can't seem to make the example over there work.  I started a new InfoPath form and put one button on the page.  I then put this code behind the button (onclick).  &lt;br /&gt;&lt;br /&gt;&lt;pre&gt;&lt;br /&gt;&lt;br /&gt;function CTRL1_5::OnClick(eventObj)&lt;br /&gt;{&lt;br /&gt;&lt;br /&gt;MailMessage objMail = new MailMessage();&lt;br /&gt;objMail.BodyFormat	= System.Web.Mail.MailFormat.Html;&lt;br /&gt;objMail.From		= "from@address.ca";&lt;br /&gt;objMail.To			= "to@address.ca";&lt;br /&gt;objMail.Subject		= "Test Subject";&lt;br /&gt;objMail.Body		=  "&amp;lt;b&amp;gt;FROM:&amp;lt;/b&amp;gt;" + "&amp;lt;font color=red&amp;gt;" + "Sample TEXT" + "&amp;lt;/font&amp;gt;"&lt;br /&gt;&lt;br /&gt;}&lt;br /&gt;&lt;br /&gt;&lt;/pre&gt;&lt;br /&gt;&lt;br /&gt;When I preview the form and click the button I get:&lt;br /&gt;&lt;br /&gt; &lt;blockquote id="quote"&gt;&lt;font size="1" face="Verdana, Arial, Helvetica" id="quote"&gt;quote:&lt;hr height="1" noshade id="quote"&gt;&lt;br /&gt;InfoPath cannot open the selected form because of an error in the form's code.&lt;br /&gt;The following error occurred:&lt;br /&gt;&lt;br /&gt;Expected ';'&lt;br /&gt;File:script.js&lt;br /&gt;Line:25&lt;br /&gt;MailMessage objMail = new MailMessage();&lt;br /&gt;&lt;br /&gt;&lt;br /&gt;&lt;hr height="1" noshade id="quote"&gt;&lt;/font id="quote"&gt;&lt;/blockquote id="quote"&gt;&lt;br /&gt;&lt;br /&gt;&lt;br /&gt;Any idea what is happening?  And what is supposed to happen?  Does this launch an Outlook email form?</description></item><item><title>Re: HTML in email</title><link>https://www.infopathdev.com:443/forums/thread/14041.aspx</link><pubDate>Tue, 27 Mar 2007 06:20:36 GMT</pubDate><guid isPermaLink="false">033a2e2d-04e2-4a9d-be01-a4634161eefd:14041</guid><dc:creator>nukkumatti</dc:creator><slash:comments>0</slash:comments><comments>https://www.infopathdev.com:443/forums/thread/14041.aspx</comments><wfw:commentRss>https://www.infopathdev.com:443/forums/commentrss.aspx?SectionID=45&amp;PostID=14041</wfw:commentRss><description>May be this is also of interest for you guys&lt;br /&gt;&lt;a href='http://www.infopathdev.com/forums/topic.asp?TOPIC_ID=4116' target='_blank' title='http://www.infopathdev.com/forums/topic.asp?TOPIC_ID=4116'&lt;a target="_blank" href=http://www.infopathdev.com/forums/topic.asp?TOPIC_ID=4116&gt;http://www.infopathdev.com/forums/topic.asp?TOPIC_ID=4116&lt;/a&gt;&lt;/a&gt;</description></item><item><title>Re: HTML in email</title><link>https://www.infopathdev.com:443/forums/thread/14040.aspx</link><pubDate>Mon, 26 Mar 2007 19:34:00 GMT</pubDate><guid isPermaLink="false">033a2e2d-04e2-4a9d-be01-a4634161eefd:14040</guid><dc:creator>skrile</dc:creator><slash:comments>0</slash:comments><comments>https://www.infopathdev.com:443/forums/thread/14040.aspx</comments><wfw:commentRss>https://www.infopathdev.com:443/forums/commentrss.aspx?SectionID=45&amp;PostID=14040</wfw:commentRss><description>OY, it's soooo silly.  To get carriage returns (or new lines) in JScript use "\r\n"&lt;br /&gt;&lt;br /&gt;As in:&lt;br /&gt;&lt;pre&gt;&lt;br /&gt;&lt;br /&gt;objEmailAdapter.Intro = "Some special text.\r\n This is the next line"&lt;br /&gt;&lt;br /&gt;&lt;/pre&gt;</description></item><item><title>Re: HTML in email</title><link>https://www.infopathdev.com:443/forums/thread/14039.aspx</link><pubDate>Mon, 26 Mar 2007 15:02:02 GMT</pubDate><guid isPermaLink="false">033a2e2d-04e2-4a9d-be01-a4634161eefd:14039</guid><dc:creator>skrile</dc:creator><slash:comments>0</slash:comments><comments>https://www.infopathdev.com:443/forums/thread/14039.aspx</comments><wfw:commentRss>https://www.infopathdev.com:443/forums/commentrss.aspx?SectionID=45&amp;PostID=14039</wfw:commentRss><description>Man this one has been bothering me.  Why in the world can't you put HTML in the body (Intro) programatically?&lt;br /&gt;&lt;br /&gt;(Author's Note:  I had to put "[&amp;]" where I mean "&amp;" or else this forum will not render the message properly)&lt;br /&gt;&lt;br /&gt;Just for fun I've built a button with an OnClick event that triggers and email from a Data Connection:&lt;br /&gt;&lt;pre&gt;&lt;br /&gt;function CTRL596_5::OnClick(eventObj)&lt;br /&gt;{&lt;br /&gt;var emailrecip= XDocument.DOM.selectSingleNode("/my:myFields/my:emailrecip");&lt;br /&gt;		{&lt;br /&gt;		var objEmailAdapter = XDocument.DataAdapters("My Email Connection Name"); &lt;br /&gt;			objEmailAdapter.To = emailrecip.text;&lt;br /&gt;			objEmailAdapter.CC = "";&lt;br /&gt;			objEmailAdapter.BCC = "";&lt;br /&gt;			objEmailAdapter.Intro = "Some special text"&lt;br /&gt;                        objEmailAdapter.Subject = "Test Email"; &lt;br /&gt;			objEmailAdapter.Submit();&lt;br /&gt;		}&lt;br /&gt;}&lt;br /&gt;&lt;/pre&gt;&lt;br /&gt;&lt;br /&gt;As noted before, putting HTML tags in the .Intro object just renders the literal tag in the email.  Why this is bothersome to me is if I configure the Data Connection with Intro text and put carriage returns in the box within the wizard dialog, those carriage returns are rendered properly in the email.  So, I went digging into the .xsf file to see how the info was stored.  Low and behold, my line with carriage returns looks like this:&lt;br /&gt;&lt;br /&gt;&lt;pre&gt;&lt;br /&gt;&amp;lt;xsf:intro value="This line is two above[&amp;]#xA;[&amp;]#xA;this "&amp;gt;&amp;lt;/xsf:intro&amp;gt;&lt;br /&gt;&lt;/pre&gt;&lt;br /&gt;&lt;br /&gt;Hmmm.  [&amp;]#xA; forces a carriage return when this Intro is used.  So, one would think you could do something similar in script, but alas, you may have guessed the following DOES NOT work (again, the literal values are put in the email intro).&lt;br /&gt;&lt;br /&gt;&lt;pre&gt;&lt;br /&gt;objEmailAdapter.Intro = "Some special text[&amp;]#xA;This is the next line"&lt;br /&gt;&lt;/pre&gt;&lt;br /&gt;&lt;br /&gt;Anyone see a way to get HTML (at least carriage returns!!!) in the Intro section of an Email Adapter object programmatically?</description></item><item><title>Re: HTML in email</title><link>https://www.infopathdev.com:443/forums/thread/14038.aspx</link><pubDate>Mon, 28 Nov 2005 22:59:25 GMT</pubDate><guid isPermaLink="false">033a2e2d-04e2-4a9d-be01-a4634161eefd:14038</guid><dc:creator>Patrick Halstead</dc:creator><slash:comments>0</slash:comments><comments>https://www.infopathdev.com:443/forums/thread/14038.aspx</comments><wfw:commentRss>https://www.infopathdev.com:443/forums/commentrss.aspx?SectionID=45&amp;PostID=14038</wfw:commentRss><description>Sounds like a good Outlook question. My guess is that it is possible, but I haven't tried it.&lt;br /&gt;&lt;br /&gt;Patrick Halstead [InfoPath MVP]&lt;br /&gt;InfoPathDev</description></item><item><title>Re: HTML in email</title><link>https://www.infopathdev.com:443/forums/thread/14037.aspx</link><pubDate>Fri, 25 Nov 2005 14:05:09 GMT</pubDate><guid isPermaLink="false">033a2e2d-04e2-4a9d-be01-a4634161eefd:14037</guid><dc:creator>Coita Thierry</dc:creator><slash:comments>0</slash:comments><comments>https://www.infopathdev.com:443/forums/thread/14037.aspx</comments><wfw:commentRss>https://www.infopathdev.com:443/forums/commentrss.aspx?SectionID=45&amp;PostID=14037</wfw:commentRss><description>Hi,&lt;br /&gt;&lt;br /&gt;I don't think you can! if with this way you cant I don't think that is possible!&lt;br /&gt;&lt;br /&gt;++&lt;br /&gt;&lt;br /&gt;Thierry&lt;br /&gt;&lt;br /&gt;Every moment hesitated is a moment gone for life!!! Think about it</description></item><item><title>HTML in email</title><link>https://www.infopathdev.com:443/forums/thread/12693.aspx</link><pubDate>Thu, 24 Nov 2005 06:10:36 GMT</pubDate><guid isPermaLink="false">033a2e2d-04e2-4a9d-be01-a4634161eefd:12693</guid><dc:creator>qwer</dc:creator><slash:comments>0</slash:comments><comments>https://www.infopathdev.com:443/forums/thread/12693.aspx</comments><wfw:commentRss>https://www.infopathdev.com:443/forums/commentrss.aspx?SectionID=45&amp;PostID=12693</wfw:commentRss><description>Hi all,&lt;br /&gt;&lt;br /&gt;Realising the fact that you can submit an email programmatically and declaring the intro content, can anyone tell me if there is a way to send an HTML email to the intro section?&lt;br /&gt;&lt;br /&gt;eg,&lt;br /&gt;&lt;br /&gt;set oEmail = XDocument.DataAdapters("Submit")&lt;br /&gt;oEmail.intro = "&amp;lt;html&amp;gt;&amp;lt;head&amp;gt;&amp;lt;title&amp;gt;&amp;lt;/title&amp;gt;&amp;lt;/head&amp;gt;&amp;lt;body&amp;gt;&amp;lt;/body&amp;gt;&amp;lt;/html&amp;gt;"</description></item></channel></rss>