Home Page › Forums › BizTalk 2004 – BizTalk 2010 › Email Message Content
- This topic has 7 replies, 1 voice, and was last updated 9 years, 1 month ago by
community-content.
-
AuthorPosts
-
-
June 28, 2010 at 8:39 AM #25070
Greetings everyone,
Newbie here with a question for the forum. I have a simple BizTalk 2009 project that takes an ingoing XML message and delivers an email. The email has an XML file which is a subset of the data from the original message.
So far everything works, except that the outgoing XML file is an attachment to the email being sent. I would prefer that it was the actual message. I am not even sure if thiscan be done since all the email is at the port level.
The project is very light. Just doing it with a map in the recieve pipeline. No orchestrations.
Any ideas?
Thanx, – Ziggy –
-
June 28, 2010 at 2:53 PM #25072
Hi Ziggy,
You can have your actual message in the body of the email sent, if you have a way of promoting that message string within your XML file schema. Then, do the following:
1) In your physical Send Port (in Administration Console), specify “Do not attach parts” in the dropdown list box in the Attachments tab in SMTP Transport Properties window, when configuring your Send Port; and specify “PassThruTransmit” as send pipeline.
2) In your orchestration, when constructing the message to assign to your logical Send Port (that binds to the physical port mentioned above), have the following lines in your Message Assignment shape:
YourMailMessage = YourXMLSchema.Record.MessageDescription;
YourMailMessage(SMTP.EmailBodyText) = YourXMLSchema.Record.MessageDescription;
Where MessageDescription is a Distinguished field in your XML schema (as an example).
Hope this helps,
Daniel.
-
June 30, 2010 at 10:17 AM #25093
Hi – Thanks for the reply. I have been digesting it for the last couple of days. Also working on another bug 🙂 Got that fixed.
I am not quite sure about the lines that I need to add. I used a construct message shape to make the message. Is that going to prevent this – as opposed to using the message assignment shape?
-
June 30, 2010 at 10:53 AM #25094
OK – I did a bit better here now. I added the assignmetn shape inside the current construct shape. So th eblue arrow shape is above the green arrow shape to make things clear. In the blue arrow shape I create a new message from the incoming one. There is a field called “Name” that is promoted in both the incoming and new message. This field is what I want in the body of the email.
In the assignment shape I get the red squigglies with the “.Record” or with just “.Name” The current code is below. DOH_XML_Output and Input are the new and old messages.
DOH_XML_Output = DOH_XML_Input.Name;
DOH_XML_Output(SMTP.EmailBodyText) = DOH_XML_Output.Record.Name;
Much thanks for any help.
-
June 30, 2010 at 11:46 AM #25096
Hi,
Try the following lines:
DOH_XML_Output = DOH_XML_Input.Record.Name;
DOH_XML_Output(SMTP.EmailBodyText) = DOH_XML_Input.Record.Name;
Daniel.
-
June 30, 2010 at 12:49 PM #25099
Hi Daniel
It does not like “Record” – says that it does not exist in DOH_XML_Input, am I missing a reference? If I skip the reord and go direct to Name I get the same thing.
No inellisense – makes it hard. Is “Record” a keyword I hope?
-
June 30, 2010 at 12:59 PM #25100
Hi,
Make sure that the schema associated with message type DOH_XML_Input has a Distinguished field by the name of Name. “Record” is just a designation for the record node in your schema, just for clarification purpose. Also, in your Construct message shape (that encapsulates your Message Assigment shape), make sure you select DOH_XML_Input as the message in the dropdown listbox for the Messages Selected property.
Daniel.
-
June 30, 2010 at 2:47 PM #25103
Ha! I did have it selected in the message constructed property (allin same scope) but my promotion may have been wrong. I had it as a Property Field and not a Distinquished. Once I added that it worked. I was able to drill to the name field (where record was a couple of layers). So far looks good. I will test more tomorrow.
Thank You!!!!!!!!!!
-
-
-
-
-
-
-
-
AuthorPosts
- The forum ‘BizTalk 2004 – BizTalk 2010’ is closed to new topics and replies.