I am getting the error The Archive is Either in Unknown Format or Damaged while opening the zip.
I got the email with zip attachment but the attachment not opening.
Hi rani,
mm.Attachments.Add(new Attachment(ms, "Document.zip"));
Change above line with below.
mm.Attachments.Add(new Attachment(new MemoryStream(ms.ToArray()), "Document.zip"));
I have updated the sample aswell.
© COPYRIGHT 2025 ASPSnippets.com ALL RIGHTS RESERVED.