How To: A custom workflow(Approval) to send the notification emails with custom message appended at the end


task.createWssTask_TaskProperties1.EmailBody = @"<!DOCTYPE html PUBLIC '-//W3C//DTD XHTML 1.0 Transitional//EN' 'http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd'>
<html xmlns='http://www.w3.org/1999/xhtml' xmlns:m='http://schemas.microsoft.com/office/2004/12/omml' xmlns:v='urn:schemas-microsoft-com:vml' xmlns:o='urn:schemas-microsoft-com:office:office'>

<head>
<meta http-equiv='Content-Type' content='text/html; charset=utf-8' />
<title>Untitled 1</title>
<style type='text/css'>
table.MsoNormalTable
    {font-size:10.0pt;
    font-family:'Times New Roman','serif';
}
p.MsoNormal
    {margin-bottom:.0001pt;
    font-size:12.0pt;
    font-family:'Times New Roman','serif';
        margin-left: 0in;
    margin-right: 0in;
    margin-top: 0in;
}
a:link
    {color:#003399;
    text-decoration:none;
    text-underline:none;
    text-decoration:none;
    text-line-through:none;
}
</style>
</head>

<body>

<table class='MsoNormalTable' border='0' cellspacing='0' cellpadding='0' width='100%' style='width:100.0%;border-collapse:collapse;mso-yfti-tbllook:1184'>
    <tr style='mso-yfti-irow:0;mso-yfti-firstrow:yes'>
        <td style='border: solid #E8EAEC 1.0pt; mso-border-alt: solid #E8EAEC .75pt; background: #F8F8F9; padding: 12.0pt 7.5pt 15.0pt 7.5pt'>
        <p class='MsoNormal'>
        <span style='font-size:16.0pt;font-family:&quot;Verdana&quot;,&quot;sans-serif&quot;;
  mso-fareast-font-family:&quot;Times New Roman&quot;;mso-bidi-font-family:Tahoma'>
        Task assigned by System Account on " + System.DateTime.Today + @".<o:p></o:p></span></p>
        </td>
    </tr>
    <tr style='mso-yfti-irow:1'>
        <td style='border:none;border-bottom:solid #E8EAEC 1.0pt;mso-border-top-alt:
  solid #E8EAEC .75pt;mso-border-top-alt:solid #E8EAEC .75pt;mso-border-bottom-alt:
  solid #E8EAEC .75pt;padding:12.0pt 7.5pt 24.0pt 7.5pt'>
        <p class='MsoNormal'>
        <span style='font-size:8.0pt;font-family:&quot;Tahoma&quot;,&quot;sans-serif&quot;;
  mso-fareast-font-family:&quot;Times New Roman&quot;'>" + (string.IsNullOrEmpty(this.initFormData["Description"] as string) ? "No instructions were provided." : this.initFormData["Description"] as string) + @"<o:p></o:p>
        </span></p>
        </td>
    </tr>
    <tr style='mso-yfti-irow:2;mso-yfti-lastrow:yes'>
        <td style='border:none;border-bottom:solid #9CA3AD 1.0pt;mso-border-top-alt:
  solid #E8EAEC .75pt;mso-border-top-alt:solid #E8EAEC .75pt;mso-border-bottom-alt:
  solid #9CA3AD .75pt;padding:4.0pt 7.5pt 4.0pt 7.5pt'>
        <p class='MsoNormal'>
        <span style='font-size:8.0pt;font-family:&quot;Tahoma&quot;,&quot;sans-serif&quot;;
  mso-fareast-font-family:&quot;Times New Roman&quot;'>To complete this task:<o:p></o:p></span></p>
        <p class='MsoNormal' style='mso-margin-top-alt:auto;mso-margin-bottom-alt:auto;
  margin-left:.5in;text-indent:-.25in;mso-list:l0 level1 lfo1;tab-stops:list .5in'>
        <![if !supportLists]>
        <span style='font-size:8.0pt;font-family:&quot;Tahoma&quot;,&quot;sans-serif&quot;;mso-fareast-font-family:
  Tahoma'><span style='mso-list:Ignore'>1.<span style='font:7.0pt &quot;Times New Roman&quot;'>&nbsp;&nbsp;&nbsp;&nbsp;
        </span></span></span><![endif]>
        <span style='font-size:8.0pt;font-family:&quot;Tahoma&quot;,&quot;sans-serif&quot;;
  mso-fareast-font-family:&quot;Times New Roman&quot;'>Review
        <a href='http://terminator:30030/s2/Shared%20Documents/README.txt'>
        README.txt</a>.<o:p></o:p></span></p>
        <p class='MsoNormal' style='mso-margin-top-alt:auto;mso-margin-bottom-alt:auto;
  margin-left:.5in;text-indent:-.25in;mso-list:l0 level1 lfo1;tab-stops:list .5in'>
        <![if !supportLists]>
        <span style='font-size:8.0pt;font-family:&quot;Tahoma&quot;,&quot;sans-serif&quot;;mso-fareast-font-family:
  Tahoma'><span style='mso-list:Ignore'>2.<span style='font:7.0pt &quot;Times New Roman&quot;'>&nbsp;&nbsp;&nbsp;&nbsp;
        </span></span></span><![endif]>
        <span style='font-size:8.0pt;font-family:&quot;Tahoma&quot;,&quot;sans-serif&quot;;
  mso-fareast-font-family:&quot;Times New Roman&quot;'>Perform the specific
        activities required for this task.<o:p></o:p></span></p>
        <p class='MsoNormal' style='mso-margin-top-alt:auto;mso-margin-bottom-alt:auto;
  margin-left:.5in;text-indent:-.25in;mso-list:l0 level1 lfo1;tab-stops:list .5in'>
        <![if !supportLists]>
        <span style='font-size:8.0pt;font-family:&quot;Tahoma&quot;,&quot;sans-serif&quot;;mso-fareast-font-family:
  Tahoma'><span style='mso-list:Ignore'>3.<span style='font:7.0pt &quot;Times New Roman&quot;'>&nbsp;&nbsp;&nbsp;&nbsp;
        </span></span></span><![endif]>
        <span style='font-size:8.0pt;font-family:&quot;Tahoma&quot;,&quot;sans-serif&quot;;
  mso-fareast-font-family:&quot;Times New Roman&quot;'>Use the <b>Edit this task</b>
        button to mark the task as completed. (If you cannot update this task,
        you might not have access to it. Click
        <a href='http://terminator:30030/s2/Lists/Tasks/DispForm.aspx?ID=11'>
        here</a> to request access.)<o:p></o:p></span></p>
        </td>
    </tr>
    <tr style='mso-yfti-irow:2;mso-yfti-lastrow:yes'>
        <td style='border:none;border-bottom:solid #9CA3AD 1.0pt;mso-border-top-alt:
  solid #E8EAEC .75pt;mso-border-top-alt:solid #E8EAEC .75pt;mso-border-bottom-alt:
  solid #9CA3AD .75pt;padding:4.0pt 7.5pt 4.0pt 7.5pt'>
        <p class='MsoNormal'>
        <span style='font-size:8.0pt;font-family:&quot;Tahoma&quot;,&quot;sans-serif&quot;;
  mso-fareast-font-family:&quot;Times New Roman&quot;'>If you are using Word 2007<o:p></o:p></span></p>
        <p class='MsoNormal' style='mso-margin-top-alt:auto;mso-margin-bottom-alt:auto;
  margin-left:.5in;text-indent:-.25in;mso-list:l0 level1 lfo1;tab-stops:list .5in'>
        <![if !supportLists]>
        <span style='font-size:8.0pt;font-family:&quot;Tahoma&quot;,&quot;sans-serif&quot;;mso-fareast-font-family:
  Tahoma'><span style='mso-list:Ignore'>4.<span style='font:7.0pt &quot;Times New Roman&quot;'>&nbsp;&nbsp;&nbsp;&nbsp;
        </span></span></span><![endif]>
        <span style='font-size:8.0pt;font-family:&quot;Tahoma&quot;,&quot;sans-serif&quot;;
  mso-fareast-font-family:&quot;Times New Roman&quot;'>Review
        <a href='http://terminator:30030/s2/Shared%20Documents/README.txt'>
         doc-approval workflow.</a>.<o:p></o:p></span></p>
        <p class='MsoNormal' style='mso-margin-top-alt:auto;mso-margin-bottom-alt:auto;
  margin-left:.5in;text-indent:-.25in;mso-list:l0 level1 lfo1;tab-stops:list .5in'>
        <![if !supportLists]>
        <span style='font-size:8.0pt;font-family:&quot;Tahoma&quot;,&quot;sans-serif&quot;;mso-fareast-font-family:
  Tahoma'><span style='mso-list:Ignore'>5.<span style='font:7.0pt &quot;Times New Roman&quot;'>&nbsp;&nbsp;&nbsp;&nbsp;
        </span></span></span><![endif]>
        <span style='font-size:8.0pt;font-family:&quot;Tahoma&quot;,&quot;sans-serif&quot;;
  mso-fareast-font-family:&quot;Times New Roman&quot;'>Perform the specific activities required for this task.<o:p></o:p></span></p>
        <p class='MsoNormal' style='mso-margin-top-alt:auto;mso-margin-bottom-alt:auto;
  margin-left:.5in;text-indent:-.25in;mso-list:l0 level1 lfo1;tab-stops:list .5in'>
        <![if !supportLists]>
        <span style='font-size:8.0pt;font-family:&quot;Tahoma&quot;,&quot;sans-serif&quot;;mso-fareast-font-family:
  Tahoma'><span style='mso-list:Ignore'>6.<span style='font:7.0pt &quot;Times New Roman&quot;'>&nbsp;&nbsp;&nbsp;&nbsp;
        </span></span></span><![endif]>
        <span style='font-size:8.0pt;font-family:&quot;Tahoma&quot;,&quot;sans-serif&quot;;
  mso-fareast-font-family:&quot;Times New Roman&quot;'><b>Edit this task</b>
        to mark the task as completed.<o:p></o:p></span></p>
        </td>
    </tr>

