Dynamic SMTP Port Error -Class not Registered

Hi,BizTalk receiving the Invoice Message from Source and doing some transformation.After that Biztalk will send  email  dynamically via SMTP .Below is the code in message construct message assignment shape

multipartMessage1.MessagePart_1= XMLdoc;

multipartMessage1.MessagePart_2="This is message part2 as a string";

multipartMessage1(SMTP.Subject) ="Email From Dynamic Port";

multipartMessage1(SMTP.From) ="donotreply@mydomain.com";

multipartMessage1(SMTP.SMTPHost) ="100.110.120.99";

multipartMessage1.MessagePart_2(MIME.FileName) = "Attachment_Name";

multipartMessage1(SMTP.SMTPAuthenticate) =0;

SendInvoicePort(Microsoft.XLANGs.BaseTypes.Address)="mailto:abc@abc.com";

 

When run the application, getting below error message.

A message sent to adapter "SMTP" on send port "HelloWorld_1.0.0.0_Microsoft.Samples.BizTalk.HelloWorld.HelloSchedule_SendInvoicePort_d7ce16ba803d4f87" with URI "mailto:abcemail@abc.com" is suspended.

 Error details: Class not registered

 

 MessageId:  {0D6BBA1A-F384-4AD9-8B48-44A9C342DEFB}

 InstanceID: {EAFEADE1-8D05-4A7D-A908-7BC297788D06}

After googling ,I have added multipartMessage1 (SMTP.EmailBodyTextCharset) = "UTF-8".but no use.

Ive spent many hours on this issue .Please advise how to resolve this issue

March 21st, 2015 12:03am

IMHO the reason for the error is the following statement:

multipartMessage1.MessagePart_2="This is message part2 as a string";

This is because the LHS of the assignment is a Class XLANGMessage.Part and you just cannot assign a "string" to this. To get past this you should have a multipart message type defined in your orchestration where Part1 would be of type "XmlDocument" and designated "Body" and there should be another body part of type "string". Then you'd be able to get away with it.

Regards.

Free Windows Admin Tool Kit Click here and download it now
March 21st, 2015 1:57am

Thanks for reply.

MessageType created with two parts.MessagePart_1 is xmldocument and MessagePart_2 is string.is this wrong?

i have taken the reference from https://www.cleancode.co.nz/blog/1021/sending-emails-biztalk
  • Edited by Singam05 1 hour 2 minutes ago
March 21st, 2015 2:04am

I forgot to mentioned a point, This code is working if I use Papercut test SMTP tool in DEV server.But when I deploy in UAT environment and change the Host server to Actual SMTP server then its not working.I am getting class not registered.

I've deployed papercut in UAT,now it's not working and getting same error.

is there any issue to register SMTP Handler in UAT environment

  • Edited by Singam05 23 hours 23 minutes ago
Free Windows Admin Tool Kit Click here and download it now
March 21st, 2015 3:26am

ahh... from what little I understand of papercut (https://papercut.codeplex.com/) it implements a SMTP server so in your T & D you're pointing to the SMTP implemented by papercut and everything is fine. That could be because in your BizTalk Message definition it is possible that the MessageType schema/class is implemented by PaperCut which is not available in your UAT environment. You can install PaperCut in your UAT environment but still use the actual SMTP server and see if the error goes away.

Regards.

March 21st, 2015 4:20am

Thanks for reply.

MessageType created with two parts.MessagePart_1 is xmldocument and MessagePart_2 is string.is this wrong?

i have taken the reference from https://www.cleancode.co.nz/blog/1021/sending-emails-biztalk
  • Edited by Singam05 Saturday, March 21, 2015 6:00 AM
Free Windows Admin Tool Kit Click here and download it now
March 21st, 2015 6:00am

Thanks for reply.

MessageType created with two parts.MessagePart_1 is xmldocument and MessagePart_2 is string.is this wrong?

i have taken the reference from https://www.cleancode.co.nz/blog/1021/sending-emails-biztalk
  • Edited by Singam05 Saturday, March 21, 2015 6:00 AM
March 21st, 2015 6:00am

Thanks for reply.

MessageType created with two parts.MessagePart_1 is xmldocument and MessagePart_2 is string.is this wrong?

i have taken the reference from https://www.cleancode.co.nz/blog/1021/sending-emails-biztalk
  • Edited by Singam05 Saturday, March 21, 2015 6:00 AM
Free Windows Admin Tool Kit Click here and download it now
March 21st, 2015 6:00am

Thanks for reply.

MessageType created with two parts.MessagePart_1 is xmldocument and MessagePart_2 is string.is this wrong?

i have taken the reference from https://www.cleancode.co.nz/blog/1021/sending-emails-biztalk
  • Edited by Singam05 Saturday, March 21, 2015 6:00 AM
March 21st, 2015 6:00am

I forgot to mentioned a point, This code is working if I use Papercut test SMTP tool in DEV server.But when I deploy in UAT environment and change the Host server to Actual SMTP server then its not working.I am getting class not registered.

I've deployed papercut in UAT,now it's not working and getting same error.

is there any issue to register SMTP Handler in UAT environment

  • Edited by Singam05 Saturday, March 21, 2015 7:38 AM
Free Windows Admin Tool Kit Click here and download it now
March 21st, 2015 7:22am

I forgot to mentioned a point, This code is working if I use Papercut test SMTP tool in DEV server.But when I deploy in UAT environment and change the Host server to Actual SMTP server then its not working.I am getting class not registered.

I've deployed papercut in UAT,now it's not working and getting same error.

is there any issue to register SMTP Handler in UAT environment

  • Edited by Singam05 Saturday, March 21, 2015 7:38 AM
March 21st, 2015 7:22am

I forgot to mentioned a point, This code is working if I use Papercut test SMTP tool in DEV server.But when I deploy in UAT environment and change the Host server to Actual SMTP server then its not working.I am getting class not registered.

I've deployed papercut in UAT,now it's not working and getting same error.

is there any issue to register SMTP Handler in UAT environment

  • Edited by Singam05 Saturday, March 21, 2015 7:38 AM
Free Windows Admin Tool Kit Click here and download it now
March 21st, 2015 7:22am

I forgot to mentioned a point, This code is working if I use Papercut test SMTP tool in DEV server.But when I deploy in UAT environment and change the Host server to Actual SMTP server then its not working.I am getting class not registered.

I've deployed papercut in UAT,now it's not working and getting same error.

is there any issue to register SMTP Handler in UAT environment

  • Edited by Singam05 Saturday, March 21, 2015 7:38 AM
March 21st, 2015 7:22am

Hi Singam,

What is the default handler(host) configured for SMTP Adapter. Check it is 32 bit or 64 bit.

This seems to be a known issue if Host is of 64 bit.

http://social.technet.microsoft.com/wiki/contents/articles/7204.biztalk-server-list-of-errors-and-warnings-causes-and-solutions.aspx

As you are using Dynamic Send Port it will run under the default host make it of 32 bit, restart the host and see if the issue is resolved or not.

Free Windows Admin Tool Kit Click here and download it now
March 21st, 2015 2:53pm

This topic is archived. No further replies will be accepted.

Other recent topics Other recent topics