I have to attach multiple files to a single mail as attachments . How to attach multiple files from desktop as attachments in send email action and send a single mail with all the attachment in it.
Try with separating filenames with semicolon (;)
I tried that but it is not sending attachment in a single mail instead it is sending seperately
Hi
Have you tried with the List option which is available in the attachment part?
Yes I tried with list option only with variables in the file path. Still I am not able to attach all the files inside a single email.
Question
How to attach multiple files while using EWS or Outlook as mail server in Send Email in Automation 360 (formerly Automation Anywhere Enterprise A2019)?
Answer
For Outlook, attachments can be separated using semicolon (;) as the separator.
For EWS, third party jar is used. Use comma (,) as a separator to make it work.
Additional Information
EWS email does not support Filename/Path with Comma(,) in it. For example, "Test\\Folder1\\Folder,2\\Filename".
(OR)
Multiple files can be attached to email using ";"(semi-colon) as a separator.
Below is a sample task steps to send email with attachment.
1 Start Loop "Each File In Folder $vPath$"
2 Variable Operation: $vAttach$$vPath$$FileName$.$Extension$; To $vAttach$
3 End Loop
4 Send Email: Subject "Automation Anywhere finished executing the TaskBot" with Attachment(s).
vPath is a folder path variable like "C:\Users\Administrator\Documents\test\".
In Line 4, $vAttach$ variable can be used as attachment parameter.
I tried with this but still its not attaching multiple files inside single mail.
Please share your lines of code screenshots
Yes I tried with list option only with variables in the file path. Still I am not able to attach all the files inside a single email.
Ok. Then manually create a list and loop through the Folder from where you need to attach the files. Add those files into the list at the end of this loop. Try to add this list variable inside the Variable section under Send action.
Yes I tried with list option only with variables in the file path. Still I am not able to attach all the files inside a single email.
Please refer below image of solution for sending multiple attachments in a single email.
Variable type to be list and subtype of that file to be file.
The Issue was Solved, I tried using List variable as above and then I am able to attach in to a single mail. Thanks everyone for the helping me.
but even so, it is not possible to send all the documents, it will send you a single file, in this case it will send position 0
Or simply append the file paths into a string variable (comma separated) and use that string variable in the Attachment field.
Adding them manually does not work for me, is there a way to attach them dynamically, for example, sometimes there may be 10 files to attach to an email, tomorrow there may be 5 and so on
Yes I tried with list option only with variables in the file path. Still I am not able to attach all the files inside a single email.
Please refer below image of solution for sending multiple attachments in a single email.
Variable type to be list and subtype of that file to be file.
You can refer the quoted message for dynamic add of attachments
On adding item to list by default it adds with comma and we cannot change it to semi-colon separated.
Change the package version to lower one where you can pass attachment parameter as semi-colon separated string.
Reply
Enter your E-mail address. We'll send you an e-mail with instructions to reset your password.