LabVIEW

cancel
Showing results for 
Search instead for 
Did you mean: 

sending email and deleting files

Solved!
Go to solution

Hi I have simplify this for a better help. Could someone run this and tell me where the error is coming from?

 

Thank you.

0 Kudos
Message 11 of 23
(1,029 Views)

I tried it, error 5.

Its still from the attachment case structure. If you disable the case structure, it successfully deletes the file. I would assume that the attachment process is not releasing the file.

 


CLA CTAChampionI'm attending the GLA Summit!
Subscribe to the Test Automation user group: UK Test Automation Group
0 Kudos
Message 12 of 23
(1,021 Views)

Yes I think the problem is comming from there, but I don't see how to solve it.  I don't really see how can I close the file after the attachement processess.

0 Kudos
Message 13 of 23
(1,018 Views)

So as I can't solve the attachment issue, I was thinking about solving the email body issue. In my previous attachment, I am trying to read from a file and get that file content and use it as my email body. But when doing that, I get only the last characted read sent to the email body and not the all content. what can I do to sent the all file content to the email body?

 

Thank you

 

0 Kudos
Message 14 of 23
(1,014 Views)
Solution
Accepted by agyna

Here you go, all your issues sorted. Works for me. My gmail inbox is full of test mails!


CLA CTAChampionI'm attending the GLA Summit!
Subscribe to the Test Automation user group: UK Test Automation Group
0 Kudos
Message 15 of 23
(1,006 Views)

I found something in another thread that might be the cause of the issue you are having trying to delete the file.

 

 

=====================
LabVIEW 2012


0 Kudos
Message 16 of 23
(989 Views)

Yes, thanks Steve. This sure sounds familiar.  I had been fighting this issue for two weeks and discovered this method nestled in the Mail Message constructor.  You need to dispose of the file attachment to release the reference from .NET.  Your file instance may not even show up in your task manager.  If you read back a few posts, Steve already mentioned the dispose method.  This is the fix and my VI has been working fine.

-----------------------------------------------------------------------------------------
Reese, (former CLAD, future CLD)

Some people call me the Space Cowboy!
Some call me the gangster of love.
Some people call me MoReese!
...I'm right here baby, right here, right here, right here at home
0 Kudos
Message 17 of 23
(986 Views)
That's what I thought. Agyna, if that fixed it for you, and if you are still here, go ahead and mark the appropriate reply as accepted solution under options for the reply. That way people with a similar problem will have an easier time solving it. Also people like me will not come back to help you with a problem that you already solved. Not that I don't enjoy posting these things but I could be enjoying other things. (smiley would go here but I'm on my phone)
=====================
LabVIEW 2012


0 Kudos
Message 18 of 23
(979 Views)

Thanks a lot.

Sorry, I forgot to mark this as the solution needed.

How should I mark it as the SOLUTION?

 

 

0 Kudos
Message 19 of 23
(970 Views)

Sorry I see. It is just accepting the solution.

0 Kudos
Message 20 of 23
(969 Views)