How to download mail attachment from Exchange activity?

Hi Experts,

I want to download attachment from mail with the help of exchange activity.

I don’t want to use outlook activities as outlook is not installed in production machine.

Please suggest.

@ermanoj3101

Did u try Get Exchange Mail Message activity ?

Hi

Pls have look on this

This can be used for both outlook and exchange to download attachment to a specific folder

Cheers @ermanoj3101

Hi @Palaniyappan ,

Thanks for the reply, Is this activity works if outlook not installed in machine ?

1 Like

Thanks for the reply @lakshman ,

I am already using it but i am not able to understand where the attachment get saved as I couldn’t see the property to pass folder path.

Yeah it can
Anyhow it accepts only mailmessage as input which is given by get exchange mail activity

So the steps involved will be

—use get exchange mail activity and get the output as list of mailmessage

—then use a for each loop and pass the above variable as input and change the type argument as system.net.mail.mailmessage

—inside the loop use a IF condition and mention like this
Item.Attachments.Any

If true it will go to THEN where use this SAVE ATTACHMENT activity and mention the variable item as input and the folder path

Cheers @ermanoj3101

2 Likes

@ermanoj3101

Select GetAttachment check box and it will give output as collection of MailMessages. Then loop one by one mail and then use Save Attachments activity to save the attachments.

1 Like

This is how exactly I am doing, i was only concerned if it works without outlook or not.

Thanks for the confirmation.

1 Like

Thanks for the reply.

2 Likes

This topic was automatically closed 3 days after the last reply. New replies are no longer allowed.