close ad
WARNING: Do Not Install the DREAMWEAVER CC 2017 or 2018 Update »
open ad
View Menu

Technical Support Forums

Free, outstanding support from WebAssist and your colleagues

rating

Universal email formatting body output

Thread began 12/30/2009 4:15 pm by admin140217 | Last modified 1/06/2010 4:38 pm by Jimmy Wu | 1764 views | 8 replies |

admin140217

Universal email formatting body output

Hello,

Everything is working fine with Universal Email but I would like to have the output structured to separate information instead of a single line...

Example:
Currently is name email phone..

would like:
name
email
phone

Basically I want to break the line at the end of that fields output.

I have tried <br>, \n, and \r in the body's dynamic string but it's not working.

Suggestions,

Thanks
Bob

Sign in to reply to this post

Jimmy Wu

Have you tried using <br /> which is the correct line break for XHTML?

Sign in to reply to this post

admin140217

Originally Said By: Jimmy Wu
  Have you tried using <br /> which is the correct line break for XHTML?  


yes, that was tried and I'm still getting a single string output

Sign in to reply to this post

Jimmy Wu

What's the email code look like?

Sign in to reply to this post

admin140217

email code

Jimmy,

The form is typical:
<form action="contact.php" method="post">

The email code from Universal email's output in the WAUE_contact_1.php is below:


//Start Mail Body
$MailBody = $MailBody . "";
$MailBody = $MailBody . ((isset($_POST["company"]))?$_POST["company"]:"");
$MailBody = $MailBody . "\r\n";
$MailBody = $MailBody . "\r\n";
$MailBody = $MailBody . ((isset($_POST["name"]))?$_POST["name"]:"");
$MailBody = $MailBody . "\r\n";
$MailBody = $MailBody . "\r\n";
$MailBody = $MailBody . ((isset($_POST["phone"]))?$_POST["phone"]:"");
$MailBody = $MailBody . "\r\n";
$MailBody = $MailBody . "\r\n";
$MailBody = $MailBody . ((isset($_POST["email"]))?$_POST["email"]:"");
$MailBody = $MailBody . "\r\n";
$MailBody = $MailBody . "\r\n";
$MailBody = $MailBody . ((isset($_POST["comments"]))?$_POST["comments"]:"");
$MailBody = $MailBody . "";
//End Mail Body

Happy New Year!
Bob

Sign in to reply to this post

Jimmy Wu

Do you have an Email_Templates directory in your WA_Universal_Email directory? Universal email will use the templates in that directory to create the emails. These templates would be coded in html.

For example the $MailBody creation should look like this for the email template contactus.php:
//Start Mail Body

$MailBody = $MailBody . "";

ob_start();
require_once(dirname(__FILE__) . ("/Email_Templates/contactus.php"));
$contents = ob_get_clean();

$MailBody = $MailBody . ($contents);
$MailBody = $MailBody . "";
//End Mail Body

What were the steps you took to set up your Universal Email?

Sign in to reply to this post

admin140217

Email templates

Jimmy,

I'm not using a template, I didn't feel that was necessary for a simple form although I will keep this in mind for future forms.

The steps I took were to create the form then apply the Universal email behavior to it going through the tabs in its options panel.

There should be a simple method to create a line break for the field information in the behavior extension, shouldn't there? I would have thought that when formatting the body (in the body tab) HTML, or palin text I could indert a break manually but that doesn't seem to want to work

Bob

Sign in to reply to this post

admin140217

Problem solves

Univeral email seems to want to be in the root directory and not a sub folder, also did hard retuns in the body tab.

Thanks

Sign in to reply to this post

Jimmy Wu

Glad to hear you were able to get the email sent correctly. If you run into any additional issues, feel free to open a new thread.

Sign in to reply to this post

Build websites with a little help from your friends

Your friends over here at WebAssist! These Dreamweaver extensions will assist you in building unlimited, custom websites.

Build websites from already-built web applications

These out-of-the-box solutions provide you proven, tested applications that can be up and running now.  Build a store, a gallery, or a web-based email solution.

Want your website pre-built and hosted?

Close Windowclose

Rate your experience or provide feedback on this page

Account or customer service questions?
Please user our contact form.

Need technical support?
Please visit support to ask a question

Content

rating

Layout

rating

Ease of use

rating

security code refresh image

We do not respond to comments submitted from this page directly, but we do read and analyze any feedback and will use it to help make your experience better in the future.

Close Windowclose

We were unable to retrieve the attached file

Close Windowclose

Attach and remove files

add attachmentAdd attachment
Close Windowclose

Enter the URL you would like to link to in your post

Close Windowclose

This is how you use right click RTF editing

Enable right click RTF editing option allows you to add html markup into your tutorial such as images, bulleted lists, files and more...

-- click to close --

Uploading file...