MailMessage mail = new MailMessage();
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?