Error using MALTAB sendmail with GMAIL
    조회 수: 4 (최근 30일)
  
       이전 댓글 표시
    
I am trying to use MATLABs send mail functionality to send an email to let me know my calculations are complete (Alternatives to send a notification to my iPhone would be great). I am trying to use this code:
   mail = 'myemail@gmail.com';
   password = 'MOTHEROFALLPASSWORDS';
   setpref('Internet','SMTP_Server','smtp.gmail.com');
   setpref('Internet','E_mail',mail);
   setpref('Internet','SMTP_Username',mail);
   setpref('Internet','SMTP_Password',password);
   props.setProperty('mail.smtp.starttls.enable','true');
   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');
   sendmail(mail, 'My message', 'My message');
However I get this error:
Error using sendmail (line 171)
[EOF]
Can someone help me send an email notifying me that my calculation is done? I am using a MAC OSX, MATLAB 2016b
댓글 수: 0
답변 (0개)
참고 항목
카테고리
				Help Center 및 File Exchange에서 Web Services에 대해 자세히 알아보기
			
	Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!