本文介绍了如何使用富文本框内容包含字符串&图像为电子邮件正文消息?的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧! 问题描述 我使用的是VS2010。我通过CDO准备小型电子邮件应用程序。 在该应用程序中,我有一个包含字符串和字符串的richTextBox。图片..... 问题是,虽然我希望将RichTextBox内容添加为EMail Body 它只发送了richTextBox字符串...而且它有不发送richTextBox 图像...为此需要改变......?感谢您的帮助...... !!! 我的编码: - ======= ==== MailMessage mail = new MailMessage(); SmtpClient SmtpServer = new SmtpClient( smtp .gmail.com); mail.From = new MailAddress( [email protected]); mail.To.Add( [email protected]); mail.Subject = textBox1.Text; mail.IsBodyHtml = true ; mail.Body = richTextBox1.Text; ???????????可能在这里 SmtpServer.Port = 587 ; SmtpServer.Credentials = new System.Net.NetworkCredential( [email protected], MyPsword); SmtpServer.EnableSsl = true ; SmtpServer.Send(邮件); 谢谢&问候 Paramu @ Paranthaman 解决方案 Hi, Iam using VS2010. Iam preparing small EMail Application by CDO. In that application I have a richTextBox contains Strings & Images.....The Problem is, while I wish to add a RichTextBox content as EMail BodyIt has sending the richTextBox strings only...And It has not sending the richTextBoxImage... For that anything need to change ....? Thanks for the helps....!!!My Codings :-===========MailMessage mail = new MailMessage();SmtpClient SmtpServer = new SmtpClient("smtp.gmail.com");mail.From = new MailAddress("[email protected]");mail.To.Add("[email protected]");mail.Subject = textBox1.Text;mail.IsBodyHtml = true;mail.Body = richTextBox1.Text ; ??????????? May Be Here SmtpServer.Port = 587;SmtpServer.Credentials=new System.Net.NetworkCredential("[email protected]", "MyPsword");SmtpServer.EnableSsl = true;SmtpServer.Send(mail);Thanks & RegardsParamu @ Paranthaman 解决方案 这篇关于如何使用富文本框内容包含字符串&图像为电子邮件正文消息?的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持! 09-25 02:36