close ad
 
Important WebAssist Announcement
open ad
View Menu

Technical Support Forums

Free, outstanding support from WebAssist and your colleagues

rating

Advice on how to create email with dynamic content

Thread began 6/09/2019 11:19 am by Steve | Last modified 6/11/2019 10:24 am by Ray Borduin | 437 views | 4 replies |

Steve

Advice on how to create email with dynamic content

Hello,
Is there a way to create the linked email page with dynamic/complicated multiple lines of results?

I have a page that will be run via Cron / Task Scheduler each day. It checks IF there are recordset values present and if so sends off an email that has multiple database record values and runs a Repeat Region to generate the values.

Before I head off and hand code this, I was wondering if there is a way to achieve this with Universal Email? Coding the linked page ( $Email->BodyFile = "../webassist/email/templates/.... ) throws errors where the "includes" are not found.

One option is creating a result that is then saved with formatting etc and then put in a Session.

Any other options?

Sign in to reply to this post

Ray BorduinWebAssist

You should be able to add dynamic content to the email body just like you would any other .php page including repeat regions. The only special code you might need is some global definitions on the top to add any recordsets or connections from the main page you want to use like:

<?php
global $ConnectionName, $RecordsetName
?>

Once you do that, you can use the connections and recorsets from your main page on the email body page as well.

Sign in to reply to this post
Did this help? Tips are appreciated...

Steve

Ray, that worked perfectly... Thanks.

Sign in to reply to this post

SCar87011738

Hello Ray,
in databridge 1 when you edit a mail body, all bindings are recreated automatically.
Now you need to use the code:
<?php
global $ConnectionName, $RecordsetName
?>
or import bindings using the bindings panel + form data to import form fields from another page.
But how can I get other values such us "upload filename"?

Example: in databridge 1 I can get the value
<?php echo $WA_DFP_UploadStatus["WA_UploadResult1"]["serverFileName"]?>
from the binding panel.
But in databridge 2 I cannot get it since it is not present in the binding panel.
How can I reference to this value in databridge 2?
TIA
tony

Sign in to reply to this post

Ray BorduinWebAssist

Add it to the list of globals like:

php:
<?php

global $ConnectionName$RecordsetName$WA_DFP_UploadStatus
?>


Then you can copy and paste the code from the main page into the body and it will work.

Sign in to reply to this post
Did this help? Tips are appreciated...

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...