Biztalk:包含映射到 CSV 的电子邮件的 XML,作为附件发送

发布于 2024-12-18 20:00:25 字数 590 浏览 5 评论 0原文

这是我的情况:

-我收到一个 XML,其中包含字段中的电子邮件地址(即 [电子邮件受保护])。 - 然后将此 XML 映射到 CSV(电子邮件未映射到 CSV 并且不包含此电子邮件地址)。 - 然后,我需要将此 CSV 作为原始 XML 中包含的电子邮件的附件发送。

我之前所做的是通过 SMTP 适配器发送电子邮件,并使用自定义管道组件将文件附加到电子邮件。但是,我之所以没有深入了解我如何努力解决这个问题以及我的所有代码等...是因为在我工作的公司中,我无法访问桌面上的 SMTP 服务器。我只能在测试服务器上部署解决方案并测试 SMTP 功能(我无法在测试服务器上开发它们/调试等),这基本上使这个特定项目变得非常令人头疼。所以我尝试了一些方法,但我觉得如果没有帮助,继续下去是失败的。

有人可以指出我正确的方向,或者我应该采取的步骤(代码会很棒),我在编排中可能需要的对象,或者任何可以帮助我的东西吗?

非常感谢您提前提供的帮助。

Here is my situation:

- I receive an XML which contains an email address in the field (ie [email protected]).
- This XML is then mapped to a CSV (The Email is not mapped to the CSV and it does not contain this email address).
- I then need to send this CSV as an attachment to the email which was contained in the original XML.

What I have done before is sent email through an SMTP adapter and used a custom pipeline component to attach a file to an email. BUT, the reason I am not going into depth about how hard I have tried to figure this out, and all my code etc... is because with the company I am working for I am unable to access an SMTP server on my desktop. I can only deploy solutions and test the SMTP functionality on a test server (i cannot develop them/debug etc on the test server), which has basically made this particular project a massive headache. So I have tried a few things, but continuing I feel, without some help is a lost cause.

Can someone please point me in the right direction, or the steps I should take (code would be amazing), the objects I might need in an orchestration, or anything that would help me?

Thanks so much for your help in advance.

如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。

扫码二维码加入Web技术交流群

发布评论

需要 登录 才能够评论, 你可以免费 注册 一个本站的账号。

评论(1

浅语花开 2024-12-25 20:00:25

我认为有些事情可以让你的生活更轻松一些。

推广中的电子邮件地址字段使用升级的属性架构的传入消息。这边走
稍后您将获得可用的电子邮件地址。

映射传入
在发送端口上将消息转换为 CSV 格式(您应该映射到您的
在此过程中尽可能晚地指定目标格式)。

创建一个设置以下属性 关于您的消息。确保以可以在运行时配置这些属性的方式创建组件。使用BizTalk 管道组件向导工具。重要的属性有:

  • SMTP.Subject
  • SMTP.From
  • SMTP.SMTPHost
  • SMTP.SMTPAuthenticate
  • SMTP.MessagePartsAttachments
    • 确保 PartsAttachments 为“1”,以将 BizTalk 按摩正文(在本例中为 CSV)作为附件获取。

使用您之前升级的属性设置要发送到的地址。

例如,使用面向开发人员应用的 Antrix SMTP Server。这基本上会抢夺发送到 SMTP 服务器的所有消息并将文件存储在一个小托盘应用程序中。开发和测试时很好。

A few things that I think could make you life a bit easier.

Promote the email address field in the incoming message using a promoted property schema. This way
you'll have the email address available later on.

Map the incoming
message to a CSV format on the send port (you should map to your
destination-format as late as possible in the process).

Create a pipeline component that sets the following properties on you message. Make sure to create you component in a way that you can configure these properties run-time. Use the BizTalk Pipeline Component Wizard tool. The important properties are:

  • SMTP.Subject
  • SMTP.From
  • SMTP.SMTPHost
  • SMTP.SMTPAuthenticate
  • SMTP.MessagePartsAttachments
    • Make sure to the PartsAttachments as "1" to get the BizTalk massage body (your CSV in this case) as a attachment.

Set the address to send to using you previously promoted property.

Use for example the Antrix SMTP Server for developers app. This will basically snatch any messages sent to an SMTP server and store the files in a litte tray app. Nice while developing and testing.

~没有更多了~
我们使用 Cookies 和其他技术来定制您的体验包括您的登录状态等。通过阅读我们的 隐私政策 了解更多相关信息。 单击 接受 或继续使用网站,即表示您同意使用 Cookies 和您的相关数据。
原文