Hi everyone,
i'm currently doing my master thesis in Biztalk and i was trying to get it to send a email with a simple text in the body instead of inside a XML node, but i can't manage to work it out. The main idea is that i receive a XML file and i have to use 2 node values from that file to write my string that will be sent on the email body message. For example:
- Let's asume that i have the following XML:
<ns0:Message xmlns:ns0="http://..."> <SenderID>123</SenderID> <ReceiverID>456</ReceiverID> <RequestDateTimeStamp>1999-05-31T13:20:00.000-05:00</RequestDateTimeStamp> <RequestMessageVersion>1.0</RequestMessageVersion> <TransactionType>Booking</TransactionType> <TransactionVersion>1.0</TransactionVersion> <TransactionStatus>Accepted</TransactionStatus></ns0:Message>
What i wanna do is send an email with a single string in the mesage body saying something like: "The booking made by sender 123 was Accepted", where the underlined words are the values of the nodes SenderID and TransactionStatus on the XML.
I've read a bit about the RawString code but i'm not sure if it help me to do what i need. Furthermore, since i'm quite the noob on Biztalk, i've read that this type is not in the SDK, so you have to build it yourself, compile the class as a separate assembly, GAC it, and add its reference to your project. But i have no idea of how to do all that or even where to begin. Can anyone help me out please?
Best regards,
Pedro Miranda
You will need to use a Orchestration to set the body of the message.
This link can help you get a good start
www.eggheadcafe.com/.../sending-smtp-email-from-within-biztalk-orchestration.aspx
Regards,NISHIL MCT,MCTS | Freelance BizTalk Consultant.biztalkconnect.blogspot.com
So you dont want to send any attachments in the email. Just a string text body.
These 2 links should help you.
msdn.microsoft.com/.../ee253436(v=bts.10).aspx
www.codeproject.com/.../Sending-an-HTML-Formatted-E-Mail-Message-from-BizT
Hi Pedro,Since you need toend only plain text emails, I feel using a Dynamic send port for email should work for you.You may set the body of the email by using the property Message_Email(SMTP.EmailBodyText) where Message_Email is a message of type System.String.
Please let me know if you have further queries
Kindly mark as answer if this helps
-Regards,Rahul
Hi NISHIL,
thanks for your reply and i'm sorry i couldn't reply sooner. I already have it working, I currently receiving emails but my problem is that i can't receive an email with a simple string on the body instead of a XML file as an attachment. Even when i try to send a string i always get something like:
<Message>
<String>Here appears the string i send</String>
I want to receive a simple email with just a string on the body saying something like: "The booking made by sender 123 was Accepted". I've been reading stuff about the RawString but i have no idea how to add it to my project or even where should i add the code.
I appreciate any help you can give.
Thanks,
Pedro