MailMessage mail = new MailMessage();
mail.From = new MailAddress("[email protected]");
mail.Subject = "Weekend Plans";
foreach(var image in productImage)
{
Attachment attachment = new Attachment(image.Image);
attachment.TransferEncoding = TransferEncoding.Base64;
mail.Body = image.Comments;
mail.Attachments.Add(attachment);
Getting exception.
System.IO.PathTooLongException: 'The specified path, file name, or both are too long. The fully qualified file name must be less than 260 characters, and the directory name must be less than 248 characters
How to handle exception?
Tom MurphyPosted May 20, 2020, 3:06 AM
Varnaparan DPosted Jan 20, 2020, 3:19 PM
Ronika JencyPosted Jan 20, 2020, 2:12 PM