Sending email in BizTalk with specific format body

Hi,
I need to construct the email body with the values coming in the incoming message.
Below is the sample mail format which I need to send.
Requirement is just to receive xml file and send mail based on the values present in the incoming message.
Can anyone please help to achieve this in pipeline component.
Is orchestration is necessary to achieve. Please help.
Mail format:
Subject: Alert Notification message (from message)
Body:
============================================================
Alert Notification
Ename:               Ramesh
ID:                     56958521225
Destination:         GRE
Source:               TRV
City:                   AMERSFOORT
Pcode:                Utvtg45
Severity:             CRITICAL
Address:              Test city
Description:          Description
Thanks in advance.

You can achieve your requirement with both messaging-only or using Orchestration. For your requirement, I would create a HTML based email as the output you have shown requires
some formatting.
Messaging-only way:
Create an XSLT which can output the HTML format as you have shown.
Transform the XML (which you process in BizTalk) to HTML based.
 I have come up a draft version XSLT to your output format. I am using some dummy XPATH(This is a pseudo code, I have not tested it. Intention is just to give you some idea)
<?xml version="1.0" encoding="utf-8"?>
<xsl:stylesheet version="1.0"
xmlns:xsl="http://www.w3.org/1999/XSL/Transform" xmlns:ns0="http://biztalk.orderapp.schemas.EmailResponse">
<xsl:template match="/">
<html>
<body>
<div>
Alert Notification<br />
<TABLE BORDER="0" cellspacing="2" cellpadding="2" width="90%">
<xsl:apply-templates select="/ns0:EmailResponse"/>
</TABLE>
</body>
</html>
</xsl:template>
<xsl:template match="/ns0:EmailResponse">
<tr>
<td class="style2">
Ename:</td>
<td>
<xsl:value-of select="ns0:Header/ns0:Ename/text()"/></td>
</tr>
<tr>
<td class="style2">
ID:</td>
<td>
<xsl:value-of select="ns0:Header/ns0:ID/text()"/></td>
</tr>
<tr>
<td class="style2">
Destination:</td>
<td>
<xsl:value-of select="ns0:Header/ns0:Destination/text()"/></td>
</tr>
<tr>
<td class="style2">
Soruce:</td>
<td>
<xsl:value-of select="ns0:Header/ns0:Soruce/text()"/></td>
</tr>
<tr>
<td class="style2">
City:</td>
<td>
<xsl:value-of select="ns0:Header/ns0:City/text()"/></td>
</tr>
<tr>
<td class="style2">
PCode:</td>
<td>
<xsl:value-of select="ns0:Header/ns0:PCode/text()"/></td>
</tr>
<tr>
<td class="style2">
Severity:</td>
<td>
<xsl:value-of select="ns0:Header/ns0:Severity/text()"/></td>
</tr>
<tr>
<td class="style2">
Address:</td>
<td>
<xsl:value-of select="ns0:Header/ns0:Address/text()"/></td>
</tr>
<tr>
<td class="style2">
Description:</td>
<td>
<xsl:value-of select="ns0:Header/ns0:Description/text()"/></td>
</TR>
</xsl:template>
</xsl:stylesheet>
Pass this XSLT as the parameter to the custom pipeline (with XSLT transform component) to apply this XSLT to the XML received. Use XSLT Transform Component (BizTalk Server
Sample) which is part of BizTalk SDK sample.
XSLT Transform Component (BizTalk Server Sample)
Other way in messaging-only approach:
http://blogs.msdn.com/b/nabeelp/archive/2008/09/11/sending-an-html-email-without-an-orchestration.aspx. Use this XSLT as draft for this approach.
<xsl:stylesheet version="1.0" xmlns:xsl="http://www.w3.org/1999/XSL/Transform">
<xsl:output omit-xml-declaration="yes" method="xml" standalone="yes" version="1.0" encoding="UTF-8" />
<xsl:template match="/">
<html>
<head>
<title>Email</title>
</head>
<body>
<p>
Alert Notification.
</p>
<table class="style1">
<tr>
<td class="style2">
Ename:</td>
<td>
<xsl:value-of select="//EmailMessageOut/Ename" /></td>
</tr>
<tr>
<td class="style2">
ID:</td>
<td>
<xsl:value-of select="//EmailMessageOut/ID" /></td>
</tr>
<tr>
<td class="style2">
Destination:</td>
<td>
<xsl:value-of select="//EmailMessageOut/Destination" /></td>
</tr>
<tr>
<td class="style2">
Soruce:</td>
<td>
<xsl:value-of select="//EmailMessageOut/Soruce" /></td>
</tr>
<tr>
<td class="style2">
City:</td>
<td>
<xsl:value-of select="//EmailMessageOut/City" /></td>
</tr>
<tr>
<td class="style2">
PCode:</td>
<td>
<xsl:value-of select="//EmailMessageOut/City" /></td>
</tr>
<tr>
<td class="style2">
Severity:</td>
<td>
<xsl:value-of select="//EmailMessageOut/Severity" /></td>
</tr>
<tr>
<td class="style2">
Address:</td>
<td>
<xsl:value-of select="//EmailMessageOut/Address" /></td>
</tr>
<tr>
<td class="style2">
Description:</td>
<td>
<xsl:value-of select="//EmailMessageOut/Description" /></td>
</tr>
</table>
</body>
</html>
</xsl:template>
</xsl:stylesheet>
Use SMTP adapter to email the output.
Using Orchestration:
Similar way, apply the XSLT in orchestration. I would use this if you use dynamic SMTP adapter (even you can use custom pipeline component for dynamic SMTP adapter without
the need to Orchestration).
Refer this article for help
Sending an HTML-Formatted E-Mail Message from BizTalk
If this answers your question please mark it accordingly. If this post is helpful, please vote as helpful by clicking the upward arrow mark next to my reply.

