
Anonymous
Not applicable
2013-12-06
09:36 AM
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
[resolved] tSendMail - Get message text from context variable
Hello
i have the following problem:
i want to send my output file per email. For the basic settings i want to use context variables. It works fine as long as i don't use context variables for the subject or the message field (see pic 3).
When i use context variables for these two fields, i get the following error (see pic 1):
Exception in component tSendMail_1
javax.mail.SendFailedException: Invalid Addresses;
nested exception is:
com.sun.mail.smtp.SMTPAddressFailedException: 501 5.1.3 Invalid address
at com.sun.mail.smtp.SMTPTransport.rcptTo(SMTPTransport.java:1196)
at com.sun.mail.smtp.SMTPTransport.sendMessage(SMTPTransport.java:584)
at javax.mail.Transport.send0(Transport.java:169)
at javax.mail.Transport.send(Transport.java:98)
at data_auditing.webpxe_mka_group_0_1.webpxe_mka_group.tSetGlobalVar_1Process(webpxe_mka_group.java:2997)
at data_auditing.webpxe_mka_group_0_1.webpxe_mka_group.tHashInput_2Process(webpxe_mka_group.java:4528)
at data_auditing.webpxe_mka_group_0_1.webpxe_mka_group.tMysqlInput_1Process(webpxe_mka_group.java:9717)
at data_auditing.webpxe_mka_group_0_1.webpxe_mka_group.runJobInTOS(webpxe_mka_group.java:11238)
at data_auditing.webpxe_mka_group_0_1.webpxe_mka_group.main(webpxe_mka_group.java:10923)
Caused by: com.sun.mail.smtp.SMTPAddressFailedException: 501 5.1.3 Invalid address
at com.sun.mail.smtp.SMTPTransport.rcptTo(SMTPTransport.java:1047)
... 8 more
Failed to send mail
What am I doing wrong? Is it not possible to set the subject and message text per context variables?
i have the following problem:
i want to send my output file per email. For the basic settings i want to use context variables. It works fine as long as i don't use context variables for the subject or the message field (see pic 3).
When i use context variables for these two fields, i get the following error (see pic 1):
Exception in component tSendMail_1
javax.mail.SendFailedException: Invalid Addresses;
nested exception is:
com.sun.mail.smtp.SMTPAddressFailedException: 501 5.1.3 Invalid address
at com.sun.mail.smtp.SMTPTransport.rcptTo(SMTPTransport.java:1196)
at com.sun.mail.smtp.SMTPTransport.sendMessage(SMTPTransport.java:584)
at javax.mail.Transport.send0(Transport.java:169)
at javax.mail.Transport.send(Transport.java:98)
at data_auditing.webpxe_mka_group_0_1.webpxe_mka_group.tSetGlobalVar_1Process(webpxe_mka_group.java:2997)
at data_auditing.webpxe_mka_group_0_1.webpxe_mka_group.tHashInput_2Process(webpxe_mka_group.java:4528)
at data_auditing.webpxe_mka_group_0_1.webpxe_mka_group.tMysqlInput_1Process(webpxe_mka_group.java:9717)
at data_auditing.webpxe_mka_group_0_1.webpxe_mka_group.runJobInTOS(webpxe_mka_group.java:11238)
at data_auditing.webpxe_mka_group_0_1.webpxe_mka_group.main(webpxe_mka_group.java:10923)
Caused by: com.sun.mail.smtp.SMTPAddressFailedException: 501 5.1.3 Invalid address
at com.sun.mail.smtp.SMTPTransport.rcptTo(SMTPTransport.java:1047)
... 8 more
Failed to send mail
What am I doing wrong? Is it not possible to set the subject and message text per context variables?
434 Views
1 Solution
Accepted Solutions

Anonymous
Not applicable
2013-12-09
05:25 AM
Author
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
Ok problem solved, was just a syntax error, like you expect.
Thanks you all for the help 🙂
Thanks you all for the help 🙂
434 Views
7 Replies

Anonymous
Not applicable
2013-12-06
12:18 PM
Author
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
Your problem is definitely not the usage of Context variables. Thats absolute normal and in my job it is common. The problem is only the content of the variables. The addresses must be concatenate with a comma and not a semicolon (I do not see your content but this is a common mistake).
434 Views

Anonymous
Not applicable
2013-12-06
09:50 PM
Author
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
Hi
As jlolling said, the problem is only the content of the variables, for testing, use a tJava before tSendMail component to print the value of context variable and validate the value is set correctly or not. Eg:
....tSetGlobalVar--oncomponentok--tJava--tSendMail....
Shong
As jlolling said, the problem is only the content of the variables, for testing, use a tJava before tSendMail component to print the value of context variable and validate the value is set correctly or not. Eg:
....tSetGlobalVar--oncomponentok--tJava--tSendMail....
Shong
434 Views

Anonymous
Not applicable
2013-12-09
04:16 AM
Author
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
Thanks for your replies.
I set the content of the variable to "test" and validate the value with tJava, but the problem still exists. I also tried to insert the value of the variable to a global var and call it, but the same error appears
I set the content of the variable to "test" and validate the value with tJava, but the problem still exists. I also tried to insert the value of the variable to a global var and call it, but the same error appears
434 Views

Anonymous
Not applicable
2013-12-09
04:30 AM
Author
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
Hi
If the email address is set to "test", it is obviously an invalid address. A standard email address should be like: xxxx@xxx.xxx
Shong
If the email address is set to "test", it is obviously an invalid address. A standard email address should be like: xxxx@xxx.xxx
Shong
434 Views

Anonymous
Not applicable
2013-12-09
04:35 AM
Author
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
Oh no, the problem is not the email adress! This works fine, the only problem is when i want to set the email message, the text of the email, per context variable! I set the message text to "test", not the email adress!
If i insert the text manually, all works fine and the mail will be sent. but when i get the messsage text (not the email adress!) from a context variable or a global variable the program crash and throw the error i send in my first post
If i insert the text manually, all works fine and the mail will be sent. but when i get the messsage text (not the email adress!) from a context variable or a global variable the program crash and throw the error i send in my first post
434 Views

Anonymous
Not applicable
2013-12-09
04:42 AM
Author
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
hi all,
As Shong said, catch the value you've got in context.email_cc thanks a tJava component to be sure about it.
And you don't have to use a row connector to tSendMail !
regards
laurent
As Shong said, catch the value you've got in context.email_cc thanks a tJava component to be sure about it.
System.out.println(context.email_cc);
And you don't have to use a row connector to tSendMail !
regards
laurent
434 Views

Anonymous
Not applicable
2013-12-09
05:25 AM
Author
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
Ok problem solved, was just a syntax error, like you expect.
Thanks you all for the help 🙂
Thanks you all for the help 🙂
435 Views
