This question about Using an extension: Closed unanswered

eMails without line breaks

There's a problem with using SendEmailPlugin.

I'd like to send eMails with line breaks, but don't get along with it.

So I wonder about passage:
preserve linebreaks by putting them in a textarea 

But somehow I don't get the plugin sending eMails with line breaks.

Let me show you my code:
<!--
   * Set SURVEYNAME = Feedback zur IT Services
   * Set SURVEYENABLED = yes
-->

%STARTSECTION{"survey"}%
<a name="survey"></a>
<form name="survey" action="%SCRIPTURL{view}%/%WEB%/%TOPIC%" method="post">
<input type="hidden" name="section" value="submission" />
<div class="foswikiFormSteps">

<fieldset>

<div class="foswikiFormStep">
  <table class="foswikiLayoutTable">
    <tr>
      <td width="150">
      <label><input type="radio" value="Idee" id="idee" name="art" %IFDEFINED{"%URLPARAM{"art" multiple="of"}%"}% /> *Idee mitteilen*  </label>
      </td>
      <td width="150">
      <label><input type="radio" value="Feedback" id="feedback" name="art" %IFDEFINED{"%URLPARAM{"art" multiple="of"}%"}% /> *Feedback*  </label>
      </td>
    </tr>
  </table>
</div>

<div class="foswikiFormStep">
  <table class="foswikiLayoutTable">
    <tr>
      <th valign="top">Betreff:</th>
      <td><input type="text" value="" name="betreff" size="60" /><br><br></td>
    </tr>
    </tr>
    <tr>
      <th valign="top">Text:</th>
      <td>
      <textarea class="foswikiTextArea" id="text" name="text" rows="5" cols="70">%URLPARAM{"text"}%</textarea>
      </td>
    </tr>
  </table>
</div>
</fieldset>

  <input type="submit" class="foswikiSubmit" value="Next" %IFDEFINED{"%SURVEYENABLED%" as="no" then=" disabled" }% />
  <span class="foswikiErrorSummary" id="errorSummary" style="display:none"></span>
</div>
</div>
</form>

%INCLUDE{"%TOPIC%" section="javascript"}%
%INCLUDE{"%TOPIC%" section="css"}%
%ENDSECTION{"survey"}%

<verbatim style="display:none">
%STARTSECTION{"submission"}%
---+ Your results on the survey "%SURVEYNAME%"
Please check once again before submitting.

<form enctype="application/x-www-form-urlencoded" name="mailform" action="%SCRIPTURL{sendemail}%/%WEB%/%TOPIC%" method="post">
<input type="hidden" name="to" value="poschwald@testo.de" /> 
<input type="hidden" name="subject" value="%SURVEYNAME%" />
<input type="hidden" name="errorsection" value="error" />
<input type="hidden" name="successsection" value="thanks" />

<textarea name="body" cols="80" rows="5">
AKTION -  %URLPARAM{"art"}%
------------------------------ 
Betreff - %URLPARAM{"betreff"}%
------------------------------
Text -
%URLPARAM{"text"}%

</textarea>

<div class="foswikiFormSteps">
<div class="foswikiFormStep">
</div>

<!--
<blockquote>
attract new %URLPARAM{"nachname"}%
</blockquote>

%IFDEFINEDTHEN{"$percntURLPARAM{\"sap\"}$percnt" glue="off"}%
<blockquote>
%$nopFORMATLIST{"$percntURLPARAM{\"sap\"}$percnt" format="$1" split="\n" separator="<br />"}%
</blockquote>
%IFDEFINED%

<div class="foswikiFormStep">
<blockquote>
%URLPARAM{"text"}%
</blockquote>
-->

</div>

<div class="foswikiFormStep foswikiFormLast foswikiFormButtons">
%T% By clicking on Submit the above information will be send to %MAILTO%.

<input type="submit" class="foswikiSubmit" value="Submit" %IFDEFINED{"%SURVEYENABLED%" as="no" then=" disabled" }% />
</div>
</div>
</form>
%INCLUDE{"%TOPIC%" section="javascript"}%
%INCLUDE{"%TOPIC%" section="css"}%
%ENDSECTION{"submission"}%

%STARTSECTION{"error"}%
---+ Survey: "%SURVEYNAME%"
<form>
  <fieldset>
    <legend>Error</legend>
    <div class="foswikiFormSteps">
      <div class="foswikiFormStep">
        There was an error while processing your request.
      </div>
      <div class="foswikiFormStep">
%SENDEMAIL%
      </div>
      <div class="foswikiFormStep">
        Please, contact %MAILTO% for help.
      </div>
      <div class="foswikiFormStep">
        <input type="button" class="foswikiSubmit" value="OK" onclick="window.location='mailto:%MAILTO%?subject=%ENCODE{"Problem with survey at %WEB%.%TOPIC% "}%&body=%ENCODE{"Hi, I did the following and then an error happened: ..."}%'" />
      </div>
    </div>
  </fieldset>
</form>
%INCLUDE{"%TOPIC%" section="css"}%
%ENDSECTION{"error"}%

%STARTSECTION{"thanks"}%
---+ Survey: "%SURVEYNAME%"
<form>
  <fieldset>
    <legend><b>Thank you</b></legend>
    <div class="foswikiFormSteps">
      <div class="foswikiFormStep">
        <h4>Thank you participating in this survey.</h4>
        We will process your submission as soon as possible.
        Regards, your foswiki team.
      </div>
      <div class="foswikiFormStep">
        <input type="submit" value="Ok" class="foswikiSubmit"  %IFDEFINED{"%SURVEYENABLED%" as="no" then=" disabled" }% />
      </div>
    </div>
  </fieldset>
</form>
%INCLUDE{"%TOPIC%" section="css"}%
%ENDSECTION{"thanks"}%

%STARTSECTION{"javascript"}%
%JQREQUIRE{"validate"}%
<literal>
<script type="text/javascript">
jQuery(function($) {
  $("#surveyForm").
    bind("invalid-form.validate", function(e, validator) {
      var errors = validator.numberOfInvalids();
      if (errors) {
        $("#errorSummary").html("There was an error. Please, see above.").show();
      } else {
        $("#errorSuummary").hide();
      }
    }).
    validate({
    rules: {
       text: "required",
       nachname: {
         required: true,
       },
       sap: {
         required: true,
       }
    }
  });
});
</script>
%ENDSECTION{"javascript"}%

%STARTSECTION{"css"}%
<literal>
<style type="text/css">
.natTopicForm {display:none}
label.error {padding:2em 0em;}
</style>
</literal>
%ENDSECTION{"css"}%
</verbatim>


You already asked Question787. Instead of answering you have posted a new question about the same subject. This just creates more work for everyone.

-- ArthurClemens - 07 Feb 2011

QuestionForm edit

Subject Using an extension
Extension SendEmailPlugin
Version Foswiki 1.0.7
Status Closed unanswered
Topic revision: r3 - 09 Feb 2011, PatrickOschwald
The copyright of the content on this website is held by the contributing authors, except where stated elsewhere. See Copyright Statement. Creative Commons License    Legal Imprint    Privacy Policy