sendmail.m and Microsoft Exchange Server

4 views (last 30 days)
I am using win7 on 2011B with Microsft Office 2007.
We use a third party email service and I have a email address: me@mycompany.com. The third party which hosts the email service runs Microsft Exchange Server.
The IT guys there tell me the ingoing/ outgoing client is the same and is "webmail.justoneinbox.com".
How can I use this email address to send emails through sendmail.m?
I would rather not have to go via Outlook if at all possible. I do not wish to have to write any code in .NET to support this.
thanks

Accepted Answer

Matlab2010
Matlab2010 on 26 Feb 2013
I am writing in reference to your Service Request # 1-LM83B4 regarding 'How can I setup exchange server to send emails through the sendmail function?'.
Thank you for reporting your concern to us. I have investigated this issue for you. Exchange Server uses NTLM authentication. The version of the library that MATLAB uses does not support the NTLM authentication that Exchange requires.
There are no workarounds at this time.
Please preserve the THREAD ID below in any further correspondence on this query. This will allow our systems to automatically assign your reply to the appropriate Service Request. If you have a new technical support question, please submit a new request here:
Sincerely,
Anil Sorathiya Technical Support Team MathWorks Tel: +44 1223 226700 Fax: +44 1223 226710
File Exchange and Newsgroup Access: http://www.mathworks.co.uk/matlabcentral/
  1 Comment
Matlab2010
Matlab2010 on 26 Feb 2013
The obvious work around is that you push it via Outlook and then use
function sendolmail(to,subject,body,attachments)
%Sends email using MS Outlook. The format of the function is
%Similar to the SENDMAIL command.
% Create object and set parameters.
h = actxserver('outlook.Application');
for j=1:length(to)
mail = h.CreateItem('olMail');
mail.Subject = subject;
mail.To = to{j};
mail.BodyFormat = 'olFormatHTML';
mail.HTMLBody = body;
% Add attachments, if specified.
if nargin == 4
for i = 1:length(attachments)
mail.attachments.Add(attachments{i});
end
end
% Send message and release object.
mail.Send;
end
h.release;
end

Sign in to comment.

More Answers (1)

Shashank Prasanna
Shashank Prasanna on 26 Feb 2013
Have you looked through this documentation page?
  2 Comments
Matlab2010
Matlab2010 on 26 Feb 2013
I have read it.
Maybe you havent as it concerns sending emails via SMTP not exchange server :)..
Shashank Prasanna
Shashank Prasanna on 26 Feb 2013
You were right I hadn't, and you would be surprised how many questions come by which have solutions in the doc.

Sign in to comment.

Tags

Community Treasure Hunt

Find the treasures in MATLAB Central and discover how the community can help you!

Start Hunting!