Dear SAP Community Member,
In order to fully benefit from what the SAP Community has to offer, please register at:
Thank you,
The SAP Community team.
Skip to end of metadata
Go to start of metadata

In a comment to the Blog Create, run and analyze an E-Mail Campaign with a Survey (Part 1) vijay kothari asked if it is possible to use surveys without providing a connection to the backend system as described in Setup SAP Web Dispatcher with URL Filter on SuSE Linux 9.0. So here is a solution to this problem: Use the mailto function to send the Survey answers via mail to the backend SAP CRM system.

Create Parameter XML for mailto

Start transaction CRM_SURVEY_SUITE and click on the Button "Survey Repository":

Open the Folders Parameter XMLs -> mailto, Mark the default entry "CRM_SVY_PARAM_MAILTO.XML" and press F8 to export it to the local disk.

Adopt the file content and replace the Action with the local E-Mail address, also rename the File to "CRM_SVY_PARAM_MAILTO_CR4.XML":

<?xml version="1.0" encoding="UTF-8"?>

Choose the Folder mailto and press F7 to upload the file. Fill the Fields as mentioned here:

That should be the result:

Create the Survey TEST_MAIL

Now you can create a survey as described in the Blog Create, run and analyze an E-Mail Campaign with a Survey (Part 1) or SAP Note 988209 - CA: Direct response scenario. Here I've created first a German version of the Survey with three radio buttons in transaction CRM_SURVEY_SUITE, Appl. Folder Marketing. Then I did the translation to English:

This survey can be downloaded via Extras -> Download Presentation Format:

In the next screen you have to choose mailto as the send option, the Parameter XML uploaded before and Media Type Screen:

This resulted in the download of a TEST_MAIL.html file which I've downloaded to my local files:

Setup Inbound Processing of the Survey Mail

To process the mail which will be created from the just downloaded HTML File the Inbound Mail Processing has to be configured in Transaction SO50 for the E-Mail address (which was used in the Parameter XML) with the Exit Name: CL_SVY_SMTP_INBOUND:

Test Survey

With everything above prepared we can now doubleclick on the TEST_MAIL.html file created above and you will see this content in your Browser:

When you click Save you get a warning that the Form will be sent via E-Mail

And then you again have to confirm that it should be sent with Outlook:

You can verrify that the mail was processed in transaction CRM_SURVEY_SUITE when you choose your survey and click the Button "Evaluation" (Ctrl+Shift+F3):

On the next screen you should see the counter for the evaluated survey to be at least 1:

If you're running a Unicode CRM System you might have to check out SAP Note 1286258 - Unicode issues with IF_INBOUND_EXIT_BCS~PROCESS_INBOUND which solves an encoding issue which prevents incoming E-Mails to be processed on Unicode CRM Systems.

PHP Script to replace mailto action

After this successful test we have to setup a way how the survey can be placed on a public website. You can simply upload the survey to a web server and keep the form action mailto. But that will result in the warning messages we've seen above. So I decided to use my web scripting language of choice PHP to implement a script that will take a GET parameter "SURVEY" to read the survey HTML file with the same name and replace the mailto-action with another PHP Script that will process the POST parameters of the survey and that send out an E-Mail.

Example PHP Script to create mail from form POST parameters

Warning: This PHP Script does not provide any sanitation of the input values. It should be seen for for demonstration purpose only!


$to = '';

while (list($key, $val) = each($_POST)) {
	if($key == 'MIG') {
		$message .= $key . '=' . $val . '&';
	} else {
		$message .= $key . '=' . urlencode(rtrim($val)) . '&';

$status = mail($to,'Survey',$message);

if($status) {
	echo "The Survey was sent and will be processed.";
} else {
	echo "There was an error sending the Survey.";



  1. Guest


        Had we need to define the Mailto : Email id in ERMS? can you please let me know on this.



  2. Guest


    Evaluating the results with button "Evaluation" (Ctrl+Shift+F3) does not seem to work so easily.

    Is there any additional setting required on the background?

    So far I can follow all steps including sending the response per email.
    This response is received in the system (see tcode SOIN).
    How can I verify if it's getting saved?
    When I click Evaluation, no results are given. Are there any reports that need to be runned?

    Many thanks and with kind regards,

  3. Hi Gregor 

    I have followed the steps exactly mentioned here, but the mail will be sent by Outlook is not containing any details as subject/ mail body.

    I  am not sure how the data is being sent to CRM System..

    Is there anything I am missing here.


  4. Thanks a lot for the explanation which is very useful for survey understanding.

    I am still facing an issue wich is similar to Subhasis Panigrahy : if external emails are used, is it possible to link the survey once answered to the object it belongs in crm?

    Indeed, my requirement is to send survey at the end of a service request for example to know external customer satisfaction. Then when answered, we need to know which service request it belongs to .

    is it possible to add an xml tag to the survey that will then link back to the object ?

    thanks a lot for your help,



  5. Hi Gregor,

    is it right that a generated static hmtl can only be transmitted once?

    When I do multiple posts form the same html form, I just update values in backend :-/

    Is there a way that the backend always creates a new entry for every post?