Programmatically publishing an InfoPath form (sending as email)

こ雲淡風輕ζ 提交于 2019-12-11 04:09:31

问题


I'm looking for a way to send an InfoPath form programmatically, equivalent to using the quick publish button in the InfoPath designer, but without using any UI.

I was not able to find a way to do this, I have tried using MailEnvelope , but it brings up an UI and I don't want that.

So I ended up sending the current form file through a SmtpClient, but then the form shows up as a regular attachment.

Does anyone know if there is a possibility to do that from code, or not?

Thanks in advance.


回答1:


You can use SmtpClient with attachments but you have to set the MIME types for the attachments and headers on the email. Instead of copying the full article here, see this link: http://blogs.msdn.com/b/hanuk/archive/2008/03/18/how-to-display-infopath-forms-inline-with-outlook-email-message.aspx



来源:https://stackoverflow.com/questions/11618470/programmatically-publishing-an-infopath-form-sending-as-email

易学教程内所有资源均来自网络或用户发布的内容,如有违反法律规定的内容欢迎反馈
该文章没有解决你所遇到的问题?点击提问,说说你的问题,让更多的人一起探讨吧!