Hello, I have a script that will find the email body in a html message.
Here is the vbs:
Option Explicit
Function FindFirstEmailBody(htmlMessage)
Dim regEx, bodyPattern
Set regEx = New RegExp
' Regular expression pattern to match the first occurrence of HTML body
bodyPattern = "<body[^>]*>(.*?)</body>"
' Ignore case and multiline
regEx.IgnoreCase = True
regEx.MultiLine = True
' Execute the regular expression
Dim matches
Set matches = regEx.Execute(htmlMessage)
' Check if a match was found
If matches.Count > 0 Then
FindFirstEmailBody = matches(0).SubMatches(0)
Else
FindFirstEmailBody = ""
End If
End Function
' Find the first email body
Dim emailBody
emailBody = FindFirstEmailBody(htmlMessage)
' Output the first email body
MsgBox emailBody

Here S_emailMessage is email message of the email in the loop for each mail action.

It says “bot error”