Skip to main content
Announcements
Introducing Qlik Answers: A plug-and-play, Generative AI powered RAG solution. READ ALL ABOUT IT!
cancel
Showing results for 
Search instead for 
Did you mean: 
davidPnt
Contributor III
Contributor III

[tSendMail] How to use context variable for password

In the tSendMail component, we can use context variables.

For the server, the port and the login user, there's no issue.

 

For the password, how can I use also a context variable ?

 

For instance, my password string is pass*.

I've tried to write the password string, into a password type, within a context variable named smtp_password, with quotes ("pass*") or without quotes (pass*).

And I've tried tu use it in my tSendMail component in several ways:

 - context.smtp_password

 - "\"" + context.smtp_password + "\""

 

I've always the same error : javax.mail.AuthenticationFailedException.

 

Obviously, I've got the good password, and if I try to put it in plain-text, within the tSendMail component, it's work fine.

Labels (3)
1 Solution

Accepted Solutions
davidPnt
Contributor III
Contributor III
Author

It's ok. It's work fine.

 

When I switch, in the context variable interface, from String type to Password type, for my smtp_password variable, it's seem like Talend don't keep the string password previously written, and don't encrypted it.

 

So, the process is : after selected the password type for this variable, I have to write the password string.

View solution in original post

1 Reply
davidPnt
Contributor III
Contributor III
Author

It's ok. It's work fine.

 

When I switch, in the context variable interface, from String type to Password type, for my smtp_password variable, it's seem like Talend don't keep the string password previously written, and don't encrypted it.

 

So, the process is : after selected the password type for this variable, I have to write the password string.