0 votes
by (120 points)
edited by


I am getting all my email attachments using the following line.
I want to save this attachment to user location.
How can I achieve this?

For Each emailAtt As Rebex.Mail.Attachment In _emlItem.Attachments

I want to save 'emailAtt' in user location.

If I use


it will save the attachment, but user is not aware of this. I want to aware the user that file is saved to specific location.

could you please help me on this?

Applies to: Rebex Secure Mail

1 Answer

0 votes
by (58.9k points)


either choose the location yourself in your program, or let the user choose the location. In WinForm application just pop up a dialog to ask the user where to save it, this way you will also inform them that the attachments are being saved.

In console applications there are also possibilities to interact with the user (writing to console a message that an attachment is about to be saved and asking the user for the location to be used, then reading chars from the console.)

However, the task of determining a file system location from user is a normal task and it is out of the reach of what Rebex Secure Mail does. Our product provides a library to work with emails, so it will enable you to save the attachment as you wrote above, but determining the exact location from the user is up to you as a programmer, we do not have any built-in API for this.