currrently we are sending office infopath email forms using c# code. but we are not able to see the infopath email form templates in outlook preview pane. we need to click on the open form icon to see and save the form, only then it appears in the preview pane. Can you help with this issue. We are using outlook 2010 and infopath 2010. We use a server dll component for sending the mails.
MailMessage message = new MailMessage(sender, receiver);
message.Subject = "InfoPath test from a browser";
// The following two lines are very important to render the
// the InfoPath form inline with the Outlook message
// Attachment template = new Attachment(rootPath + "VendroFeedback.xsn", new
// ContentType("application/x-microsoft-InfoPathFormTemplate"));
Attachment template = new Attachment(rootPath + "VendroFeedback.xsn", new
ContentType("application/x-microsoft-InfoPathFormTemplate"));
//message.Attachments.Add(form);
template.ContentDisposition.Inline=true;
template.ContentDisposition.DispositionType=DispositionTypeNames.Inline;
message.Attachments.Add(template);
message.Headers.Add("Content-Class", "InfoPathForm.InfoPath");
//message.Headers.Add("Message-Class", "IPM.InfoPathForm.InfoPath");
client.Send(message);