Send a basic and formatted e-mail message from a workflow
In workflow designing, Send E-mail is the arguably the most popular and commonly used action. Now the out of the box formatting used by the designer is something most of us would like to modify so as to improve the look and feel of the mail which is generated by the workflow. However the editor of the e-mail body does not contain any formatting tools, this can be done by the designer……………Read On
Since the Workflow Designer supports only inline styles for formatting messages, and not external or embedded cascading style sheet (CSS) formatting, you must do any formatting that you want by using the style attribute with HTML tags. You can do this either by typing the HTML tags directly into the Define E-mail Message dialog box in the Workflow Designer, or by creating the body of your message in Code view and Design view and then pasting it into the Define E-mail Message dialog box.
Design the HTML needed in the body
There are two considerations when you use HTML in workflows :
Consideration 1
Consideration 2
3. Delete the default text in the Code Pane. 4. Copy and Paste the following text as an example in the Code Pane.
3. Delete the default text in the Code Pane.
4. Copy and Paste the following text as an example in the Code Pane.
<table style="border-collapse: collapse; width: 100%" dir="ltr" cellspacing="0"> <tr style="background-color: #f8f8f9; border: thin #e8eaec solid"> <td style="font-family: Verdana; font-size: 16pt; background-color: #f8f8f9; border: thin #e8eaec solid; padding: 20px 20px 20px 20px"> An announcement has been added by <strong style="color: #008B00; font-variant: small-caps">[*****LOOKUP Created By*****]</strong></td> </tr> <tr> <td></td> </tr> <tr style="background-color: #f8f8f9; border: thin #e8eaec solid"> <td style="font-family: Verdana; font-size: 14pt; background-color: #f8f8f9; border: thin #e8eaec solid; padding: 10px 40px 10px 40px"> Item Details</td> </tr> <tr> <td style="font-family: Calibri; font-size: 12pt; padding: 5px 60px 5px 60px"> <ul style="margin-top: 5px; margin-bottom: 5px"> <li style="margin-top: 1px; margin-bottom: 1px">Title: [*****LOOKUP TITLE*****]</li> <li style="margin-top: 1px; margin-bottom: 1px">Expiration Date: [*****LOOKUP EXPIRATION DATE*****]</li> </ul> </td> </tr> </table> 5. Click anywhere in the Design Pane, in order to see how your mail body would look like. 6. Perform the changes you wish. 7. Now remove the whitespace as explained in the previous Note section.
<table style="border-collapse: collapse; width: 100%" dir="ltr" cellspacing="0"> <tr style="background-color: #f8f8f9; border: thin #e8eaec solid"> <td style="font-family: Verdana; font-size: 16pt; background-color: #f8f8f9; border: thin #e8eaec solid; padding: 20px 20px 20px 20px"> An announcement has been added by <strong style="color: #008B00; font-variant: small-caps">[*****LOOKUP Created By*****]</strong></td> </tr> <tr> <td></td> </tr> <tr style="background-color: #f8f8f9; border: thin #e8eaec solid"> <td style="font-family: Verdana; font-size: 14pt; background-color: #f8f8f9; border: thin #e8eaec solid; padding: 10px 40px 10px 40px"> Item Details</td> </tr> <tr> <td style="font-family: Calibri; font-size: 12pt; padding: 5px 60px 5px 60px"> <ul style="margin-top: 5px; margin-bottom: 5px"> <li style="margin-top: 1px; margin-bottom: 1px">Title: [*****LOOKUP TITLE*****]</li> <li style="margin-top: 1px; margin-bottom: 1px">Expiration Date: [*****LOOKUP EXPIRATION DATE*****]</li> </ul> </td> </tr> </table>
<table style="border-collapse: collapse; width: 100%" dir="ltr" cellspacing="0">
<tr style="background-color: #f8f8f9; border: thin #e8eaec solid">
<td style="font-family: Verdana; font-size: 16pt; background-color: #f8f8f9; border: thin #e8eaec solid; padding: 20px 20px 20px 20px">
An announcement has been added by
<strong style="color: #008B00; font-variant: small-caps">[*****LOOKUP Created
By*****]</strong></td>
</tr>
<tr>
<td></td>
<td style="font-family: Verdana; font-size: 14pt; background-color: #f8f8f9; border: thin #e8eaec solid; padding: 10px 40px 10px 40px">
Item Details</td>
<td style="font-family: Calibri; font-size: 12pt; padding: 5px 60px 5px 60px">
<ul style="margin-top: 5px; margin-bottom: 5px">
<li style="margin-top: 1px; margin-bottom: 1px">Title: [*****LOOKUP
TITLE*****]</li>
<li style="margin-top: 1px; margin-bottom: 1px">Expiration Date: [*****LOOKUP
EXPIRATION DATE*****]</li>
</ul>
</td>
</table>
5. Click anywhere in the Design Pane, in order to see how your mail body would look like.
6. Perform the changes you wish.
7. Now remove the whitespace as explained in the previous Note section.
Formatting
Format text as usual by using WYSIWYG tools in Design view
A few best practices
Not Supported
The following options are not supported by the current version of the Send an Email action
Reference Send e-mail in a workflow (Office.microsoft.com)
Specifying an address on the From line. (E-mail messages sent by the workflow always show the e-mail address specified by the server administrator on the From line. Only the server administrator can change this, and it can only be changed for all notifications in the current Web application, not per workflow.)
Thanks so much for the above info. Not sure anyone else has figured out that you can use what you described above in Sharepoint workflows, i.e. emails for text formatting. CSS does not work and some other styles have been deprecated with newer HTML adoptions.
Specifying a Bcc (blind carbon copy) recipient for a message is possible through Advanced properties in the SPD.