Six Stars

How to make tSendMail component dependent upon javax.mail.jar

I've had real problems trying to get a very simple test job send a mail to a specific SMTP server and have traced the issue to needing to have javax.mail.jar in the classes at runtime - how can I configure the environment so that whenever I use the tSendMail component, the system knows to include this library?
Thanks,
T
5 REPLIES
Moderator

Re: How to make tSendMail component dependent upon javax.mail.jar

Hi,
Did you get missing jar issue in your studio?
Have you already checked the documents about:TalendHelpCenter:Identify required external modules and TalendHelpCenter:Install external modules?
Best regards
Sabrina
--
Don't forget to give kudos when a reply is helpful and click Accept the solution when you think you're good with it.
Six Stars

Re: How to make tSendMail component dependent upon javax.mail.jar

No I didn't get any missing jar issue and when it generates the code normally it runs fine and works against some SMTP servers. I only found that when I connected to a specific SMTP server that it would only succeed in making an SSL connection if javax.mail.jar was present.
Under Modules for tSendMail it only shows mail-1.4.jar and activation.jar as being required (This is on a fresh install of 6.1.1) - I'll need to look at how to add the javax.mail.jar requirement.
M
Moderator

Re: How to make tSendMail component dependent upon javax.mail.jar

Hi,
Usually, there are two ways for you to import your new jar files:
1)Using TalendHelpCenter:tLibraryLoad component to load the jar file at the begininig of job. for example:
tLibraryLoad
   |
tJava(on tJava, use the external API)
2)Creating custom routine, import the external jar file by clicking on the rouinte name and edting the routine libraries, and then call this routine in the job.
Feel free to let us know if it is Ok with you.
Best regards
Sabrina
--
Don't forget to give kudos when a reply is helpful and click Accept the solution when you think you're good with it.
Six Stars

Re: How to make tSendMail component dependent upon javax.mail.jar

Thanks but what I'd really like to do here is update the dependencies of the actual tSendMail component so whenever I use it it will pull in the javax.mail.jar library (ideally grabbing the latest version) - where (and how exactly as I have poked about a bit already) would I go about doing this correctly?
Tks, M
Six Stars

Re: How to make tSendMail component dependent upon javax.mail.jar

Hi - any updates on how I would do that? I want to make sure that any time I include the tSendMail component in a project, the project remembers to include the javax.mail.jar library in the directory tree of libraries as well as the class library list it puts in the bat/sh scripts...
Ta, M