Maildefinition & Embedding ObjectMMichael16yAsked Jan 7, 2011, 12:01 AM ESTUnansweredShareLinkedInXCopy linkSaveI 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? JavaCopy 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.TextCodeCopyCodeCopy//Here is the problemJavaCopyEmbeddedMailObject 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);AnswersKnow the answer? Post it. Somebody with the same question will find it here.Join to answer this questionEvery answer you publish earns 20 SHARP.Create free accountSign in
Maildefinition & Embedding ObjectMMichael16yAsked Jan 7, 2011, 12:01 AM ESTUnansweredShareLinkedInXCopy linkSaveI 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? JavaCopy 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.TextCodeCopyCodeCopy//Here is the problemJavaCopyEmbeddedMailObject 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);
Answers
Know the answer? Post it. Somebody with the same question will find it here.