469,964 Members | 1,546 Online
Bytes | Developer Community
New Post

Home Posts Topics Members FAQ

Post your question to a community of 469,964 developers. It's quick & easy.

Error in Outlook using SmtpMail with BodyFormat = Unicode

Hi,

I tryed to send an email with the smtpmail class in the .net framework
and I got an error in Outlook.

Here is my code:

System.Web.Mail.MailMessage mail = new System.Web.Mail.MailMessage();

mail.From = "to**@toto.to";
mail.To = to**@toto.to;
mail.Subject = "subject";
mail.Body = "message";
mail.Priority = System.Web.Mail.MailPriority.Normal;
mail.BodyFormat = System.Web.Mail.MailFormat.Text;
mail.BodyEncoding = System.Text.Encoding.Unicode;

System.Web.Mail.SmtpMail.SmtpServer = "smtpServerName";
System.Web.Mail.SmtpMail.Send(mail);

Here is the Outlook error:

Can't open this item. Could not complete the operation. One or more
parameter values are not valid.

Microsoft has some infos there:
http://support.microsoft.com/default...b;en-us;198909

But this does not help me a lot !

Any idea ?
Nov 16 '05 #1
0 1500

This discussion thread is closed

Replies have been disabled for this discussion.

Similar topics

5 posts views Thread by Greg Robinson | last post: by
2 posts views Thread by tshad | last post: by
5 posts views Thread by Nathan Sokalski | last post: by
1 post views Thread by rainxy | last post: by
By using this site, you agree to our Privacy Policy and Terms of Use.