Similar Messages

  • Send email from OWB with authenticated SMTP server (AUTH_LOGIN)

    Hi all,
    I want to send email from Oracle Warehouse Builder 11.2.0.2 using a SMTP server with basic authentication (AUTH_LOGIN).
    I've created an ACL for OWBSYS user according to note ID 1229769.1 in support.oracle.com.
    But, I need to configure again the ACL to connect to the SMTP server using user and password.
    I read the article in metalink, *How to Send an Email Using SMTP over an SSL Connection [ID 1323140.1]*+
    but I don't know how can I configure again the ACL for use in OWB.
    How OWB is able to authenticate with the SMTP server?
    Thanks!
    Maximiliano.

    Duplicate -
    How to send email from OSB with Mail server that requires SSL or STARTTLS
    Regards,
    Anuj

  • When I my send email, its delivered with an unknown sender

    Problem with my email.  I got this email msg.
    "Mike,
    You sent your email with an unknown sender, so I was unable to reply to your email."
    when I my send email, its delivered with an unknown sender!
    This just started in the last couple days.

    Yes, 1st thing I did.   Looks normal.
    I sent an Test to my wifes PC.  Her Outlook shows my name, where my email address should show theirs only these : ( )
    I'm trying a couple test.....
    I've figure it out!!
    •  I have 3 email addresses. Two of them are thru my internet provider.  When I send thru that provider, the email is sent correctly, my email address shows as it should.
    •  When I send from my 3rd email address, which is provided thru my web site servicer, which is Go Daddy, my email address doesn't show! I'll be calling    Go Daddy!
    I just yesterday found out that their was a problem with my email. I couldn't figure out why this one guy told me my email address wasn't showing.  I spoke with another person this morning in her office, who told me the same thing - but was able to show me the email I sent her.
    I came home, my email all looked correct. Thats when I went to the Communities.
    I've got it figured out now. Thanks so much for trying to help.

  • Sending email from Lr4 with Thunderbird

    Can anyone provide some help for  sending email from Lr4 with Thunderbird as the email program. When I select a photo and right-click Email Photo... I get the email photo dialog box with Mozilla Thunderbird in the From drop down. I click Send, and then I get an error message that says "There is no email program associated to perform the requested action. Please install an email program or, if one is already installed, create an association in the Default Programs control panel."
    Well, it seems as thigh Lr has Thunderbird in the From drop down, it knows an email program exists. Thunderbird is set as the default. I'm not sure what associations I am supposed to make (.eml and .wdseml are the default extensions, MAILTO is the default protocol, and Send mail is the default MAPI).
    Ay clues or hints?

    My default mail program is Thunderbird, and it works OK with Lightroom. If you are on a Windows 7 PC, go to Control Panel and check this out.
    Hope it helps.

  • I can't send emails on iPhone with my hotmail account. Is it not possible?

    I can't send emails on iPhone with my hotmail account. Is it not possible?

    I am having the same issue. It started this week. I have 2 email accounts on my phone. One is a hotmail. And the other one is a network solutions email. I can receive from both but not send. I've deleted the accounts and added them back on and nothing. I'm going crazy because one is my work email!

  • How to send email externally in the RTF format

    Hello,
    I have quite strange problem, and I am bit afraid whether SAP supports or not? which i thought will support by default.
    I need to send email out of SAP, but I need the body of the EMAIL to be formatted in RTF.
    Please note we are able to convert the data into RTF and then send as an attachement with email,
    But what we are looking is instead of attachment we need to send content as the mail body in the format RTF.
    Please any body help on this?
    Thank you again for your kind time and help

    Hi KAMESH,
    Thank you for your very quick response,
    We tried this option, by sending a mail with bold text, but the output still comes as normal text..
    Please can you send any working example of this.. if you think this should work,
    Thank you again for your time..

  • Sap adobeform sending pdf as attachment with specific name

    Hi Experts,
    Need your help in solving my problem !!
    My requirement is to send adobe form as mail attachment in PDF format, Which I am able to do.
    My Problem is PDF attachment should be generated with specific name.
    For example my scenario (below given screen shot),
    When i click on submit by email button, PDF will be attached to my mail,
    with some random name such as "d4811f8_45171.pdf" Instead it should be generated with
    fixed name such as "new_attach.pdf" or dynamic name using user name such as
    "Vishwa_attachment.pdf".
    Kindly help to achieve my needs.
    Any help will be greatly appreciated and rewarded.
    Thanks in advance,
    Regards,
    Vishwa

    Hi Naveen,
    please read through my query again, I should generate pdf when I click on "submit by email button".
    I am not using any function for conversion it will happen automatically.
    thanks,
    Vishwa

  • Sending email via Biztalk

    Hi together
    We have a biztalk system with one major task, this is to talk data out of a xml file and convert it into an edifact file.
    In the xml file we also have the email address of the market partner provided. My question is, what is the best approach to than automatically send an email to the market partner with the email that was provided in the xml ?
    Thanks
    Wolf

    Hi Wolf,
    Because the email address can be different for different messages, you have to create a dynamic send port and in the orchestration set the definitions of the email port.
    You also have to promote the email element or get it using XPATH query
    You can see how is done
    here or
    here
    msgEnvelope(SMTP.Subject) = <Email Subject>;
    msgEnvelope(SMTP.From) = <Sender Email>;
    msgEnvelope(SMTP.SMTPHost) = <Email Host name>";
    // This is the default value
    msgEnvelope(SMTP.SMTPAuthenticate) = 0;
    // Set the message text included in the email
    msgEnvelope(SMTP.EmailBodyText) = <Text in body of email>;
    // Important - This is required if the EmailBodyText is set
    msgEnvelope(SMTP.EmailBodyTextCharset) = "utf-8";
    // A value of '1' means include Message Body Part as email attachment
    msgEnvelope(SMTP.MessagePartsAttachments) = 1;
    msgEnvelope.EmailBodyString = new Microsoft.XLANGs.CustomFormattersSDK.RawString(“Body”);
    msgEnvelope.EmailBodyString(Microsoft.XLANGs.BaseTypes.ContentType) = "text/plain";
    // Important - Change this MIME type if not sending a Text file
    msgEnvelope.EmailAttach(Microsoft.XLANGs.BaseTypes.ContentType) = "text/xml";
    // Set the Filename of the attachment
    msgEnvelope. EmailAttach = new Microsoft.XLANGs.CustomFormattersSDK.RawString(msg.InnerXml());
    msgEnvelope.EmailAttach(MIME.FileName) = "XMLName.xls";
    // We set the Email Address on the Port itself
    Dynamic_Send_Port(Microsoft.XLANGs.BaseTypes.Address) = <recipient email address>;
    Sandro Pereira
    DevScope | MVP & MCTS BizTalk Server 2010
    http://sandroaspbiztalkblog.wordpress.com/ |
    @sandro_asp
    Please mark as answered if this answers your question.

  • Send eMail via Thunderbird with filled "Email information" when using multiple profiles

    Hello.
    I hope you can help me.
    We are using two Thunderbird profiles:
    "Sales" and "Purchases".
    We have thunderbird links for both of them on the desktop:
    This is how we call start the firefox profiles:
    Purchases: "C:\Program Files (x86)\Mozilla Thunderbird\thunderbird.exe" -no-remote -p Purchases
    Sales: "C:\Program Files (x86)\Mozilla Thunderbird\thunderbird.exe" -no-remote -p Sales
    (-no-remote is needed to start Thunderbird with two instances at once, -p <Profile> is to choose the profile)
    Everything works so far.
    Now we have an application which calls the "write"-dialog of thunderbird. (the dialog where you can send eMails)
    When calling the "write"-dialog, the fields of this dialog (from, to, subject, and the text body) should be filled by parameters.
    The application uses following call:
    thunderbird.exe -compose to=[email protected],subject="example subject line",body="this is the example body" -no-remote -p Sales
    That means that the send dialog of the Sales-Profile-Thunderbird should be opened with the "sales" profile.
    (email receiver is filled with "[email protected]", subject is "example subject line", and the text is "this is the example body")
    The Problem:
    This works only if thunderbird with the "Sales" profile is not already running. If Thunderbird with the "Sales" profile is already running, Thunderbird is telling that the process is already running and should be closed first.
    Before adding the second profile "Purchases", we only used "Sales" profile, and we started thunderbird without "-no-remote -p Sales".
    With only one profile and without "-no-remote -p Sales", every worked well.
    But with 2 profiles, the user always have to close thunderbird first before calling the "write"-dialog from our application.
    Is there something I can do? Maybe changing the call used by our application to show the write-dialog?
    If you need more information, or something is not clear enough, let me know.
    Best regards
    M. Jaeger

    command line arguments here https://developer.mozilla.org/en-US/docs/Mozilla/Command_Line_Options
    Perhaps the issue here is your desire for a separate profile for sales and purchases. That looks to me to be where the rot starts. Now your trying to start a third instance.
    So how about you explain what it is your trying to achieve, as you can not be the only person in the world wanting to use email in a business.
    I see a reference to a write dialog from your application. Is it your writing an application and trying to make Thunderbird work the way you have designed your application and it simply does not do that?

  • Sending emails from preview with alternative email clients

    Hi, I've got a problem. I've changed my standard email-client from Apple Mail to Unibox. And, of course, I changed the standard email client in the adjustments of Apple Mail too. So everything is working fine except one thing:
    When I try to send a pdf-file from Apple preview.app as a mail, nothing happens. What can I do to tell Apple Preview to use my new Mail-client Unibox for sending mails?

    Hi, Kevin.
    I understand your need to support sales leave-behinds from your DPS app, which is why I wrote that blog post in the first place.
    The mailto: hyperlinking approach works well from a web browser, but the webkit overlay that we we get from iOS (that we use in DPS) is definitely not a browser. Browsers have special access to the local file system, where we would like to store PDFs to attach to email. The webkit overlay does not have this access, so we can't use the normal scheme of:
    mailto:[email protected]?subject=my%20email%20message&body=see%20attachment&attachment="\\myhost\myfolder\myfile.p df" to pass the path to Mail.app.
    This limitation means that you need to use some other method to provide access to that PDF. In my blog article (to which you refer), I provide a method to provide a form that would compose an email that contains a link to the PDF, which would need to be hosted somewhere the reader could access in their browser. An alternative to this approach would be to construct a server-side form that lets a validated user (sales rep?) select some files and send them to their customer. The email would need to be composed and sent from the server, and a quick Google search reveals whole pile of PHP examples of how to send email from a web form.
    Frankly, for your use case of sales enablement, I believe that a server-side system is the better choice, because it would provide you with a way to manage that content outside of DPS, so you can update it without having to republish your .folios.
    Thanks,
    James

  • Cannot send email on LTE with IPhone 6  and IOS 8.1

    Since I got my iPhone 6+ and upgraded the operating system to IOS 8.2, I have been unable to send email unless I am on WIFI. If I am on AT&T LTE 4G, when I hit the "SEND" button, I get this pop-up box: "Unable to Send Email / A copy has been placed in your Outbox. The sender address (my email address) was rejected by the server."
    As soon as I get to a WIFI connection, the mail goes right out, no problem. I have tried everything I can figure out, up to resetting my network settings, but nothing changes. The email address I use as my recipient address is the same one I use all the time and have used for years. Never had this problem before getting the new iPhone and upgrading the OS. (But not sure exactly at what point the LTE sending stopped working.) Any clues?

    I would check with your email provider. It sounds as if the SMTP server needs a different port to use or needs to have SSL turned on. Many email providers will not allow you to send mail when not on their physical network unless there is a way to verify who you are. SSL does that, but needs additional information, like your username or password. Go into the mail account and look at the settings for your SMTP server. See if SSL is on or off, and make sure that you have entered your username and password in all locations, even where it says optional.

  • Can't send email from Outlook with parentheses in address

    I can't send email from Outlook 2007 through my WRT400N when Outlook displays the address with parentheses as in this example: Firstname Lastname ([email protected])
    I can send if the address is in this form: Firstname Lastname <[email protected]>
    I have tested with the ISP and nothing gets through the router when the problem occurs. When I bypass the router, both forms of address will send correctly. This problem is perfectly reproducible. My router is brand new, but the problem did not show up for about a week after installation. OS is Win7. Any ideas? Thanks.
    -JimW
    Solved!
    Go to Solution.

    Try to forward the port 443 to 447 on the router.Check this link.

  • Send email from SAP with more than one attachment

    Hi all,
    How can i send email with more than one attachment and different types of document(doc,pdf,etc.) from SAP to external?
    Besr regards,
    Munur

    Hi,
    I use :
    CALL FUNCTION 'SO_NEW_DOCUMENT_ATT_SEND_API1'
    the main problem with different attachemts is to genereate the packing_list.
    the packing list is a kind of description of the data table... where ist the start  of an image, end, size...
    "Creation of the entry for the compressed attachment
            objpack-transf_bin = 'X'.                    " it could be an image
            objpack-head_num = lv_head_num_count .  " inital 1 each att  add 1
            objpack-head_start = 1.                     " fix
            objpack-body_start = gv_startnum.    " table with attachments  1. line one
            objpack-body_num = tab_lines.          " how many lines are in the table of attachment
            objpack-doc_size = tab_lines * 255.   " size of the  attachment...
           objpack-doc_type = lv_typ . " 'JPG'.
            objpack-obj_name = 'ATTACHMENT'.
            objpack-obj_descr = lv_stripped_name  " name of the JPG
       APPEND objpack.
       APPEND LINES OF lt_goscontent TO gt_maildata.  " data Table...
    bestreg
    robert

  • Extract text with specific format ?

    Hello,
    Is there a way to extract text with a specific format in a document (i.e. font type/ size or even font colour)?
    thanks in advance!

    Hello gillad,
    I am afraid only indicators are the bold font or text colour...
    Having said that, just as I was writting my response, the following idea came to me:
    Convert the pdf into word
    Click on text of interest (text with distinct format)
    Use the feature "select all text with similar formating (no data)" under "editing" within the "home" ribbon
    Having said that, hopefully a tool set/ action can be developed one day...

  • How to send email from OSB with Mail server that requires SSL or STARTTLS

    Hi everyone.
    My leader ask me configuration on OSB to support send email to my company mail server (using https chanel) and customer email (some of them is gmail that require STARTTLS or SSL).
    I've configured OSB as tutorial in that link: http://blogs.oracle.com/christomkins/entry/sending_an_email_from_oracle_s
    But OSB cannot send email from mail account that configured because it cannot login to mail server. I think the reason is secure authentication with SSL or TLS.
    There some problems that similar to mine in this forum but has nobody solved it yet.
    Can you tell me the solution you know? Any suggestion is appreciated.
    Regards
    Cuong Pham

    I know I'll offer you just a workaround and not a real solution, but you can try to start your own (intermediate) SMTP server to communicate with OSB (without SSL). Then you can just relay all the messages to your "real" SMTP server which requires SSL. If you start your intermediate SMTP server on the OSB host (localhost), then this layout could be acceptable even from security point of view.

Maybe you are looking for