0 votes

My aim is not to send the mail.I want to insert my recieved attachment from the mail to the db(mssql server) which I retrieved through IMAP.Please help


1 Answer

0 votes

This question is generally out of scope of Mail.dll help forum.

Use IMail.Attachments collection to retrieve attachments' data and file names:

IMail email = ...;
foreach(MimeData att in email.Attachments)
    string fileName = att.SafeFileName;
    byte[] data = att.Data;

    // your logic goes here.

We can't help you with SQL logic.

by (298k points)