I often get questions about sending emails from Xcelsius. In fact, I get them so often, I thought I’d take a moment to document what I know. Here, I’ll show you how to :
- Send a basic email
- Send an email to multiple recipients
- Add a Body to you email
- Prevent that awful Browser window from popping up when sending an email from Xcelsius.
First, you’ll want to add a simple URL button onto your canvas and go to properties:
To start a basic email, enter this into the URL input box:
mailto:email@example.com?subject=Email To DataPig
This will start a basic email when URL button is pressed. The email will have the To line filled in and the Subject line filled in.
If you want to send the email to multiple recipients, you can include other addresses separating each with a comma. Like this:
mailto:firstname.lastname@example.org, email@example.com?subject=Email To DataPig
Want to use the CC and BCC lines? That’s easy. Simply add the cc and bcc parameters:
mailto:firstname.lastname@example.orgemail@example.comfirstname.lastname@example.org&subject=Email To DataPig
Notice that you will need to use the ampersand (&) to separate the parameters
OK, let’s get fancier and add a body.
mailto:email@example.comfirstname.lastname@example.orgemail@example.com&;subject=Email To DataPig&body=I ate too much salmon.
If you need to add a multi-lined body (meaning the text of your body is on multiple lines), you can use your own carriage return encoding %0D.
To be able to use this, you will need to uncheck the “Encode URL” option. This will tell Xcelsius that you will handle the encoding.
Once you’ve disabled Xclesius’s encoding, you can enter something like this:
mailto:firstname.lastname@example.orgemail@example.comfirstname.lastname@example.org&subject=Email To DataPig&body= I ate too much salmon.%0DNow I have salmonella.
And as always, you can dynamically build your mailto url address in Excel with formulas and simply reference it in the URL button.
So what about that nasty browser window that pops up when you send an email from Xclesius?
You can get rid of it by changing the “Open In” option to ‘This Window’.
After doing this, the extra browser window doesn’t open when you export your final SWF and HTML. You’ll still see it when you are in Preview mode, but rest assured, it will be gone when you go to run-time.
There you have it! Happy emailing!
Mike Alexander is the author of several books on advanced business analysis, including Crystal Xcelsius For Dummies. You can find Mike at Datapig Technologies, where he serves as principle contributor and shares free video tutorials with the Microsoft Office and Xcelsius communities.