zoukankan      html  css  js  c++  java
  • Send Email from SMTP Adapter via a Dynamic Port in BizTalk Server

    Send Email from SMTP Adapter via a Dynamic Port in BizTalk Server

     

    Implementing the SMTP send adapter to send an email from BizTalk requires SMPT configuration information, such as SMTP server and receipient email address. Rather tha specifying the configuration information at design time, we can use a dynamic port, which allows us to configure the information programmatically and modify it based on the message content or processing.

     

    The target URL can be assigned to a dynamic port using the Expression shape.

    For example:

    myPort(Microsoft.XLANGS.BaseTypes.Address) = http://orders.myCompany;

     

    Code snippet in the Message Assignment shape:

    // Construct Message

    msgSend = msgInEmail;

    Note: Messages are immutable in BizTalk Server. If you want to modify a message, you must use a Construct shape to create a new message, copy the original message to the new message, and then update the fields on the new message.

     

    // Set the SMTP properties based on message content.

    // Reference the send port to set properties.

    portSendEmail(Microsoft.XLANGs.BaseTypes.Address) = "mailto:rickie4you@rickie.com";

     

    msgSend(SMTP.EmailBodyTextCharset)="UTF-8";

    msgSend(SMTP.CC) = " rickie4you@rickie.com";

    msgSend(SMTP.Subject) = "Send an email via BizTalk SMPT Adapter";

    msgSend(SMTP.EmailBodyText) = msgInEmail.MailBody;

    msgSend(SMTP.From) = "BizTalk@rickie4you.com";

    msgSend(SMTP.SMTPHost) = "SMTP SERVER";

    msgSend(SMTP.Username) = "USERNAME";

    msgSend(SMTP.Password) = "PASSWORD";

    msgSend(SMTP.SMTPAuthenticate) = 1;

     

    The demo orchestration is as follows.

    DynamicPortDemo.JPG
    Configure the Send Port as a Dynamic port, which allows the physical location of a physical send port to be determined at runtime.

    When the orchestration is deployed, the relevant physical send port will be created automatically, and specific binding of the orchestration to a physical send port is already done.

     

     

  • 相关阅读:
    Arduino可穿戴教程Linux平台下安装Arduino IDE
    伪造服务钓鱼工具Ghost Phisher
    Xamarin开发教程如何使用Xamarin开发Android应用
    域名扫描工具Fierce
    利用DNS Zone Transfers漏洞工具dnswalk
    域名解析服务查询工具dnstracer
    FreeRTOS--API函数
    FreeRTOS中断优先级配置(重要)
    Win7 “Bluetooth设置”对话框无法打开,及无法查找到设备
    蓝牙4.0 BLE 防丢器
  • 原文地址:https://www.cnblogs.com/rickie/p/626183.html
Copyright © 2011-2022 走看看