11-16-2015 06:15 PM
Hi,
I have a VI that saves graphs on my computer and also have a matlab script to send these graphs via email. I am getting an error 1050 as shown in the picture attached. Here is the script:
setpref('Internet','E_mail','sender's email@gmail.com'); %sender gmail email address
mail = 'sender's email@gmail.com';
password = 'password';
setpref('Internet','SMTP_Server','smtp.gmail.com'); %smtp server set-up
setpref('Internet','E_mail',mail); %sender's email
setpref('Internet','SMTP_Username',mail); %sender's email
setpref('Internet','SMTP_Password',password); %sender's password
props = java.lang.System.getProperties;
props.setProperty('mail.smtp.auth','true');
props.setProperty('mail.smtp.socketFactory.class', 'javax.net.ssl.SSLSocketFactory');
props.setProperty('mail.smtp.socketFactory.port','465');
%Receiver's address, Title, body message, and attachment. To send multiple
%attachment {'C:\yourFileSystem\file.txt','C:\yourFileSystem\file2.txt'}
sendmail('receiver's email@gmail.com','Load Cell Results','Load Cell results can be viewed in the attachments.',{'C:\Users\ameeral.AD\Desktop\loadcell\cell1.bmp','C:\Users\ameeral.AD\Desktop\loadcell\cell2.bmp','C:\Users\ameeral.AD\Desktop\loadcell\cell3.bmp','C:\Users\ameeral.AD\Desktop\loadcell\cell4.bmp'});
I intentionally removed the email and password marked with red.
Please help
Solved! Go to Solution.
11-16-2015 07:00 PM
11-16-2015 07:10 PM
I tried using the Send Email function but it does not work. I get an error message about reaching system time limit, please check the attached image here. I am using my gmail account and the SMTP server is smtp.gmail.com on port 465 and I inputed my username and password and checked the box that says: Use secure connection (TLS/SSL). Thank you
11-16-2015 07:16 PM
@kingzamzom wrote:
I tried using the Send Email function but it does not work. I get an error message about reaching system time limit, please check the attached image here. I am using my gmail account and the SMTP server is smtp.gmail.com on port 465 and I inputed my username and password and checked the box that says: Use secure connection (TLS/SSL). Thank you
Sounds like you have a problem with your network.
11-16-2015 08:55 PM
11-16-2015 09:00 PM - edited 11-16-2015 09:04 PM
@nyc_(is_out_of_here) wrote:
@kingzamzom wrote:
I tried using the Send Email function but it does not work. I get an error message about reaching system time limit, please check the attached image here. I am using my gmail account and the SMTP server is smtp.gmail.com on port 465 and I inputed my username and password and checked the box that says: Use secure connection (TLS/SSL). Thank you
Sounds like you have a problem with your network.
Maybe, I will have to check.
11-16-2015 09:01 PM - edited 11-16-2015 09:16 PM
@Dennis_Knutson wrote:
What version of LabVIEW are you using?
LabVIEW 2013 version 13.0 (64 bit)
11-16-2015 09:20 PM
11-17-2015 09:01 AM
Hi! Please check that the MathWorks, Inc. MATLAB ® software is set to the same working directory as LabVIEW. The MATLAB® script will call the MATLAB® server, which may not be in the same directory as LabVIEW.
To do this, open MATLAB® and select File»Set Path... from the pull-down menu. In the Set Path window select Add Path... to add the path where your function scripts are located to the MATLAB® search path.
Failing this, the error may also occur if there is a disruption in this script server between MATLAB® and LabVIEW. Try restarting both programs.
MATLAB® is a registered trademark of The MathWorks, Inc.
11-30-2015 12:14 AM
I used Yahoo authentication instead of Gmail in my Matlab script and the error is cleared. Thank you all