<?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>General</title><link>https://www.infopathdev.com:443/forums/41.aspx</link><description>If you're not sure where to ask your question, ask it here. If necessary, our moderators will make sure it gets classified in the correct board.</description><dc:language>en</dc:language><generator>CommunityServer 2007 SP3 (Build: 31118.962)</generator><item><title>Re: Submitting forms</title><link>https://www.infopathdev.com:443/forums/thread/6745.aspx</link><pubDate>Fri, 26 Aug 2005 07:19:26 GMT</pubDate><guid isPermaLink="false">033a2e2d-04e2-4a9d-be01-a4634161eefd:6745</guid><dc:creator>Patrick Halstead</dc:creator><slash:comments>0</slash:comments><comments>https://www.infopathdev.com:443/forums/thread/6745.aspx</comments><wfw:commentRss>https://www.infopathdev.com:443/forums/commentrss.aspx?SectionID=41&amp;PostID=6745</wfw:commentRss><description>Should be able to. Just add it as Body text.&lt;br /&gt;&lt;br /&gt;Patrick Halstead [InfoPath MVP]&lt;br /&gt;InfoPathDev</description></item><item><title>Re: Submitting forms</title><link>https://www.infopathdev.com:443/forums/thread/6744.aspx</link><pubDate>Thu, 25 Aug 2005 09:07:50 GMT</pubDate><guid isPermaLink="false">033a2e2d-04e2-4a9d-be01-a4634161eefd:6744</guid><dc:creator>oguz</dc:creator><slash:comments>0</slash:comments><comments>https://www.infopathdev.com:443/forums/thread/6744.aspx</comments><wfw:commentRss>https://www.infopathdev.com:443/forums/commentrss.aspx?SectionID=41&amp;PostID=6744</wfw:commentRss><description>Ok the email problem is solved but how can add an attachment to the e-mail, or can I put the mht file to the body of the mail. I read in anaother topic by Patrick Halstead that we can use Export method ( XDocument.View.Export("C:\\MyView.mht", "MHT"); Now I have a MHT file in my disk. Can I put it into the email as body.</description></item><item><title>Re: Submitting forms</title><link>https://www.infopathdev.com:443/forums/thread/6743.aspx</link><pubDate>Thu, 25 Aug 2005 08:40:40 GMT</pubDate><guid isPermaLink="false">033a2e2d-04e2-4a9d-be01-a4634161eefd:6743</guid><dc:creator>oguz</dc:creator><slash:comments>0</slash:comments><comments>https://www.infopathdev.com:443/forums/thread/6743.aspx</comments><wfw:commentRss>https://www.infopathdev.com:443/forums/commentrss.aspx?SectionID=41&amp;PostID=6743</wfw:commentRss><description>Thanks Dominic. I'll try it&lt;br /&gt;</description></item><item><title>Re: Submitting forms</title><link>https://www.infopathdev.com:443/forums/thread/6742.aspx</link><pubDate>Thu, 25 Aug 2005 06:57:57 GMT</pubDate><guid isPermaLink="false">033a2e2d-04e2-4a9d-be01-a4634161eefd:6742</guid><dc:creator>dominic</dc:creator><slash:comments>0</slash:comments><comments>https://www.infopathdev.com:443/forums/thread/6742.aspx</comments><wfw:commentRss>https://www.infopathdev.com:443/forums/commentrss.aspx?SectionID=41&amp;PostID=6742</wfw:commentRss><description>Ok if you have outlook try this it should work.  Simply call the funtion from the onclick event for the button e.g.:&lt;br /&gt;&lt;br /&gt;function CTRL239_2::OnClick(eventObj){&lt;br /&gt;&amp;lt;Call the function Here, make sure you pass the appropriate paramaters&amp;gt;&lt;br /&gt;for example:&lt;br /&gt;mailMessage("xx@hotmail.com","Test Message", "CCaddress@hotmail.com",XDocument.DOM.xml,"BCCaddress@hotmail.com");&lt;br /&gt;}&lt;br /&gt;If you don't want to CC to someone, or BCC for that matter you don't have to just leave the paramater out, but make sure you still leave the commas in and put "".  I have tried it and it works for me, brings up an e-mail with the xml in it.&lt;br /&gt;&lt;br /&gt;Paste this function (the one your going to call above) into you jscript file as well.&lt;br /&gt;/*------------------------------------------------------------------------------&lt;br /&gt;	Automatic mail function&lt;br /&gt;------------------------------------------------------------------------------*/&lt;br /&gt;&lt;br /&gt;function mailMessage(to,subject,cc,body,bcc){&lt;br /&gt;   try&lt;br /&gt;   {&lt;br /&gt;        var myOlApp = new ActiveXObject("Outlook.Application");&lt;br /&gt;	newMail = myOlApp.CreateItem(0);&lt;br /&gt;	newMail.To = to;&lt;br /&gt;	newMail.Subject = subject;&lt;br /&gt;	newMail.CC = cc;&lt;br /&gt;	newMail.BCC = bcc;&lt;br /&gt;	newMail.Body = body;&lt;br /&gt;// if you want to see the e-mail b4 sending use&lt;br /&gt;	newMail.Display(0);&lt;br /&gt;//If you want to send automatically use: &lt;br /&gt;        newMail.Send();&lt;br /&gt;	}&lt;br /&gt;   catch(ex)&lt;br /&gt;   {&lt;br /&gt;      XDocument.UI.Alert(ex.description);&lt;br /&gt;   }&lt;br /&gt;}&lt;br /&gt;&lt;br /&gt;this is how I generate most of my mails, hope this helps.</description></item><item><title>Re: Submitting forms</title><link>https://www.infopathdev.com:443/forums/thread/6741.aspx</link><pubDate>Thu, 25 Aug 2005 06:43:19 GMT</pubDate><guid isPermaLink="false">033a2e2d-04e2-4a9d-be01-a4634161eefd:6741</guid><dc:creator>dominic</dc:creator><slash:comments>0</slash:comments><comments>https://www.infopathdev.com:443/forums/thread/6741.aspx</comments><wfw:commentRss>https://www.infopathdev.com:443/forums/commentrss.aspx?SectionID=41&amp;PostID=6741</wfw:commentRss><description>Ok if you have outlook try this it should work.  Simply call the funtion from the &lt;br /&gt;function CTRL239_2::OnClick(eventObj){&lt;br /&gt;&amp;lt;Call the function Here, make sure you pass the appropriate paramaters&amp;gt;&lt;br /&gt;for example:&lt;br /&gt;mailMessage(xx@hotmail.com,"Test Message",CCaddress@hotmail.com,BCCaddress@hotmail.com);&lt;br /&gt;}&lt;br /&gt;If you don't want to CC to someone, or BCC for that matter you don't have to just leave ther paramater out, but make sure you still leave the commas in.&lt;br /&gt;&lt;br /&gt;Past this function (the one your going to call above) into you jscript file.&lt;br /&gt;/*------------------------------------------------------------------------------&lt;br /&gt;	Automatic mail function&lt;br /&gt;------------------------------------------------------------------------------*/&lt;br /&gt;&lt;br /&gt;function mailMessage(to,subject,cc,body,bcc){&lt;br /&gt;   try&lt;br /&gt;   {var myOlApp = new ActiveXObject("Outlook.Application");&lt;br /&gt;	newMail = myOlApp.CreateItem(0);&lt;br /&gt;	newMail.To = to;&lt;br /&gt;	newMail.Subject = subject;&lt;br /&gt;	newMail.CC = cc;&lt;br /&gt;	newMail.Body = body;&lt;br /&gt;	newMail.Send();&lt;br /&gt;	}&lt;br /&gt;   }&lt;br /&gt;   catch(ex)&lt;br /&gt;   {&lt;br /&gt;      XDocument.UI.Alert(ex.description);&lt;br /&gt;   }&lt;br /&gt;}</description></item><item><title>Re: Submitting forms</title><link>https://www.infopathdev.com:443/forums/thread/6740.aspx</link><pubDate>Thu, 25 Aug 2005 05:52:35 GMT</pubDate><guid isPermaLink="false">033a2e2d-04e2-4a9d-be01-a4634161eefd:6740</guid><dc:creator>oguz</dc:creator><slash:comments>0</slash:comments><comments>https://www.infopathdev.com:443/forums/thread/6740.aspx</comments><wfw:commentRss>https://www.infopathdev.com:443/forums/commentrss.aspx?SectionID=41&amp;PostID=6740</wfw:commentRss><description>I have outlook. there is no problem with outlook. I think the problem may be in data connection or code.</description></item><item><title>Re: Submitting forms</title><link>https://www.infopathdev.com:443/forums/thread/6739.aspx</link><pubDate>Wed, 24 Aug 2005 13:03:36 GMT</pubDate><guid isPermaLink="false">033a2e2d-04e2-4a9d-be01-a4634161eefd:6739</guid><dc:creator>Coita Thierry</dc:creator><slash:comments>0</slash:comments><comments>https://www.infopathdev.com:443/forums/thread/6739.aspx</comments><wfw:commentRss>https://www.infopathdev.com:443/forums/commentrss.aspx?SectionID=41&amp;PostID=6739</wfw:commentRss><description>Hi,&lt;br /&gt;&lt;br /&gt;Is outlook installed on your computer and config with a good mail address? &lt;br /&gt;&lt;br /&gt;If you don't have outlook installed that will never work!&lt;br /&gt;&lt;br /&gt;I don't know if that work with outlook express!&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>Re: Submitting forms</title><link>https://www.infopathdev.com:443/forums/thread/6738.aspx</link><pubDate>Wed, 24 Aug 2005 11:32:51 GMT</pubDate><guid isPermaLink="false">033a2e2d-04e2-4a9d-be01-a4634161eefd:6738</guid><dc:creator>oguz</dc:creator><slash:comments>0</slash:comments><comments>https://www.infopathdev.com:443/forums/thread/6738.aspx</comments><wfw:commentRss>https://www.infopathdev.com:443/forums/commentrss.aspx?SectionID=41&amp;PostID=6738</wfw:commentRss><description>Hi I add the following code to my Jscript. But there is no effect. I add a data connection with name Email Submit and while adding, infopath force me to enter at least a mail address to "to" or "cc" or "bcc". there is no error message or anything else but it does not send the mail to "oguz_83@yahoo.com". It send the mail to other mail address(the entered while adding data connection)with attachment and without form in the body. &lt;br /&gt;&lt;br /&gt;function CTRL239_2::OnClick(eventObj)&lt;br /&gt;{&lt;br /&gt;	var oEmail = XDocument.DataAdapters("Email Submit");&lt;br /&gt;	oEmail.To = "oguz_83@yahoo.com";&lt;br /&gt;	oEmail.Subject = "Subject";&lt;br /&gt;	oEmail.Intro = XDocument.DOM.xml;&lt;br /&gt;	oEmail.Submit();&lt;br /&gt;	&lt;br /&gt;}</description></item><item><title>Re: Submitting forms</title><link>https://www.infopathdev.com:443/forums/thread/6737.aspx</link><pubDate>Tue, 26 Jul 2005 06:09:34 GMT</pubDate><guid isPermaLink="false">033a2e2d-04e2-4a9d-be01-a4634161eefd:6737</guid><dc:creator>Patrick Halstead</dc:creator><slash:comments>0</slash:comments><comments>https://www.infopathdev.com:443/forums/thread/6737.aspx</comments><wfw:commentRss>https://www.infopathdev.com:443/forums/commentrss.aspx?SectionID=41&amp;PostID=6737</wfw:commentRss><description>WCO, I need more context. Can you paste in the entire file?&lt;br /&gt;&lt;br /&gt;Patrick Halstead [InfoPath MVP]&lt;br /&gt;InfoPathDev</description></item><item><title>Re: Submitting forms</title><link>https://www.infopathdev.com:443/forums/thread/6736.aspx</link><pubDate>Mon, 25 Jul 2005 23:02:00 GMT</pubDate><guid isPermaLink="false">033a2e2d-04e2-4a9d-be01-a4634161eefd:6736</guid><dc:creator>wcotech</dc:creator><slash:comments>0</slash:comments><comments>https://www.infopathdev.com:443/forums/thread/6736.aspx</comments><wfw:commentRss>https://www.infopathdev.com:443/forums/commentrss.aspx?SectionID=41&amp;PostID=6736</wfw:commentRss><description>Pat,  I used "XDocument.DOM.xml" and now get an error that says, "XDocument.DOM.xml" is null or is not an object.  Any thoughts?</description></item><item><title>Re: Submitting forms</title><link>https://www.infopathdev.com:443/forums/thread/6735.aspx</link><pubDate>Sat, 23 Jul 2005 08:19:13 GMT</pubDate><guid isPermaLink="false">033a2e2d-04e2-4a9d-be01-a4634161eefd:6735</guid><dc:creator>Patrick Halstead</dc:creator><slash:comments>0</slash:comments><comments>https://www.infopathdev.com:443/forums/thread/6735.aspx</comments><wfw:commentRss>https://www.infopathdev.com:443/forums/commentrss.aspx?SectionID=41&amp;PostID=6735</wfw:commentRss><description>XDocument.DOM.xml&lt;br /&gt;&lt;br /&gt;Patrick Halstead [InfoPath MVP]&lt;br /&gt;InfoPathDev</description></item><item><title>Re: Submitting forms</title><link>https://www.infopathdev.com:443/forums/thread/6734.aspx</link><pubDate>Sat, 23 Jul 2005 06:02:41 GMT</pubDate><guid isPermaLink="false">033a2e2d-04e2-4a9d-be01-a4634161eefd:6734</guid><dc:creator>wcotech</dc:creator><slash:comments>0</slash:comments><comments>https://www.infopathdev.com:443/forums/thread/6734.aspx</comments><wfw:commentRss>https://www.infopathdev.com:443/forums/commentrss.aspx?SectionID=41&amp;PostID=6734</wfw:commentRss><description>Jscript</description></item><item><title>Re: Submitting forms</title><link>https://www.infopathdev.com:443/forums/thread/6733.aspx</link><pubDate>Sat, 23 Jul 2005 01:05:44 GMT</pubDate><guid isPermaLink="false">033a2e2d-04e2-4a9d-be01-a4634161eefd:6733</guid><dc:creator>Patrick Halstead</dc:creator><slash:comments>0</slash:comments><comments>https://www.infopathdev.com:443/forums/thread/6733.aspx</comments><wfw:commentRss>https://www.infopathdev.com:443/forums/commentrss.aspx?SectionID=41&amp;PostID=6733</wfw:commentRss><description>Are you using C# or JScript?&lt;br /&gt;&lt;br /&gt;Patrick Halstead [InfoPath MVP]&lt;br /&gt;InfoPathDev</description></item><item><title>Re: Submitting forms</title><link>https://www.infopathdev.com:443/forums/thread/6732.aspx</link><pubDate>Fri, 22 Jul 2005 22:06:57 GMT</pubDate><guid isPermaLink="false">033a2e2d-04e2-4a9d-be01-a4634161eefd:6732</guid><dc:creator>wcotech</dc:creator><slash:comments>0</slash:comments><comments>https://www.infopathdev.com:443/forums/thread/6732.aspx</comments><wfw:commentRss>https://www.infopathdev.com:443/forums/commentrss.aspx?SectionID=41&amp;PostID=6732</wfw:commentRss><description>Agni,&lt;br /&gt;&lt;br /&gt;When I inserted your code, I received an error that says that "XDocument.Dom.xml" is undefined.  Any Ideas?</description></item><item><title>Re: Submitting forms</title><link>https://www.infopathdev.com:443/forums/thread/6731.aspx</link><pubDate>Thu, 21 Jul 2005 21:00:19 GMT</pubDate><guid isPermaLink="false">033a2e2d-04e2-4a9d-be01-a4634161eefd:6731</guid><dc:creator>wcotech</dc:creator><slash:comments>0</slash:comments><comments>https://www.infopathdev.com:443/forums/thread/6731.aspx</comments><wfw:commentRss>https://www.infopathdev.com:443/forums/commentrss.aspx?SectionID=41&amp;PostID=6731</wfw:commentRss><description>Thanks Agni, I'll try that code today and let you know how it turned out.</description></item></channel></rss>