LabVIEW

cancel
Showing results for 
Search instead for 
Did you mean: 

email MS Excel file attachments

I am trying to send an email from within LabVIEW 7 using the SMTP Send Multiple Attachments.vi
I need to attach an MS Excel file (.xls)
The recipient gets the email with attachment, but the file is corrupted (invalid format) and can not be opened. Is there an example of how to accomplish this?
Lawrence M. David Jr.
Certified LabVIEW Architect
cell: 516.819.9711
http://www.aleconsultants.com
larry@aleconsultants.com
0 Kudos
Message 1 of 5
(2,939 Views)
I believe that there is an Email with Data.vi example that should help you.

However, it should be pretty straight forward. As an example:

1. Open SMTP Email Send File.vi
2. Fill out the recipient's email address in recipients
3. Fill in the subject
4. Fill in the message
5. Fill in the path to the Excel file in file path
6. Click the binary? boolean to be True.
7. Fill in your return address.
8. Fill in you mail server's address
9. Make sure the MIME content-type is set to application/octet-stream

Run the VI and everything should be fine. I just did exactly that and the xls was sent without a problem.

Hope this helps!
Message 2 of 5
(2,939 Views)
working now
had everything right EXCEPT that I had my Boolean set to FALSE
did not realize that Excel files were transmitted as binary.
THANX
lmd2
Lawrence M. David Jr.
Certified LabVIEW Architect
cell: 516.819.9711
http://www.aleconsultants.com
larry@aleconsultants.com
0 Kudos
Message 3 of 5
(2,939 Views)
why i get this error:- Error 66 occurred at TCP Read in NI_SMTPEmail.lvlib:SMTP Email TCP Read xTP Reply.vi:8->NI_SMTPEmail.lvlib:SMTP Email Command.vi:7->NI_SMTPEmail.lvlib:SMTP Email [DATA].vi:1->NI_SMTPEmail.lvlib:SMTP Email Send Message Start.vi->NI_SMTPEmail.lvlib:SMTP Email Send Multiple Attachments Message.vi:2->NI_SMTPEmail.lvlib:SMTP Email Send File Charset.vi:1->NI_SMTPEmail.lvlib:SMTP Email Send File.vi->Untitled 1 Possible reason(s): LabVIEW: The network connection was closed by the peer. what should i do to solve this problem???
0 Kudos
Message 4 of 5
(2,417 Views)
why i get this error:- Error 66 occurred at TCP Read in NI_SMTPEmail.lvlib:SMTP Email TCP Read xTP Reply.vi:8->NI_SMTPEmail.lvlib:SMTP Email Command.vi:7->NI_SMTPEmail.lvlib:SMTP Email [DATA].vi:1->NI_SMTPEmail.lvlib:SMTP Email Send Message Start.vi->NI_SMTPEmail.lvlib:SMTP Email Send Multiple Attachments Message.vi:2->NI_SMTPEmail.lvlib:SMTP Email Send File Charset.vi:1->NI_SMTPEmail.lvlib:SMTP Email Send File.vi->Untitled 1 Possible reason(s): LabVIEW: The network connection was closed by the peer. what should i do to solve this problem???
0 Kudos
Message 5 of 5
(2,415 Views)