The Math Forum

Search All of the Math Forum:

Views expressed in these public forums are not endorsed by NCTM or The Math Forum.

Math Forum » Discussions » Software » comp.soft-sys.matlab

Notice: We are no longer accepting new posts, but the forums will continue to be readable.

Topic: Problem with SENDMAIL using gmail at work.
Replies: 1   Last Post: May 3, 2011 10:42 PM

Advanced Search

Back to Topic List Back to Topic List Jump to Tree View Jump to Tree View   Messages: [ Previous | Next ]
Kevin Hung

Posts: 90
Registered: 12/7/04
Problem with SENDMAIL using gmail at work.
Posted: Mar 28, 2011 11:10 AM
  Click to see the message monospaced in plain text Plain Text   Click to reply to this topic Reply

I used the following example code from Matlab doc at work (have not tried this out at home yet):

% Modify these two lines to reflect
% your account and password.
myaddress = '.....';
mypassword = '......';


props = java.lang.System.getProperties;
props.setProperty('mail.smtp.socketFactory.class', ...

sendmail(myaddress, 'Gmail Test', 'This is a test message.');

But I got this error message:

??? Error using ==> sendmail at 168
Could not connect to SMTP host:, port: 25;
Connection refused: connect

Error in ==> do_tmp at 17
sendmail(myaddress, 'Gmail Test', 'This is a test message.');

Does this mean that this won't work in my office?


Point your RSS reader here for a feed of the latest messages in this topic.

[Privacy Policy] [Terms of Use]

© The Math Forum at NCTM 1994-2018. All Rights Reserved.