TECHNOLOGIES
FORUMS
JOBS
BOOKS
EVENTS
INTERVIEWS
Live
MORE
LEARN
Training
CAREER
MEMBERS
VIDEOS
NEWS
BLOGS
Sign Up
Login
No unread comment.
View All Comments
No unread message.
View All Messages
No unread notification.
View All Notifications
Answers
Post
An Article
A Blog
A News
A Video
An EBook
An Interview Question
Ask Question
Forums
Monthly Leaders
Forum guidelines
Rahul Kumar
NA
70
5.8k
Try to send Image attached Email
Jan 20 2020 1:42 PM
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?
Reply
Answers (
3
)
How can we merge the two web pages (doc and Pdf preview)
Rating of Stars using Javascript Client side