Save the attached file.
This sample shows how to call the Save method.
ForAspNet.POP3.License.LicenseKey = "<put license string here>";
POP3 objPOP3 = new POP3("mail.server.com", "username", "password");
objPOP3.Connect();
objPOP3.Login();
objPOP3.QueryServer();
for (int i = 1; i <= objPOP3.TotalMailCount; i++)
{
EmailMessage objEmail = objPOP3.GetMessage(i, false);
if (objEmail.IsAnyAttachments)
{
for(int a = 0; a < objEmail.Attachments.Count; a++)
{
Attachment objFile = (Attachment)objEmail.Attachments[a];
if (objFile.IsFileAttachment) objFile.Save("c:\\" + objFile.FileName);
}
}
objPOP3.DeleteMessage(i);
}
objPOP3.Close();
Attachment Class | ForAspNet.POP3 Namespace