VB Code:
Set EmailApp = CreateObject("Outlook.Application") 'using the outlook object
Set NameSpace = EmailApp.GetNamespace("MAPI")
Set EmailSend = EmailApp.CreateItem(0)
EmailSend.Subject = "SOMT Updated Deliverables"
EmailSend.HTMLBody = "<HTML><CENTER><FONT FACE=ARIAL SIZE=3 COLOR=BLUE><B>JAK - SOMT</B></FONT><BR> <FONT FACE=ARIAL SIZE=3 COLOR=RED><I>Deliverables Updated!</I></FONT></CENTER><BR><FONT FACE=ARIAL SIZE=2>The following task was assigned to you: " & rsTask!Task & ". The SOMT Tracking ID of this Service Order is:<B> " & rsTask!RecordID & "</B><BR><BR>" & _
"Your deliverables have been recently updated to the following: " & "<BR><UL>"
Do While Not rsSubTask.EOF
EmailSend.HTMLBody = EmailSend.HTMLBody & "<LI><I>" & rsSubTask!DeliverableDescription & "</I></LI><BR>"
rsSubTask.MoveNext
Loop
EmailSend.HTMLBody = EmailSend.HTMLBody & Chr(13) & Chr(13) & "</UL>Thank You - <FONT COLOR=BLUE><B>JAK SOMT</B></FONT><BR><BR>Questions, Comments, or Concerns? Contact the <A HREF=mailto:
[email protected]>SOMT-Admin</A></FONT></HTML>"
EmailSend.Recipients.Add (rsTask!RespPerson & "@tkt-jakusa.thyssenkrupp.com")
EmailSend.Send
MsgBox "An e-mail has been sent to " & rsTask!RespPerson & " with their updated Deliverables.", vbInformation, "E-Mail Sent"