<?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 form via email</title><link>https://www.infopathdev.com:443/forums/thread/30020.aspx</link><pubDate>Wed, 02 Jul 2008 06:05:14 GMT</pubDate><guid isPermaLink="false">033a2e2d-04e2-4a9d-be01-a4634161eefd:30020</guid><dc:creator>Anuma</dc:creator><slash:comments>0</slash:comments><comments>https://www.infopathdev.com:443/forums/thread/30020.aspx</comments><wfw:commentRss>https://www.infopathdev.com:443/forums/commentrss.aspx?SectionID=41&amp;PostID=30020</wfw:commentRss><description>&lt;p&gt;Hi,&lt;/p&gt;
&lt;p&gt;&amp;nbsp;You have not given correct xpath for &amp;quot;varto&amp;quot;. Can you please change xpath for &amp;quot;varTo&amp;quot;. You need to enter field name after &amp;quot;my:&amp;quot; in the below line.&lt;/p&gt;
&lt;p&gt;&amp;nbsp;var varTo = XDocument.DOM.selectSingleNode(&amp;quot;/my:myFields/my:EmailInfo/&lt;strong&gt;my:&lt;/strong&gt;&amp;quot;); &lt;/p&gt;</description></item><item><title>Re: Submitting form via email</title><link>https://www.infopathdev.com:443/forums/thread/29961.aspx</link><pubDate>Tue, 01 Jul 2008 13:39:20 GMT</pubDate><guid isPermaLink="false">033a2e2d-04e2-4a9d-be01-a4634161eefd:29961</guid><dc:creator>Ntombi</dc:creator><slash:comments>0</slash:comments><comments>https://www.infopathdev.com:443/forums/thread/29961.aspx</comments><wfw:commentRss>https://www.infopathdev.com:443/forums/commentrss.aspx?SectionID=41&amp;PostID=29961</wfw:commentRss><description>&lt;p&gt;thanks i changed that.&lt;/p&gt;
&lt;p&gt;another error: &amp;quot;Object required&amp;quot;&lt;/p&gt;
&lt;p&gt;please help&lt;/p&gt;</description></item><item><title>Re: Submitting form via email</title><link>https://www.infopathdev.com:443/forums/thread/29955.aspx</link><pubDate>Tue, 01 Jul 2008 11:50:27 GMT</pubDate><guid isPermaLink="false">033a2e2d-04e2-4a9d-be01-a4634161eefd:29955</guid><dc:creator>Anuma</dc:creator><slash:comments>0</slash:comments><comments>https://www.infopathdev.com:443/forums/thread/29955.aspx</comments><wfw:commentRss>https://www.infopathdev.com:443/forums/commentrss.aspx?SectionID=41&amp;PostID=29955</wfw:commentRss><description>&lt;p&gt;Hi,&lt;/p&gt;
&lt;p&gt;Please check the declared variable. you given lower case &amp;quot;v&amp;quot; in the declaration part. &lt;/p&gt;
&lt;p&gt;For ex: You have declared &amp;quot;varTo&amp;quot; and you used &amp;quot;VarTo.text&amp;quot; in the assignment block. Please change for other variables also.&lt;/p&gt;</description></item><item><title>Submitting form via email</title><link>https://www.infopathdev.com:443/forums/thread/29954.aspx</link><pubDate>Tue, 01 Jul 2008 11:33:35 GMT</pubDate><guid isPermaLink="false">033a2e2d-04e2-4a9d-be01-a4634161eefd:29954</guid><dc:creator>Ntombi</dc:creator><slash:comments>0</slash:comments><comments>https://www.infopathdev.com:443/forums/thread/29954.aspx</comments><wfw:commentRss>https://www.infopathdev.com:443/forums/commentrss.aspx?SectionID=41&amp;PostID=29954</wfw:commentRss><description>&lt;p&gt;i have a form that submits in two ways, firstly the form is send to a section head for him/her to approve/reject the application and then the section head is to click the button to submit the form details to the database.&amp;nbsp; i decided to use the submit to database button at the end and then programmatic attach code to another button that will send the email to the section head.&amp;nbsp; below is the code that i am using to send the form as attachment to the section head.&amp;nbsp; &lt;strong&gt;the error i get is that the VarTo is not defined, what should i do&lt;/strong&gt;&lt;/p&gt;
&lt;p&gt;&lt;strong&gt;i fristly tired the email adapter method and then the mail envelope but i get the same error from both methods - PLEASE HELP!!!!&lt;/strong&gt;&lt;/p&gt;
&lt;p&gt;function SubmitEmail::OnClick(eventObj) &lt;/p&gt;
&lt;p&gt;{ // Write your code here- 01/07/2008 (MB) &lt;/p&gt;
&lt;p&gt;//var objEmailAdapter; &lt;/p&gt;
&lt;p&gt;var mail = XDocument.View.Window.MailEnvelope; &lt;br /&gt;var varTo = XDocument.DOM.selectSingleNode(&amp;quot;/my:myFields/my:EmailInfo/my:&amp;quot;); &lt;br /&gt;var varCC = XDocument.DOM.selectSingleNode(&amp;quot;/my:myFields/my:EmailInfo/my:CC&amp;quot;); &lt;br /&gt;var varBCC = XDocument.DOM.selectSingleNode(&amp;quot;/my:myFields/my:EmailInfo/my:BCC&amp;quot;); &lt;br /&gt;var varIntro = XDocument.DOM.selectSingleNode(&amp;quot;/my:myFields/my:EmailInfo/my:Intro&amp;quot;); &lt;br /&gt;var varSubject = XDocument.DOM.selectSingleNode(&amp;quot;/my:myFields/my:EmailInfo/my:Subject&amp;quot;); &lt;br /&gt;&lt;/p&gt;
&lt;p&gt;&lt;br /&gt;//objEmailAdapter = XDocument.DataAdapters(&amp;quot;EmailSubmitAdapter&amp;quot;); &lt;br /&gt;&lt;br /&gt;mail.To = VarTo.text; &lt;br /&gt;mail.CC = VarCC.text; &lt;br /&gt;mail.BCC = VarBCC.text; &lt;br /&gt;mail.Intro = VarIntro.text; &lt;br /&gt;mail.Subject = VarSubject.text;&lt;br /&gt;//objEmailAdapter.Submit(); &lt;br /&gt;mail.Visible = true; &lt;/p&gt;
&lt;p&gt;} &lt;/p&gt;</description></item></channel></rss>