<?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: Send Form As Attachment</title><link>https://www.infopathdev.com:443/forums/thread/14730.aspx</link><pubDate>Tue, 18 Jul 2006 13:28:05 GMT</pubDate><guid isPermaLink="false">033a2e2d-04e2-4a9d-be01-a4634161eefd:14730</guid><dc:creator>Kalyan Gaddam</dc:creator><slash:comments>0</slash:comments><comments>https://www.infopathdev.com:443/forums/thread/14730.aspx</comments><wfw:commentRss>https://www.infopathdev.com:443/forums/commentrss.aspx?SectionID=45&amp;PostID=14730</wfw:commentRss><description>Hello &lt;br /&gt;Welcome to Infopathdev Forums&lt;br /&gt;&lt;br /&gt;Email cannot be send automatically since this is a security feature to prevent spamming from user machine without user's knowledge.&lt;br /&gt;Please read the links below and also the links that come up in side. &lt;br /&lt;a target="_blank" href=http://www.infopathdev.com/forums/topic.asp?TOPIC_ID=1755&gt;http://www.infopathdev.com/forums/topic.asp?TOPIC_ID=1755&lt;/a&gt;&lt;br /&gt;&lt;br /&gt;I hope they help you to solve your issue.</description></item><item><title>Send Form As Attachment</title><link>https://www.infopathdev.com:443/forums/thread/12922.aspx</link><pubDate>Tue, 18 Jul 2006 12:37:02 GMT</pubDate><guid isPermaLink="false">033a2e2d-04e2-4a9d-be01-a4634161eefd:12922</guid><dc:creator>maxxwizard</dc:creator><slash:comments>0</slash:comments><comments>https://www.infopathdev.com:443/forums/thread/12922.aspx</comments><wfw:commentRss>https://www.infopathdev.com:443/forums/commentrss.aspx?SectionID=45&amp;PostID=12922</wfw:commentRss><description>I developed a IS procurement form. I wrote code for the submit button so that it opens the "Send Form As Attachment" window. (The reason I want to send the email this way is because I want the form to be in HTML format in the body of the email.) However, I would like to be more automated so when the user clicks Submit, it automatically sends. If that's not possible, can there be an alert asking the user to confirm the submit and then that will send the email and close the form?&lt;br /&gt;&lt;br /&gt;&lt;pre&gt;&lt;br /&gt;var mail = XDocument.View.Window.MailEnvelope;&lt;br /&gt;var region = XDocument.DOM.selectSingleNode("/my:myFields/my:userInfo/my:region").text;&lt;br /&gt;var firstName = XDocument.DOM.selectSingleNode("/my:myFields/my:userInfo/my:firstName").text;&lt;br /&gt;var lastName = XDocument.DOM.selectSingleNode("/my:myFields/my:userInfo/my:lastName").text;&lt;br /&gt;var department = XDocument.DOM.selectSingleNode("/my:myFields/my:userInfo/my:department").text;&lt;br /&gt;	if (region =="Corporate")&lt;br /&gt;	{&lt;br /&gt;		mail.To = "fake@blah.com";&lt;br /&gt;		mail.CC = "fake2@blah.com";&lt;br /&gt;		&lt;br /&gt;		var subject = "Request from " + firstName + " " + lastName + " of " + department + " department in " + region + " region.";&lt;br /&gt;		mail.Subject =subject;&lt;br /&gt;	&lt;br /&gt;	}&lt;/pre&gt;</description></item></channel></rss>