BizTalk: Dynamic SMTP Port: Unknown Error Description

Today I investigated one strange error working with Dynamic SMTP Port.
 
Event Type: Error
Event Source: BizTalk Server 2006
Event Category: BizTalk Server 2006
Event ID: 5754
Date: ********
Time: ********AM
User: N/A
Computer: ********
Description:
A message sent to adapter "SMTP" on send port "*********" with URI "mailto:********.com" is suspended.
Error details: Unknown Error Description 
MessageId:  {********}
InstanceID: {********}
 
My code was pretty simple and the source of the error was hidden somewhere inside it.
 
msg_MyMessage(SMTP.CC) = var_CC;
msg_MyMessage(SMTP.From) = var_From;
msg_MyMessage(SMTP.Subject) = var_Subject;
msg_MyMessage(SMTP.EmailBodyText) = var_Message;    // #1   
msg_MyMessage(SMTP.SMTPHost) = " localhost ";
msg_MyMessage(SMTP.SMTPAuthenticate) = 0;

When I added line #2, this frustrating error disappeared.
 
 msg_MyMessage(SMTP.EmailBodyTextCharset) = "UTF-8"; // #2

Conclusion:
If we use the SMTP.EmailBodyText property, we must set up the
SMTP.EmailBodyTextCharset property.

To me it looks like a bug in BizTalk. [Maybe it is "by design", but in this case give us a useful error text!!!]
And don't ask me how much time I've spent with this investigation.
 

========================================================

[2010-03-15 addition] This error is "by design". See http://msdn.microsoft.com/en-us/library/aa578155(BTS.20).aspx

Print | posted on Friday, March 12, 2010 12:50 PM

Feedback

# re: BizTalk: Dynamic SMTP Port: Unknown Error Description

left by schellack at 4/8/2010 8:37 AM Gravatar
I've had this happen before, and it was infuriating trying to figure out what the cause of the error actually was. Perhaps an error should occur when you don't set the EmailBodyTextCharset property of the adapter, but the error message text is, as you mentioned, not useful. That should be considered a bug!

# re: BizTalk: Dynamic SMTP Port: Unknown Error Description

left by Luciano Evaristo Guerche (Gorše) at 7/22/2010 10:57 AM Gravatar
I am reviewing my blogroll and wonder your blog feed has been inactive for a few months or moved somewhere else?

Cheers.

# re: BizTalk: Dynamic SMTP Port: Unknown Error Description

left by Phil Nixon at 10/13/2011 11:02 AM Gravatar
And one more thing, the text value for the body cannnot be an empty string, as you still get the same error.

# re: BizTalk: Dynamic SMTP Port: Unknown Error Description

left by Leonid Ganeline at 1/4/2012 2:21 PM Gravatar
Phil,
Thank you for good addition!
Post A Comment
Title:
Name:
Email:
Comment:
Verification: