Metastorm BPM : Sending Mail

Metastorm has a built in function for sending emails as part of stage or action logic which is available through the integration wizard. There are many reasons why emails may need to be sent from a procedure however the most common example tends to be the notification of a metastorm user when their action is required. This functionality utilizes the SMTP service that is installed with the POP3 service so this must be installed in order for Metastorm BPM to transfer mail to the receiving mail host.

Registry Settings

The Mail Connector settings for Metastorm BPM can be located at HKEY_LOCAL_MACHINE\SOFTWARE\Metastorm\e-work\Engine\MailConnector\Connector.  The key will look something like the following:


The most useful settings are shown above. HTML as the mail format should be used unless you are restricted to using mail clients that can only display plain text (like some POP3 services). MIME is also the preferred message encoding style.

Example Syntax

%Email(“”,”CC Address”,”Email Subject”,”<p>Dear %Originator<br><br>You need to action a folder.<br><br><a href=””http://localhost/metastorm/efolder.aspx?folderid=%FolderID“”>Click here to view in a new window</a></p>”,”attachments”,”reply address”)

You’ll see that HTML tags are included in this sample. This is best practice for creating well formatted mails since the %NewLine() and %LineFeed() functions don’t work so well.  I have also included the direct path to a particular folder that requires the email recipients action. Another important point to note is the escaping of double quotes, this should be done to avoid problems with the engine attempting to interpret one set of double quotes (“) as a parameter break as it will conclude that you’ve got a lot more parameters than the basic 5 for this function. Therefore ” needs to be “”.


The result is a HTML mail as expected. Please remember that clicking the link is a useless exercise!

From: []
Sent: 12 October 2009 16:32
To: BpmTalk Team
Subject: Email Subject

Dear Bob,

You need to action a folder.

Click here to view in a new window



    1. Thanks Jerome, I’ve created a site link to your forums (have used them once or twice before myself). It’s clearly one of the best Metastorm resources out there.


  1. Hi,

    Thanks for the explanation, although I’m interested in just how this works. MS documentation states that this function uses cdonts.dll to send email – does this act as a standalone SMTP server or will there be a connection string somewhere pointing to an exchange instance?

Leave a Reply

Fill in your details below or click an icon to log in: Logo

You are commenting using your account. Log Out /  Change )

Google+ photo

You are commenting using your Google+ account. Log Out /  Change )

Twitter picture

You are commenting using your Twitter account. Log Out /  Change )

Facebook photo

You are commenting using your Facebook account. Log Out /  Change )


Connecting to %s