12-10-2011 12:54 PM
Hi I have simplify this for a better help. Could someone run this and tell me where the error is coming from?
Thank you.
12-10-2011 02:59 PM
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.
12-10-2011 03:27 PM
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.
12-10-2011 03:46 PM
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
12-10-2011 07:28 PM
Here you go, all your issues sorted. Works for me. My gmail inbox is full of test mails!
12-23-2011 04:32 PM
I found something in another thread that might be the cause of the issue you are having trying to delete the file.
12-23-2011 05:42 PM - edited 12-23-2011 05:43 PM
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.
12-23-2011 06:18 PM
12-24-2011 12:09 PM
Thanks a lot.
Sorry, I forgot to mark this as the solution needed.
How should I mark it as the SOLUTION?
12-24-2011 12:09 PM
Sorry I see. It is just accepting the solution.