Some courses and learning paths on NI Learning Center may not appear on learner dashboards. Our team is actively investigating.

If you encounter access issues, please contact services@ni.com and include the learner’s name, email, service ID or EA number, and the list of required courses.

LabVIEW

cancel
Showing results for 
Search instead for 
Did you mean: 

SMTP Email with Attachment File - array error

Solved!
Go to solution

Hi, I'm trying to send an email including a file attachment. The file I want to include is generated by the 'write to measurement file' function with a user-specified file path input. When I try to connect the file path to the SMTP Attachments VI, I get an error saying that the source is a file path but the sink is looking for a 1D array of file paths. Is there a way to convert the originial file path into an array of paths, or an alternate method to attach the file?

 

I've also tried using the old 'SMTP Send Email with Attachments' function by converting the file path into a string and inputting that as the attachment path, but it also didn't work.

 

Thanks!

0 Kudos
Message 1 of 4
(4,457 Views)
Solution
Accepted by topic author graberse

Using the build array tool from the arrays menu should do exactly what you are looking for.

 

Arrays.png

0 Kudos
Message 2 of 4
(4,448 Views)

Worked perfectly, thanks!

0 Kudos
Message 3 of 4
(4,410 Views)

Hi,

 

 Can you share your VI

i am getiing error 56.

 

 

0 Kudos
Message 4 of 4
(4,188 Views)