close ad
 
Important WebAssist Announcement
open ad
View Menu

Web development tutorial

Getting Started with Universal Email

Tutorial created by Ray Borduin, WebAssist

Categories: Data Bridge, eCart, Design, Dreamweaver, MySQL, PHP

rating

Universal Email adds email functionality to your page. You may want to email the contents of a form when the form is submitted or you might have a newsletter that you want to email to your customer list.

This tutorial will guide you through applying Universal Email to a form, so that the contents entered into the form will be included in the email. In addition, we will discuss two of the most useful new features of Universal Email 4, File Manipulation and Email Delay for mass mailing.

arrow downRequirements

You will need the following items before starting this tutorial:

  1. Universal Email 4
  2. Dreamweaver CS3 or later
  3. Dreamweaver site defined
  4. PHP page open in Dreamweaver
    If a page is not open in Dreamweaver, the access point to launch Universal Email will be disabled.
  5. Optional: A connection to a MySQL database
    Required for email logging or sending emails from a recordset or database.

arrow downLaunching Universal Email

If you want to have a form that can be completed online and when submitted will email the entered contents, you will first need to create a PHP page with the appropriate form fields and elements. Any PHP page with standard form fields will work, but for a more fully-featured form, you can use CSS Form Builder and create any form type you desire.

Once you have created your form and are ready to apply Universal Email, make sure your site is defined properly in the Dreamweaver Files Panel, then open the PHP page that contains your form.

For more information on defining a site in Dreamweaver see the Defining a Dynamic Site in Dreamweaver tutorial.
  1. From the Insert menu, choose WebAssist > Create Email Message.


From the Universal Email Quick Insert interface you can specify all the basic details for your email. Many users could simply enter the static details in the appropriate fields and click Finish to apply the necessary email behaviors to your form. However, for more custom options, continue along with this tutorial.

arrow downEmail Settings

The following introduces the basic email settings available in the Quick Insert panel. Universal Email tries to provide a working setting by default, but you may want to change these to suit your needs.

  1. From the Trigger menu, choose when you want the email to be submitted.
    The default option will usually work, but you could be more specific with your form and choose when your form's button is pressed.

  2. From the Go To Page field, enter the path or browse for a file you wish to navigate to after the email is sent.
    You can leave this blank if you want to stay on the current page.

    Specifying Priority

    Email priority is sometimes specified to alert the recipient of the email that something is of high or low importance

  3. From the Toolbar, click the down arrow if you wish the email to be sent with low priority, choose the exclamation mark to set high priority.
    Only one of the two priority options can be selected at a time. If you choose one when the other is already selected, it will deselect the other.

    From, To, CC, and BCC addresses

    The next four text fields in the interface allow you to specify who the email will be delivered to, and who it will appear to come from.

    These four fields can be defined statically, or dynamically. For example, you may want this email to always contain the same address in the From field, if that is the case, you can enter a static address in the From field such as "myemail@email.com".

    Each option has additional settings that can be exposed by clicking the button to the left of each field.


    The From Field

    In the From field, you can define what email address you want the email that is sent to appear to have come from. In many cases, users will enter a fake email address such as no-reply@email.com to encourage recipients to not reply using that address.

  4. In the From text field, enter the email address you wish the email to come from.
    To define a dynamic address click the value lightning bolt. For example, if you are applying Universal Email to a form, you could specify the field where the user enters their address.

    The To Field

    In the To field, you can specify the email address you wish the email to be sent to. This could be sent to multiple email addresses, or just a single address. Depending on your application, you will want to define static or dynamic email addresses.

    1. Contact Forms: For most contact forms, you will want the email to come directly to you. In this case, you would simply enter the static email address where you want to receive these emails.
    2. User Management: If you are sending emails to customers for user registration, email receipt, etc., you will most likely want to select the dynamic lightning bolt and choose the appropriate dynamic binding.
    3. Bulk Emailing: If you are planning on sending your email to a large number of recipients, you will want to configure more advanced options for sending your email. Click the To... button to the left of the To field to expose these options.


  5. In the To field, enter the email address or choose a dynamic option depending on your needs (see above).
    Configuring the advanced To options is detailed below in the Advanced To Options section.

    The CC and BCC Fields

    The CC and BCC fields are not required and can be configured in very much the same manner as the To fields. However, the Advanced To field options are not available for these two fields. In most cases, when bulk emailing, you can avoid requiring the CC and BCC options by defining the Advanced To options to only send one email per recipient.

  6. Specify the CC and BCC fields as desired.
    The To, CC and BCC fields can contain multiple static email addresses or a combination of static and dynamic addresses. If entering multiple static address, simply entering a comma (,) to separate these addresses will work.


