AnsweredAssumed Answered

Mail step: Using variable as destination address causes Invalid Address error when running scheduled task on Windows 7

Question asked by Dean Flinter on Mar 16, 2018
Latest reply on Mar 21, 2018 by Gotn O'Guts

Just wondering if anyone else has come across this problem

 

I have a job that generates a user's email by getting the user who last modified an excel file. I then set this address as a variable called USER_EMAIL. I then have ${USER_EMAIL} in the destination box of the mail step.

 

If I run the job directly in PDI, it works fine. I created a bat file in order to schedule the job using Windows task scheduler. If I launch the bat file directly, it also works fine however if Task scheduler opens it, I get an Invalid Address error. It appears that the variable is not being substituted

 

2018/03/16 09:44:38 - Success Mail - ERROR (version 8.0.0.0-28, build 8.0.0.0-28 from 2017-11-05 07.27.50 by buildguy) : Problem while sending message: javax.mail.SendFailedException: Invalid Addresses;

  nested exception is:

com.sun.mail.smtp.SMTPAddressFailedException: 501 5.1.3 Invalid address

 

 

2018/03/16 09:44:38 - Success Mail - ERROR (version 8.0.0.0-28, build 8.0.0.0-28 from 2017-11-05 07.27.50 by buildguy) :     ** Invalid Addresses

2018/03/16 09:44:38 - Success Mail - ERROR (version 8.0.0.0-28, build 8.0.0.0-28 from 2017-11-05 07.27.50 by buildguy) :          ${USER_EMAIL}

Outcomes