Formit - how to recieve nicely formatted messages

HI,

search the internet and forums but nothing came up.

when I receive a message from my contact form the message depending on which mail client I check, can have all the spaces removed as well as the carriage returns.

is there a way to have message formatted so it keeps the styling in all mail programs.

i have tried allowtags, but maybe not using it correctly.

<div id="fp_contact_form_wrapper">
[[!FormIt?
&hooks=`spam,email,redirect,FormItAutoResponder,`
&emailTpl=`sentEmailTpl`
&emailSubject=`Message from efriendseigoura.com`
&redirectTo=`17`
&emailTo=`my email goes here`
&emailBCC=`my email goes here `
&store=`1`
&validate=`contact_name:required:minLength=^2^,contact_email:email:required,contact_message:required:allowTags=^<ul><li><strong><em><ol><p>^,contact_confirmemail:blank`
&fiarTpl=`autoResponseTpl`
&fiarToField=`contact_email`
&fiarSubject=`Thank You for Contacting E-Friends`
&fiarFrom=`my email goes here`
&fiarFromName=`efriendseigomura.com`
&fiarReplyTo=`my email goes here`

]]


<form id="contactForm" class="cmxform" method="post" action="[[~[[*id]]]]">

<h2><a name="contact">Contact コンタクト</a></h2>
<div>
<label for="contact_name">Your Name 名前:</label><em>(required, at least 2 characters)</em><br />
<input id="contact_name" name="contact_name" size="30" class="required" minlength="2" value="[[!+fi.contact_name]]" />
</div>
</br>

<div>
<label for="contact_email">Your Email Address メールアドレス:</label><em>(required)</em>
<br />
<input id="contact_email" name="contact_email" size="30"  class="required email" value="[[!+fi.contact_email]]" />
</div>
</br>

<div>
<input type="email" name="contact_confirmemail" value="[[+fi.contact_confirmemail]]" class="visuallyhidden" autocomplete="off" placeholder="P l e a s e  l e a v e  e m p t y!">
 </div>
 </br>


<div>
<label for="contact_message">Message メッセージ:</label><em>(required)</em>
<br />
<textarea id="contact_message" name="contact_message" cols="32" rows="7" class="required">[[!+fi.contact_message]]</textarea>
</div>
</br>


<div>
<input name="submit" class="submit" type="submit" value="Submit"/>
</div>

</form>

	</div> <!-- ContactForm -->

regards Tim

Maybe you can set the property emailConvertNewlines to 1 so that new lines are converted to <br> (PHP function nl2br) or use a <pre> element in your chunk “sentEmailTpl” to preserve multiple spaces.

Or don’t send a HTML-mail at all (&emailHtml=`0` ).


The property allowtags defines, whether html tags should be preserved in the text or removed (with the PHP function strip_tags). So I don’t think this affects new line or space characters.

thank you,

you guided me in the right direction.

Regards Tim

This topic was automatically closed 2 days after discussion ended and a solution was marked. New replies are no longer allowed. You can open a new topic by clicking the link icon below the original post or solution and selecting “+ New Topic”.