LabVIEW

cancel
Showing results for 
Search instead for 
Did you mean: 

Email with Attachment

Hey All,

I am using the “Email with Attachments.VI” from LabView 8.20.

When I first open the program that I created with this vi the ad attachment cluster is grayed out and disabled, so far so good, I can send out an email with (no attachments) and all works fine.

 

Now I want to send an attachment with my email so I enable the cluster and turn on the binary, add my attachment and send it, all is still working good.

 

 Now the problem, when I want to go back to just sending Emails with no attachment, I disable the cluster and turned off the binary so that it is grayed out again as it was when I first opened the program but now when I send an Email it will still add an attachment called “Text_Item_1” if I close the program and re-open it, it will work ok and just send the Email?

 

I have tried to reset every thing using shift registers and property Nodes with no luck, any ideas?

0 Kudos
Message 1 of 8
(3,587 Views)
The attachments control is an array. How did you clear it? If you don't want to attach anything, the array must be empty. It's not about enabling/disabling the cluster. What counts is the array size. If you wire an empty array to 'attachments' or leave it unwired there will be no attachments.
If this doesn't help can you post your VI?


0 Kudos
Message 2 of 8
(3,572 Views)
The attachment part of the vi is a cluster of 4 elements, Path, Data, Binary & Mime. I am using the 2 Property Node's, (Disable) to enable and turn off the grayed out cluster and (Value) to enable the binary. I have also submitted my program with this reply.
0 Kudos
Message 3 of 8
(3,566 Views)
Setting the Disabled value of the cluster does not clear the existing data. It only "disables" the clusters ability to be edited on the Front Panel. Place an invoke node using the method Reinit to Default for the cluster. This will set the cluster value to the same values as when you open the VI.
Andrew Alford
Production Test Engineering Technologist
Sustainable Energy Technologies
www.sustainableenergy.com
0 Kudos
Message 4 of 8
(3,557 Views)
Andrew, I tried the "Invoke Node" too, still no luck? The invoke node that I created was from the cluster, is that correct?
0 Kudos
Message 5 of 8
(3,545 Views)
I have edited your VI to work as expected. If "Send attachments" is true, the selected attachment(s) are sent, else nothing is attached.


0 Kudos
Message 6 of 8
(3,544 Views)
Boy was that easy, what was I thinking? Thanks!
0 Kudos
Message 7 of 8
(3,540 Views)
You're welcome... I guess it happens to all of us that sometimes we just don't see the easy solution...

0 Kudos
Message 8 of 8
(3,534 Views)