none
Dynamic SMTP configuration in Orchestration RRS feed

  • Question

  • Hi,

    I am using this link

    http://www.biztalkgurus.com/biztalk_server/biztalk_2006/m/biztalk_2006_samples/15562.aspx

    for one of my requirement in which I need to process a email when i do not receive any attachment. I need to send a email through dynamic SMTP with body as that of the body of received email .

    Below is the code which is already working for the hardcoded email body:

    strEmailBody = 
        "\nHei\n" +


        "\Error Notification\n" +



        "\n\nIncomingFileName\n";
         //"\n\Error in the email 22.09.2015 23:59:01 \n";

    strEmailToAddress="abc@test.com";
    strEmailSubject =" Testing with no Attachment";

    Msg_NonAttachEmail.Email_NonAttachBody = new Communicate.Toolbox.SMTPHelper.RawString(strEmailBody);

    strEmailFromAddress="test@test.no";
    strSMTPHost="111.10.10.10";
    Msg_NonAttachEmail(SMTP.From) = strEmailFromAddress;
    Msg_NonAttachEmail(SMTP.MessagePartsAttachments) = 1;
    Msg_NonAttachEmail(SMTP.SMTPHost) = strSMTPHost;

    Msg_NonAttachEmail(SMTP.SMTPAuthenticate) = 0;

    SendPort2(Microsoft.XLANGs.BaseTypes.Address) = "mailto: " + strEmailToAddress;

    Note: I would be receiving content of the email as  :Error in the email 22.09.2015 23:59:01(commented in the code). How do i code for that? 

    Please suggest if I can do it in the orchestration or do i need to deal with the content of the email body received in the pipeline component and then call it inside the orchestration.

    Thanks in advance.

    Regards,

    Ranjana

    Monday, October 5, 2015 8:14 PM

All replies

  • I dont understand what you problem is. 

    But if the thing is that you need timestamp in strEmailBody variable, you can just use: DateTime.Now...

    Thursday, October 22, 2015 1:00 PM
  • Hi,

    I am using this link

    http://www.biztalkgurus.com/biztalk_server/biztalk_2006/m/biztalk_2006_samples/15562.aspx

    for one of my requirement in which I need to process a email when i do not receive any attachment. I need to send a email through dynamic SMTP with body as that of the body of received email .

    Below is the code which is already working for the hardcoded email body:

    strEmailBody = 
        "\nHei\n" +


        "\Error Notification\n" +



        "\n\nIncomingFileName\n";
         //"\n\Error in the email 22.09.2015 23:59:01 \n";

    strEmailToAddress="abc@test.com";
    strEmailSubject =" Testing with no Attachment";

    Msg_NonAttachEmail.Email_NonAttachBody = new Communicate.Toolbox.SMTPHelper.RawString(strEmailBody);

    strEmailFromAddress="test@test.no";
    strSMTPHost="111.10.10.10";
    Msg_NonAttachEmail(SMTP.From) = strEmailFromAddress;
    Msg_NonAttachEmail(SMTP.MessagePartsAttachments) = 1;
    Msg_NonAttachEmail(SMTP.SMTPHost) = strSMTPHost;

    Msg_NonAttachEmail(SMTP.SMTPAuthenticate) = 0;

    SendPort2(Microsoft.XLANGs.BaseTypes.Address) = "mailto: " + strEmailToAddress;

    Note: I would be receiving content of the email as  :Error in the email 22.09.2015 23:59:01(commented in the code). How do i code for that? 

    Please suggest if I can do it in the orchestration or do i need to deal with the content of the email body received in the pipeline component and then call it inside the orchestration.

    Thanks in advance.

    Regards,

    Ranjana

    Hello,

    If you want to send BizTalk message as email Body content then, set the SMTP.MessagePartsAttachements  property to 0(zero) inside your orchestration.

    Thanks,


    Prakash

    Thursday, November 5, 2015 1:26 PM