LabVIEW

cancel
Showing results for 
Search instead for 
Did you mean: 

Email Attachment that is not a file

Solved!
Go to solution

I would like to send data (maybe an array, or string, or variant) as an email attachment.  I can find plenty of examples of sending emails with attached files.  So, one option is to save the data as a file and attach it.  However, I'd like to skip the save as a file step and attach the data directly.  Seems that shouldn't be too hard, but after much research and messing around with .Net constructors and methods, I haven't been able to figure it out.  (I am fairly .Net clueless, I admit.)  Any help anyone can give would be greatly appreciated!

0 Kudos
Message 1 of 6
(406 Views)

There are tools for converting binary files to text and back.  Search the web.

0 Kudos
Message 2 of 6
(404 Views)

I am trying to attach data to an email without first saving it as a file.  I'm not trying to convert a binary file to text. 

0 Kudos
Message 3 of 6
(395 Views)
Solution
Accepted by topic author JohnEE

Then put the data in the body of the message.  Attachments are for files...message body is for data. 

aputman
------------------
Heads up! NI has moved LabVIEW to a mandatory SaaS subscription policy, along with a big price increase. Make your voice heard.
0 Kudos
Message 4 of 6
(376 Views)

I suppose that I can just flatten my data to a string, put it in the body and send it that way, but I am looking to add it as an attachment, without saving it as a file first.

0 Kudos
Message 5 of 6
(374 Views)

Thanks, aputman, I had thought of that since my original post and was working on it...

0 Kudos
Message 6 of 6
(372 Views)