How to have a richTextBox content contains Strings & Image as Email Body Message?


hi, iam using vs2010. iam preparing small email application cdo.
in application have richtextbox contains strings & images.....
problem is, while wish add richtextbox content email body
has sending richtextbox strings only...and has not sending richtextbox
image... need change ....? helps....!!!

my codings :-

mailmessage mail = new mailmessage();  smtpclient smtpserver = new smtpclient("smtp.gmail.com");     mail.from = new mailaddress("myemail@mydomain.com");  mail.to.add("mytoaddress@todomain.com");  mail.subject = textbox1.text;     mail.isbodyhtml = true;  mail.body = richtextbox1.text ;    ??????????? may here      smtpserver.port = 587;  smtpserver.credentials=new system.net.networkcredential("fmaddrs@fmdomain.com", "mypsword");  smtpserver.enablessl = true;     smtpserver.send(mail);

thanks


u.paranthaman

hi paramu,

according code, richtextbox1.text, “text” property can puts string. that’s impossible show image.

here article, may you. send email embedded image in bodyin article introduction’s section, tells us

the article how send email image within body , not attachment (like company's logo). possible solution format body of message "html" document. have use .net classes linkedresource , alternateview merely setting src of html <img> tag won't help.

but web application, not sure whether works you.

have nice day!

kristin



Visual Studio Languages  ,  .NET Framework  >  Visual C#



Comments

Popular posts from this blog

Azure DocumentDB Owner resource does not exist

job syspolicy_purge_history job fail in sqlserver 2008

Trying to register with public marketplace error with 'Get-AzureStackStampInformation'