Biztalk dynamic Email - unable to set the values


hi all,

i trying send dynamic email value config file , incoming message.

to=getto(msg);

from=getfrom(msg);

body=getbody(msg);

and trying set these values email below,but unable set value , throwing vague error. 

email xml doc type

email.to=to;

email.from=from;

email.body=body;

any suggestions

thanks in advance

hi,

you can use code below:

msgenvelope(smtp.subject) = <email subject>;
msgenvelope(smtp.from) = <sender email>;
msgenvelope(smtp.smtphost) = <email host name>";
// default value
msgenvelope(smtp.smtpauthenticate) = 0;
// set message text included in email
msgenvelope(smtp.emailbodytext) = <text in body of email>;
// important - required if emailbodytext set
msgenvelope(smtp.emailbodytextcharset) = "utf-8";
// value of '1' means include message body part email attachment
msgenvelope(smtp.messagepartsattachments) = 1;

 

msgenvelope.emailbodystring = new microsoft.xlangs.customformatterssdk.rawstring(“body”);

msgenvelope.emailbodystring(microsoft.xlangs.basetypes.contenttype) = "text/plain";

 

// important - change mime type if not sending text file
msgenvelope
.emailattach(microsoft.xlangs.basetypes.contenttype) = "text/xml";
// set filename of attachment
msgenvelope.
emailattach = new microsoft.xlangs.customformatterssdk.rawstring(msg.innerxml());

msgenvelope.emailattach(mime.filename) = "xmlname.xls";

 

// set email address on port itself
dynamic_send_port(microsoft.xlangs.basetypes.address) = <recipient email address>;

excerpt thread.

hth

steef-jan wiggers

mvp & mcts biztalk server 2010

http://soa-thoughts.blogspot.com/ | @steefjan

if answers question please mark accordingly


biztalk



BizTalk Server  >  BizTalk Server General



Comments

Popular posts from this blog

Azure DocumentDB Owner resource does not exist

BizTalk Server 2013 Azure VM Log Shipping and HA for hosts

How to Share webservice object to all user