Path: news.mathworks.com!not-for-mail
From: <HIDDEN>
Newsgroups: comp.soft-sys.matlab
Subject: Re: Sendmail with GMail
Date: Fri, 27 Jul 2007 15:08:07 +0000 (UTC)
Organization: The MathWorks, Inc.
Lines: 41
Message-ID: <f8d1on$f78$1@fred.mathworks.com>
References: <f8ctm0$7qd$1@fred.mathworks.com>
Reply-To: <HIDDEN>
NNTP-Posting-Host: webapp-00-blr.mathworks.com
Content-Type: text/plain; charset="ISO-8859-1"
Content-Transfer-Encoding: 8bit
X-Trace: fred.mathworks.com 1185548887 15592 172.30.248.35 (27 Jul 2007 15:08:07 GMT)
X-Complaints-To: news@mathworks.com
NNTP-Posting-Date: Fri, 27 Jul 2007 15:08:07 +0000 (UTC)
X-Newsreader: MATLAB Central Newsreader 1067841
Xref: news.mathworks.com comp.soft-sys.matlab:421411



"Joe Ercolino" <joe_ercolino@hotmail.com> wrote in message <f8ctm0$7qd$1@fred.mathworks.com>...
> Hi
> 
> I am trying to use the sendmail command with GMail. It is possible? What are the right default parameters configuration?
> 
> Thanks

There is a slightly more convoluted way of being able to do this: Ofcourse this is for a windows system:

If you use Outlook, here is something that i used to do sometime back: 
----------------

function[]=sendingmail(mailid,attch1,subj,body)

outlook = actxserver('Outlook.Application');
email = outlook.CreateItem('olMailitem');
 
% Repeating for each address
email.Recipients.Add(mailid);
email.Subject = subj;
email.Body=body;
email.Attachments.Add(attch1);
%email.Attachments.Add(attch2); 

% For read receipt
email.ReadReceiptRequested = false;
  
email.Send;
outlook.release ;
-----------------------

In this: 
mailid - string containing the recipient mail id:
attch1=pathto attachment file.
subj=string
body - string.


Now since gmail allows pop access, configure your outlook to use gmail as the default outgoing smtp server (look at their online help) and i think you should be able to send the email. 

Hope this helps.