SMTP - ClassCastException

Hi All,

I am trying to send HTML mail and for the same i have created the template. I am running runTemplateOnPipe service whose output $txt is mapped with attachements/content and attachement/contenttype is text/html and other all parameters are hardcoded like to,cc,mailhost and all. I guess i have mapped everthing properly but still i am getting java.lang.ClassCastException in pub.client:smtp service.

Can you please tell me what’s wrong in this.

Thanks
Atul

Hi All Experts,

Waiting for your comments on this Class cast exception while using SMTP service. Please suggest.

Thanks

Hi Atul,

I am facing the same issue. Were you ever able to fix it? Can you please tell me what was the solution?

Thanks,
SM

Hi Patil,

What is that you are passing as a $txt…i mean which data type is it…if i am not wrong SMTP service will pick up everything in the pipeline named as an attachment…once you remove your attachment and work out…

Hi Rajesh,

I am facing similar problem with pub.client.smtp service. I am using runStringTemplate service to create HTML string and I am mapping it to attachment/content varible of pub.client.smtp. This works fine in my UAT env. I moved same code to Test/Dev envs. Now everytime when I invoke pub.client.smtp service, it throws java.lang.ClassCastException and it goes to catch block. I am not sure if there some java class mismatch between environments or something else. Any suggestion?

Thanks
SM

Guys, My issue is resolved.

Thanks,
SM