(Outlook) Email Outlook Message mail

This is my code i am not understanding what should i put in MailMessage .

Outlook.RetrieveEmails Instance: OutlookInstance Account:accountid MailFolder: “Inbox”
EmailsToRetrieve:Outlook.RetrieveMessagesMode.All MarkAsRead:True FromContains:’’ ToContains:’’ SubjectContains:‘TESTING EMAIL’ BodyContains:’’ Messages=> Messages

#Outlook.RetrieveEmailsAndSaveAttachments Instance:OutlookInstance Account: accountid MailFolder:“Inbox”
#EmailsToRetrieve:Outlook.RetrieveMessagesMode.All MarkAsRead:True FromContains:’’
#ToContains:’’ SubjectContains:‘CDMC TESTING EMAIL’ BodyContains:’’ SaveAttachmentsInto:attachmentsaveloc Messages=> g:CDMCAttach

wait 2

wait 2
Console.Write Message: Messages[0].body

#Console.Write Message: CDMCAttach[0].attachments

set g:attach to Messages[0].body

Outlook.ReplyToEmail Instance:OutlookInstance Account:accountid MailMessage:Messages Body:“Hiii” Attachments:’’

I am getting this error “Argument ‘MailMessage’ must be ‘Outlook Mail Message’”

can anybody help

1 Like


The action ReplyToEmail accepts as an argument, a single email message.

So in your case, it would be “Messages[0]”, which is the first email you retrieved with the RetrieveEmails action.

1 Like

Thank you For your help! @Skip