<?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>Newbie Questions</title><link>https://www.infopathdev.com:443/forums/39.aspx</link><description>New to InfoPath? Search to see if your question has already been answered. If it has not, then ask it here or the appropriate topic forum.</description><dc:language>en</dc:language><generator>CommunityServer 2007 SP3 (Build: 31118.962)</generator><item><title>Re: Submitting a form via Email</title><link>https://www.infopathdev.com:443/forums/thread/3729.aspx</link><pubDate>Wed, 27 Dec 2006 13:25:47 GMT</pubDate><guid isPermaLink="false">033a2e2d-04e2-4a9d-be01-a4634161eefd:3729</guid><dc:creator>madhuri</dc:creator><slash:comments>0</slash:comments><comments>https://www.infopathdev.com:443/forums/thread/3729.aspx</comments><wfw:commentRss>https://www.infopathdev.com:443/forums/commentrss.aspx?SectionID=39&amp;PostID=3729</wfw:commentRss><description>Hi&lt;br /&gt;&lt;br /&gt;Your are using email dataconnection using data adapter.Data adapter is an object and 'To' is the property of this object which we need to add in the code&lt;br /&gt;&lt;br /&gt;You have wrtten this code line as &lt;br /&gt;objEmail = XDocument.DOM.selectSingleNode ("//my:ToField").text;&lt;br /&gt;&lt;br /&gt;in the above code line should be written as  &lt;br /&gt;objEmail.To = XDocument.DOM.selectSingleNode ("//my:ToField").text;&lt;br /&gt;&lt;br /&gt;similarly for subject&lt;br /&gt;objEmail.Subject = XDocument.DOM.selectSingleNode ("//my:SubjectField").text;&lt;br /&gt;&lt;br /&gt;Look at the following link&lt;br /&lt;a target="_blank" href=http://www.infopathdev.com/forums/topic.asp?TOPIC_ID=2583&gt;http://www.infopathdev.com/forums/topic.asp?TOPIC_ID=2583&lt;/a&gt;</description></item><item><title>Re: Submitting a form via Email</title><link>https://www.infopathdev.com:443/forums/thread/3728.aspx</link><pubDate>Wed, 27 Dec 2006 13:04:27 GMT</pubDate><guid isPermaLink="false">033a2e2d-04e2-4a9d-be01-a4634161eefd:3728</guid><dc:creator>Shilpa Pitta</dc:creator><slash:comments>0</slash:comments><comments>https://www.infopathdev.com:443/forums/thread/3728.aspx</comments><wfw:commentRss>https://www.infopathdev.com:443/forums/commentrss.aspx?SectionID=39&amp;PostID=3728</wfw:commentRss><description>Hi,&lt;br /&gt; Check out the following link&lt;br /&lt;a target="_blank" href=http://www.infopathdev.com/forums/topic.asp?TOPIC_ID=1813&gt;http://www.infopathdev.com/forums/topic.asp?TOPIC_ID=1813&lt;/a&gt;&lt;br /&gt;&lt;br /&gt;Hope this helps you!</description></item><item><title>Submitting a form via Email</title><link>https://www.infopathdev.com:443/forums/thread/1760.aspx</link><pubDate>Wed, 27 Dec 2006 02:00:11 GMT</pubDate><guid isPermaLink="false">033a2e2d-04e2-4a9d-be01-a4634161eefd:1760</guid><dc:creator>hshatto</dc:creator><slash:comments>0</slash:comments><comments>https://www.infopathdev.com:443/forums/thread/1760.aspx</comments><wfw:commentRss>https://www.infopathdev.com:443/forums/commentrss.aspx?SectionID=39&amp;PostID=1760</wfw:commentRss><description>I would like to submit a form via email using Infopath 2003.  I created the Data Connection, changed the Button properties Label: Submit email and changed ID:  btnSendMail, then edited form code to read the following (I enter the code in the brackets):&lt;br /&gt;var objEmail = XDocument.DataAdapters ("Submit");&lt;br /&gt;objEmail = XDocument.DOM.selectSingleNode ("//my:ToField").text;&lt;br /&gt;objEmail = XDocument.DOM.selectSingleNode ("//my:SubjectField").text;&lt;br /&gt;objEmail.Submit();&lt;br /&gt;&lt;br /&gt;I save the changes to the script.  &lt;br /&gt;&lt;br /&gt;When I click on the my new submit button I receive a script error on this line of code:  objEmail = XDocument.DOM.selectSingleNode ("//my:ToField").text;&lt;br /&gt;&lt;br /&gt;Does anyone have any suggestions to correct my script error to assist me in creating a script that will allow me to submit a form via email.&lt;br /&gt;&lt;br /&gt;Thanks&lt;br /&gt;Heidi</description></item></channel></rss>