At this point, you have given Universal Email enough information to click Finish and your email functionality will most likely work. However, you might want to add attachments, configure email logging, or email delay settings. If so, continue reading...

arrow downAttachments

Including attachments with your email is very straightforward with Universal Email. You can choose to attach a static file, attach files retrieved from a Recordset, or new to Universal Email 4, allow the user to specify a file to be attached when they submit the form.

  1. To specify any attachments, click the Attachment icon from the toolbar.

  2. Click Add to specify the details for the attachment.
    The Add and Delete options allow you to configure multiple attachments for the email.

  3. If you wish to specify a static file, simply specify the path to that file using the browse option for Enter value.
    The file you specify must already be uploaded to your server in order to be attached to the email.

  4. If you have a recordset defined that you want to retrieve the attachments from, select the Recordset loop option and specify the database column that will contain the paths to the files.
    If you want to use this feature, you will need to have configured a database connection and created the recordset prior to launching Universal Email.

  5. If a file field exists on your current page, you will be able to select that file field from the Submitted File option. This will allow your form user to browse for the file they want to attach to the email.

  6. Click OK once you have configured all your attachment settings.

arrow downEmail Logging

The Email Logging feature allows you to store information in your database for every email that is sent. This tracks success or failure to help you determine if your emails are leaving your server correctly. Other useful information that is stored include error messages, email body, who the email sent to, and more.

To use this feature, you will need to have configured a MySQL database prior to opening Universal Email.

The Email Logging feature will not be able to determine if an email address in fact exists. It cannot record information regarding the email once it leaves your own server.
  1. To configure email logging, click the Email Logging button from the Toolbar.

  2. From the Event menu, choose when you want information stored in your database.

    1. On Success or Failure: Record information in the database for every email that it sent.
    2. On Success: Record information in the database whenever an email succeeds.
    3. On Failure: Record information in the database whenever an email fails.


    You can specify different actions for the 3 different events. However, most users will find it easier to use On Success or Failure, and to filter the information from the database that they need.

  3. In the Response menu, choose what you would like to do when the specified event occurs.

    1. Do nothing: Will not log anything for the selected event.
    2. Create the Log Table For Me: Will automatically create an email_log table in your database with all the necessary bindings already created. This will insert a new record for each email address that you send an email to.
    3. Insert Record: Will insert a new record in your database for each email address each time you send an email, when the selected event occurs.
    4. Update Record: Will update the status column for each email address that you send an email to, when the selected event occurs.


    For most users that want to utilize this feature, simply choosing the Create the Log Table For Me option will record all the necessary information they need, without requiring any database knowledge.

  4. Click OK when you are finished.

arrow downCustomizing the Email Design

Determining the design of your email can be a challenging task. The more complex your design becomes, the less likely it will appear consistent across all email clients. Microsoft Outlook 2007 and higher uses the MS Word engine to render your emails. Therefore, you will likely want to focus on creating a more table based layout for your email, since Word does not typically render CSS/HTML as it does it modern browsers.

When using the Create a file for your email option, the webassist/email/templates folder must be uploaded manually to your site before the email body will show to users trying to view your emails.


