I am creating email using the MailDefintion class. Everything works fine until I try and embed and object. and once I do that it just sends a blank email. When I remove the emeddedobject it works fine
Anyone had this?
AlternateView plainView = AlternateView.CreateAlternateViewFromString(plainEmail, null, "text/plain"); msg.AlternateViews.Add(plainView); MailDefinition message = new MailDefinition(); message.BodyFileName = "email.htm"; message.IsBodyHtml = true; message.From = TextBoxYourEmail.Text; message.Subject = "Zoo Event: " + labelEventName.Text
//Here is the problem
EmbeddedMailObject emo = new EmbeddedMailObject(); emo.Path = @"~\Images\email\hdr_roar.gif"; emo.Name = "hdr"; EmbeddedMailObject emo2 = new EmbeddedMailObject(); emo2.Path = @"~\Images\email\box_top.gif"; emo2.Name = "box_top"; message.EmbeddedObjects.Add(emo2);
|
Replies
Know the answer? Post it — somebody with the same question will find it here.