smtp_send can not attach the image file
kuoweiliao
Posts: 23
Hi~
I am trying to capture the MET-ECOM camera image and through the smtp_send function sends the image to my gmail.
e.g.:
smtp_server_config_set(SMTP_ADDRESS,'smtp.gmail.com')
smtp_server_config_set(SMTP_PORT_NUMBER,'587')
smtp_server_config_set(SMTP_USERNAME,'xxx.xxx@gmail.com')
smtp_server_config_set(SMTP_PASSWORD,'password')
smtp_server_config_set(SMTP_REQUIRE_TLS, SMTP_TLS_TRUE)
smtp_server_config_set(SMTP_FROM,'xxx.xxx@gmail.com')
smtp_send(smtp,mail.toWho,mail.title,mail.body, 'ECOM.JPG')
I found smtp_send seems it will re-encode the image file and causing the file is damaged.
Is another way can send mail and incloud image file in netlinx?
Thank you.
P.S.: DVX-3155, firmware:v4.8.313
I am trying to capture the MET-ECOM camera image and through the smtp_send function sends the image to my gmail.
e.g.:
smtp_server_config_set(SMTP_ADDRESS,'smtp.gmail.com')
smtp_server_config_set(SMTP_PORT_NUMBER,'587')
smtp_server_config_set(SMTP_USERNAME,'xxx.xxx@gmail.com')
smtp_server_config_set(SMTP_PASSWORD,'password')
smtp_server_config_set(SMTP_REQUIRE_TLS, SMTP_TLS_TRUE)
smtp_server_config_set(SMTP_FROM,'xxx.xxx@gmail.com')
smtp_send(smtp,mail.toWho,mail.title,mail.body, 'ECOM.JPG')
I found smtp_send seems it will re-encode the image file and causing the file is damaged.
Is another way can send mail and incloud image file in netlinx?
Thank you.
P.S.: DVX-3155, firmware:v4.8.313
0
Comments
Thank you for the share.
But my problem is smtp_send attach the image file will damage.
So the saved jpeg image you're trying to attach displays properly on the TP when pulled from the master's flash but once sent as an attachment it's corrupted.
>>> MailSenderPrivate::Send DATA body error 5 (Stream error)
How can I fix the stream error on NI master?
Thanks.