sendmail.m and Microsoft Exchange Server

조회 수: 6 (최근 30일)
Matlab2010
Matlab2010 2013년 2월 26일
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

채택된 답변

Matlab2010
Matlab2010 2013년 2월 26일
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
Matlab2010
Matlab2010 2013년 2월 26일
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

댓글을 달려면 로그인하십시오.

추가 답변 (1개)

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

댓글을 달려면 로그인하십시오.

카테고리

Help CenterFile Exchange에서 Web Services에 대해 자세히 알아보기

태그

Community Treasure Hunt

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

Start Hunting!

Translated by