如何将位图保存到内存流中并将流附加到Outlook邮件中 [英] How to save bitmap into memory stream and attached the stream in outlook mail

查看:90
本文介绍了如何将位图保存到内存流中并将流附加到Outlook邮件中的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

请建议我....

如何将位图保存到内存流中并将流附加到Outlook邮件中

How to save bitmap into memory stream and attached the stream in outlook mail

使用(位图位图=新位图(bounds.Width,bounds.Height))
                {
                   使用(Graphics g = Graphics.FromImage(bitmap))
                    {
                        g.CopyFromScreen(Point.Empty,Point.Empty,bounds.Size);

                       使用(MemoryStream memStream = new MemoryStream())
                        {
                            bitmap.Save(memStream,ImageFormat.Jpeg);

using (Bitmap bitmap = new Bitmap(bounds.Width, bounds.Height))
                {
                    using (Graphics g = Graphics.FromImage(bitmap))
                    {
                        g.CopyFromScreen(Point.Empty, Point.Empty, bounds.Size);

                        using (MemoryStream memStream = new MemoryStream())
                        {
                            bitmap.Save(memStream, ImageFormat.Jpeg);

但是当Outlook邮件出现时它没有附加任何附件....请帮助.. ????

But it is not attaching any attachment when outlook mail appear.......Please Help..????

Bikky Kumar

Bikky Kumar

推荐答案

该示例可能对您有帮助
This example might help you http://www.codeproject.com/Articles/21423/Creating-In-Memory-Mail-Attachments


这篇关于如何将位图保存到内存流中并将流附加到Outlook邮件中的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