To make the creation of the email design a less cumbersome task, Universal Email 4 includes preset email designs for you to choose from and then modify to suit your needs. These have been tested across a number of email clients and should work for most users needs.

  1. In the Email body section, choose the Create a file for your email checkbox.
    It is recommended that you choose one of these preset designs instead of manually creating your email design from scratch. You are free to completely customize these designs from within Dreamweaver after applying Universal Email.

  2. If you wish to use one of the preset email designs, choose your preferred design from the list.
    You can also browse to a file you wish to be emailed by choosing the browse option.

  3. Alternatively, you can manually create the email you wish to use by clicking the DW Edit button, or the Edit icon.
    When using these options, the email content that you create will not be a separate file like it would if you selected a design preset or browsed for a file.

  4. When you are finished, click Finish to apply Universal Email.


Once Universal Email closes, if you chose to create a file for your email, that file will open in Dreamweaver for you to make modifications to. You can change the content of this file at any time to customize the appearance or content of the email that is sent.

arrow downAdvanced To Options

The Advanced To interface includes a number of settings that are useful if your email is intended for multiple recipients. This includes the email delay option will allows you to attempt to bypass any send limits that are set by your hosting provider.

  1. To access this interface, click the To... button next to the To field.

  2. From the Send email list, choose Once Per Entry or To all entries at once.

    1. Once Per Entry: Will send a separate email for each recipient.
    2. To all entries at once: Will send one email with all recipients in the To field.


    In order to use the Email Delay options, you must select Once Per Entry.

  3. Click Add to configure the recipient of your email.
    The Add and Delete options allow you to specify multiple recipients, through multiple means. For example, you can enter a static address to be included and then click Add again to specify from file.

  4. From the three options available specify where the email addresses are to be retrieved, or enter a static address.

    1. Enter value: Allows you to enter a static email address as a recipient.
    2. Recordset loop: Allows you to choose a Recordset and column that contains the email addresses you wish to be emailed.
      In order to use this option you must have a MySQL database connection defined, and a recordset already created on the page you are applying Universal Email to.
    3. From file: Allows you to browse for a file that contains email addresses. Universal Email will send the email to all correctly formatted email addresses found in that file.
      Any file format should work as Universal Email simply looks for email addresses among all the other data. However, we recommend CSV, XML or TXT files if you are unsure which file format to use.



    Email Limits

    In the Email Limits section, you can attempt to bypass your hosting provider's send rate limitations. If you know the specific limitations, it is easier to accurately configure these settings. Check this page for more information, or contact your hosting provider for more information.

  5. In the Wait field, enter how many seconds Universal Email should wait between sending emails.

  6. In the other two fields, specify how many emails to be sent each minute.
  7. When you are finished, click OK.
  8. Once you have completed specifying your email settings, click Finish to apply Universal Email.

arrow downAdding a Progress Bar

If you are sending emails to a large mail list, you may find it helpful to add a progress bar to your page after applying Universal Email.

The Universal Email progress bar will display the number of emails sent and remaining, as well as the amount of seconds left until all the emails are sent.

  1. After applying Universal Email, from the Insert menu, choose WebAssist > Progress Bar.
  2. From the Category menu, choose the Universal Email option.

  3. Choose the Design that best suits your page.
  4. Click OK to apply the progress bar to your page.


Although the progress bar is useful for seeing the process for sending many emails, it is not necessary, and you can always navigate away from the page after it starts sending the emails.

If the email is not being sent to many recipients, you may never see the progress bar as it will only display for as long as it takes to send all the emails.

arrow downFile Manipulation

Universal Email 4 not only includes email functionality. It contains all the file management features found in the older Digital File Pro. For more information on using the File Manipulation features of Universal Email 4, see the following tutorial:

  1. Applying File Manipulation Functionality with Universal Email 4

arrow downReviews and comments

Comments will be sent to the author of this tutorial and may not be answered immediately. For general help from WebAssist, please visit technical support.

Sign in to add comments
rating

thepair: 10 Years, 9 Months, 3 Weeks, 3 Days, 17 Hours, 43 Minutes ago

I have followed these instructions and the form works on 55 email addresses but no progress bar shows.

Team WebAssist: 10 Years, 9 Months, 3 Weeks, 3 Days, 17 Hours, 18 Minutes ago

Hi thepair, Click on help in the main website menu and give us some more details about the problem - and the platform you're using - and we will provide you technical support at no cost.

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.