locked
Dynamic SMTP Port Error -Class not Registered RRS feed

  • Question

  • 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.

    I’ve spent many hours on this issue .Please advise how to resolve this issue

    Saturday, March 21, 2015 3:58 AM

Answers

All replies

  • 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.

    Saturday, March 21, 2015 5:53 AM
  • 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
    Saturday, March 21, 2015 6:00 AM
  • 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
    Saturday, March 21, 2015 7:22 AM
  • 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.

    Saturday, March 21, 2015 8:16 AM
  • 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.


    Thanks,
    Prashant
    ----------------------------------------
    Please mark this post accordingly if it answers your query or is helpful.

    Saturday, March 21, 2015 6:49 PM