<tr style='mso-yfti-irow:2;mso-yfti-lastrow:yes'>
        <td style='border:none;border-bottom:solid #9CA3AD 1.0pt;mso-border-top-alt:
  solid #E8EAEC .75pt;mso-border-top-alt:solid #E8EAEC .75pt;mso-border-bottom-alt:
  solid #9CA3AD .75pt;padding:4.0pt 7.5pt 4.0pt 7.5pt'>
        <p class='MsoNormal'>
        <span style='font-size:8.0pt;font-family:&quot;Tahoma&quot;,&quot;sans-serif&quot;;
  mso-fareast-font-family:&quot;Times New Roman&quot;'>If you are using Word 2003<o:p></o:p></span></p>
        <p class='MsoNormal' style='mso-margin-top-alt:auto;mso-margin-bottom-alt:auto;
  margin-left:.5in;text-indent:-.25in;mso-list:l0 level1 lfo1;tab-stops:list .5in'>
        <![if !supportLists]>
        <span style='font-size:8.0pt;font-family:&quot;Tahoma&quot;,&quot;sans-serif&quot;;mso-fareast-font-family:
  Tahoma'><span style='mso-list:Ignore'>1.<span style='font:7.0pt &quot;Times New Roman&quot;'>&nbsp;&nbsp;&nbsp;&nbsp;
        </span></span></span><![endif]>
        <span style='font-size:8.0pt;font-family:&quot;Tahoma&quot;,&quot;sans-serif&quot;;
  mso-fareast-font-family:&quot;Times New Roman&quot;'>do this<o:p></o:p></span></p>
        <p class='MsoNormal' style='mso-margin-top-alt:auto;mso-margin-bottom-alt:auto;
  margin-left:.5in;text-indent:-.25in;mso-list:l0 level1 lfo1;tab-stops:list .5in'>
        <![if !supportLists]>
        <span style='font-size:8.0pt;font-family:&quot;Tahoma&quot;,&quot;sans-serif&quot;;mso-fareast-font-family:
  Tahoma'><span style='mso-list:Ignore'>2.<span style='font:7.0pt &quot;Times New Roman&quot;'>&nbsp;&nbsp;&nbsp;&nbsp;
        </span></span></span><![endif]>
        <span style='font-size:8.0pt;font-family:&quot;Tahoma&quot;,&quot;sans-serif&quot;;
  mso-fareast-font-family:&quot;Times New Roman&quot;'>do this<o:p></o:p></span></p>
        </td>
    </tr>

    <tr>
        <td style='border:none;border-bottom:solid #9CA3AD 1.0pt;mso-border-top-alt:
  solid #E8EAEC .75pt;mso-border-top-alt:solid #E8EAEC .75pt;mso-border-bottom-alt:
  solid #9CA3AD .75pt;padding:4.0pt 7.5pt 4.0pt 7.5pt'>
        <p class='MsoNormal'>
        <span style='font-size:8.0pt;font-family:&quot;Tahoma&quot;,&quot;sans-serif&quot;;
  mso-fareast-font-family:&quot;Times New Roman&quot;'>If you are using Word xp or 2000<o:p></o:p></span></p>
        <p class='MsoNormal' style='mso-margin-top-alt:auto;mso-margin-bottom-alt:auto;
  margin-left:.5in;text-indent:-.25in;mso-list:l0 level1 lfo1;tab-stops:list .5in'>
        <![if !supportLists]>
        <span style='font-size:8.0pt;font-family:&quot;Tahoma&quot;,&quot;sans-serif&quot;;mso-fareast-font-family:
  Tahoma'><span style='mso-list:Ignore'>1.<span style='font:7.0pt &quot;Times New Roman&quot;'>&nbsp;&nbsp;&nbsp;&nbsp;
        </span></span></span><![endif]>
        <span style='font-size:8.0pt;font-family:&quot;Tahoma&quot;,&quot;sans-serif&quot;;
  mso-fareast-font-family:&quot;Times New Roman&quot;'>do this<o:p></o:p></span></p>
        <p class='MsoNormal' style='mso-margin-top-alt:auto;mso-margin-bottom-alt:auto;
  margin-left:.5in;text-indent:-.25in;mso-list:l0 level1 lfo1;tab-stops:list .5in'>
        <![if !supportLists]>
        <span style='font-size:8.0pt;font-family:&quot;Tahoma&quot;,&quot;sans-serif&quot;;mso-fareast-font-family:
  Tahoma'><span style='mso-list:Ignore'>2.<span style='font:7.0pt &quot;Times New Roman&quot;'>&nbsp;&nbsp;&nbsp;&nbsp;
        </span></span></span><![endif]>
        <span style='font-size:8.0pt;font-family:&quot;Tahoma&quot;,&quot;sans-serif&quot;;
  mso-fareast-font-family:&quot;Times New Roman&quot;'>do this<o:p></o:p></span></p>
        </td>
    </tr>

<tr style='mso-yfti-irow:2;mso-yfti-lastrow:yes'>
        <td style='border:none;border-bottom:solid #9CA3AD 1.0pt;mso-border-top-alt:
  solid #E8EAEC .75pt;mso-border-top-alt:solid #E8EAEC .75pt;mso-border-bottom-alt:
  solid #9CA3AD .75pt;padding:4.0pt 7.5pt 4.0pt 7.5pt'>
        &nbsp;</td>
    </tr>

</table>

</body>

</html>
";
           task.createWssTask_TaskProperties1.HasCustomEmailBody = true;
           task.createWssTask_TaskProperties1.SendEmailNotification = true;

Comments (0)

Skip to main content