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.
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.
%Email(“email@example.com”,”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!
Sent: 12 October 2009 16:32
To: BpmTalk Team
Subject: Email Subject
You need to action a folder.