Thread Subject: Sendmail with GMail

Subject: Sendmail with GMail

From: Joe Ercolino

Date: 27 Jul, 2007 13:58:24

Message: 1 of 7

Hi

I am trying to use the sendmail command with GMail. It is possible? What are the right default parameters configuration?

Thanks

Subject: Sendmail with GMail

From: us

Date: 27 Jul, 2007 14:35:38

Message: 2 of 7

Joe Ercolino:
<SNIP hopefully not preparing to send out spam...

> It is possible?

well,

     doc sendmail;

clearly states:
...
Note The sendmail function does not support e-mail servers
that require authentication.
...

now, as far as i know <gmail> does require authentication...

us

Subject: Sendmail with GMail

From: Ashutosh Mishra

Date: 27 Jul, 2007 15:06:26

Message: 3 of 7

"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.

Subject: Sendmail with GMail

From: Ashutosh Mishra

Date: 27 Jul, 2007 15:08:07

Message: 4 of 7

"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.

Subject: Sendmail with GMail

From: Ashutosh Mishra

Date: 27 Jul, 2007 15:09:51

Message: 5 of 7

"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.

Subject: Sendmail with GMail

From: Ashutosh Mishra

Date: 27 Jul, 2007 15:19:39

Message: 6 of 7

My apologies for so many multiple posts.

Subject: Sendmail with GMail

From: Matthew Simoneau

Date: 27 Jul, 2007 15:49:34

Message: 7 of 7

This isn't yet officially supported, but here is some code that will work in recent versions of MATLAB:

http://www.mathworks.com/support/solutions/data/1-3PRRDV.html

Tags for this Thread

Everyone's Tags:

Add a New Tag:

Separated by commas
Ex.: root locus, bode

What are tags?

A tag is like a keyword or category label associated with each thread. Tags make it easier for you to find threads of interest.

Anyone can tag a thread. Tags are public and visible to everyone.

Tag Activity for This Thread
Tag Applied By Date/Time
java Yair Altman 29 Jul, 2007 16:49:01
authentication Matthew Simoneau 27 Jul, 2007 11:56:53
sendmail Matthew Simoneau 27 Jul, 2007 11:56:48
gmail Matthew Simoneau 27 Jul, 2007 11:56:43
undocumented Matthew Simoneau 27 Jul, 2007 11:50:19
dcom Ash 27 Jul, 2007 11:19:08
actxserver Ash 27 Jul, 2007 11:19:08
google Jose Ercolino 27 Jul, 2007 10:00:21
sendmail Jose Ercolino 27 Jul, 2007 10:00:20
gmail Jose Ercolino 27 Jul, 2007 10:00:20
smtp Jose Ercolino 27 Jul, 2007 10:00:20
email Jose Ercolino 27 Jul, 2007 10:00:20
mail Jose Ercolino 27 Jul, 2007 10:00:20
rssFeed for this Thread

Contact us at files@mathworks.com