cancel
Showing results for 
Search instead for 
Did you mean: 

Send form as attachment

Former Member
0 Kudos

Hi SDN Community,

This question is not directly related to BSP but definitely to web programming.

Problem: My requirement is to do an survey through E- Mail. I will send an HTML form to a potential candidate to fill provide some feedback and submit that form. when candidate submits that form I need to create xml, attach that xml to email and send back to me. I have mentioned my email in mailto element. After that I will read that mail and by parsing xml get the candidate feedback.

Please suggest me some solution to this problem.

Thanks,

Jashan

Accepted Solutions (0)

Answers (2)

Answers (2)

athavanraja
Active Contributor
0 Kudos

Sending HTML form thru mail (either as attachment or in the email body) is not a real issue, we can handle it easily within BSP but the real issue would be how to send a mail back to SAP system when the user clicks a submit button when the form is within the email body. if the form is a attachment and the user is required to download to fill it and click submit button we can handle that as well.

Regards

Raja

Former Member
0 Kudos

do you have any idea on how to send the exact html page as a questionnaire to the specified email address? and how can the user send the questionnaire back?

Former Member
0 Kudos

Hi,

with a little search on net I found some code which sends fom data as attachment, but the attachment extention is .ATT how could I make it .xml or how could I retrieve the xml embedded in the attachment. Give a try to following code and suggest some solution.


<html>
   <head>
      <title>Enter the title of your HTML document here</title>
   </head>
   <body>
<form name="input_form"><pre><code>
   Name: <input name="username" type="text">
Comment: <input name="comment"  type="text">
</code></pre></form>

<script>
function update_message_body ()
{
	var username = document . input_form . username . value;
	var comment  = document . input_form . comment  . value;

	var txt="<?xml version="1.0" encoding="ISO-8859-1"?>n"
	txt=txt+"<candidate_details>n"
	txt=txt+"<name>" + username + "</name>n"
	txt=txt+"<comment>" + comment + "</comment>n"
	txt=txt+"</candidate_details>n";

	document . proxy_form . message_body . value = txt;


	return true;
}
</script>
 
<form name    ="proxy_form"
      method  ="post"
      enctype ="multipart/form-data"
      action  ="mailto:jsingh1979@gmail.com?subject=Form Data"
      onSubmit="return update_message_body ();">
<input type=hidden name="message_body">
<input type=submit value="send mail">
</form>

   </body>
</html>

Regards,

Jashan