Please note that VisualCron support is not actively monitoring this community forum. Please use our contact page for contacting the VisualCron support directly.


matthewlock
2012-03-02T01:58:15Z
Hello,
I'd like to suggest that email recipient fields, such as "To..." allow variables.

For example I am looping through a CSV file containing an email address and the name of a user on each row. I'd like to be able to set the To field to {LOOP(CurrentValueXArray,0)} and include "Dear {LOOP(CurrentValueXArray,1)} ... " in the Text of the email. Unfortunately only the email Text field can evaluate variables. In the email to field I just get an error at runtime like so:

Send failed to: , err: Mail message assembly failed (error code is 1)

I've had to work around it by creating a file in the loop containing {LOOP(CurrentValueXArray,0)} and then getting the email task to read the To field from that file.
Sponsor
Forum information
Support
2012-03-02T07:31:05Z
Variables should be allowed there. Please try this variable:

{LOOP(CurrentValueX)}
Henrik
Support
http://www.visualcron.com 
Please like  VisualCron on facebook!
matthewlock
2012-03-07T23:30:27Z
Thanks,
I tried putting {LOOP(CurrentValueX)} in the Email Task Recipient "To..." field, but I still get the error:

Result: Send failed to: , err: Mail message assembly failed (error code is 1)

I don't think could work anyway as the email address field is only one of the columns in my CSV file.

Regards,
Matthew Lock
matthewlock attached the following image(s):
Support
2012-03-07T23:37:17Z
This seems like a setup problem. Please post sample file with export of this specific Job.
Henrik
Support
http://www.visualcron.com 
Please like  VisualCron on facebook!
matthewlock
2012-03-08T00:07:21Z
I have attached an export of the job

Thanks
File Attachment(s):
Job-Settings.zip (3kb) downloaded 76 time(s).
Support
2012-03-08T09:40:03Z
We would like to see a sample of the file as well.
Henrik
Support
http://www.visualcron.com 
Please like  VisualCron on facebook!
matthewlock
2012-03-09T01:13:26Z
okay here's the sample file I tried it on when I got the error
File Attachment(s):
Recipients.zip (1kb) downloaded 82 time(s).
Support
2012-03-09T09:35:29Z
You need to use {LOOP(CurrentValueXArray,2)} as the email is in the third place of the csv file. Make sure that you have field delimiter comma in the loop as well.
Henrik
Support
http://www.visualcron.com 
Please like  VisualCron on facebook!
matthewlock
2012-03-14T23:55:57Z
Thanks, but when I try that I still get the same error:

Send failed to: , err: Mail message assembly failed (error code is 1)

So I added an Event Log notification as a kind of debugging trace to see what values were in the loop variables, but I get the following errors in the event log now:

"[Error in SetVariables, string: {LOOP(CurrentValueXArray,0)}
{LOOP(CurrentValueXArray,1)}
{LOOP(CurrentValueXArray,2)}, err: Object reference not set to an instance of an object.]"

Please see attached screenshots.
matthewlock attached the following image(s):
matthewlock
2012-03-15T00:04:17Z
Okay I deleted and recreated the email task and now it works. Perhaps tasks can get corrupted in VisualCron somehow?
Support
2012-03-15T13:29:22Z
Does not sound likely but I am glad it works now 😁
Henrik
Support
http://www.visualcron.com 
Please like  VisualCron on facebook!
matthewlock
2012-03-15T23:28:06Z
Scott Garrard
2022-12-02T23:13:41Z
I had exactly the same issue and deleting it and setting it up was the only solution to work.

Thanks
Scroll to Top