Jump to content
We've recently updated our Privacy Statement, available here ×

Sending Email to Dynamic Address(context Variable)


Elham

Recommended Posts

In my job, I want to send Email to some email addresses which I want to read them from a file.

 

I have a tFileInputDelimited component with key;value Schema. As a key in every row there is this string: "Email" ,and as value there is an email address. After this component I put a tContextLoad Component. tFileInputDelimited is connected to this component with a main row. As we know, tFileInputDelimited component will repeat next components in its following chain, equals to its rows number.

 

Then, all of addresses will be loaded in context variable (Here the name of this variable is Email ). But I want each time, tSendMail component, send an email to this address. I put (String)((String)context.getProperty("Email")) in text box of TO field of tSendMail. I connect the tFileInputDelimited with an Iterate row to tSendMail.

 

What happen::

If tFileInputDelimited has 12 rows, only 11 rows will be sent to addresses. The last address will loose. Because in first time, before Loading the value of Email, tSendMail will be run. Then the first email will be sent to default value of Context Variable (Email), and the last loaded value will not be used by tSendMail.

 

 

What can I do?

 

Do you think there is another or better design of components for this job?

Link to comment
Share on other sites

  • Replies 1
  • Created
  • Last Reply

Top Posters In This Topic

Top Posters In This Topic

Create an account or sign in to comment

You need to be a member in order to leave a comment

Create an account

Sign up for a new account in our community. It's easy!

Register a new account

Sign in

Already have an account? Sign in here.

Sign In Now

×
×
  • Create New...