Click here to Skip to main content
16,020,974 members
Please Sign up or sign in to vote.
0.00/5 (No votes)
See more:
Hi,

I have tried to sending an chartImage to a specific emailId but i am not getting the exact solution please view the following code i have written as:

C#
 System.IO.MemoryStream ms = new System.IO.MemoryStream();

Chart1.SaveImage(ms, ChartImageFormat.Jpeg);

 Attachment imgAtt = new Attachment(ms, "image/Jpeg");
    imgAtt.ContentId = "DayChart.Jpeg";
    mail.Attachments.Add(imgAtt);



The chartImage is not displaying on emil body i am suspecting did i use memorystream in correct way?

Please give me the exact solution.

Thanks&Regards,

Raghu.
Posted
Updated 21-Aug-12 1:26am
v2

1 solution

 
Share this answer
 
Comments
Madhugundi 22-Aug-12 0:06am    
Thank you for consider my post.

This content, along with any associated source code and files, is licensed under The Code Project Open License (CPOL)



CodeProject, 20 Bay Street, 11th Floor Toronto, Ontario, Canada M5J 2N8 +1 (416) 849-8900