I have an email report that stopped working a few months ago. Ive just got around to trying to get it working again and Ive found for some reason Im getting an error related to the email attachment “Cannot coerce value '[array”
this code worked without issues a few months back and im not sure what has changed.
here is a snippet of the code
path = "//Public//Equipment//Email Charts//GR1.jpg"
GR1_chart = system.file.readFileAsBytes(path)
GR1_name = "Grinding Robot history.jpg"
system.net.sendEmail("owa.abc.com", "Equipment_Monitor@abc.com", "Daily Runtime Report for Belt Grind", body, 1, recipients,[GR1_name],[GR1_chart])
here is the compact version error:
[code]Traceback (most recent call last):
File “”, line 183, in
File “”, line 181, in main
java.lang.ClassCastException: java.lang.ClassCastException: Cannot coerce value ‘[array(‘b’, [-119, 80, 78, 71, 13, 10, …-126])]’ into type: class [Ljava.lang.String;
Ignition v7.7.4-beta2 (b2015030909)
Java: Sun Microsystems Inc. 1.6.0_31
[/code]