<?xml version="1.0" encoding="UTF-8"?><rss version="2.0"
	xmlns:content="http://purl.org/rss/1.0/modules/content/"
	xmlns:dc="http://purl.org/dc/elements/1.1/"
	xmlns:atom="http://www.w3.org/2005/Atom"
	xmlns:sy="http://purl.org/rss/1.0/modules/syndication/"
	
	>
<channel>
	<title>
	Comments on: Sending HTML emails from Matlab	</title>
	<atom:link href="https://undocumentedmatlab.com/articles/sending-html-emails-from-matlab/feed" rel="self" type="application/rss+xml" />
	<link>https://undocumentedmatlab.com/articles/sending-html-emails-from-matlab?utm_source=rss&#038;utm_medium=rss&#038;utm_campaign=sending-html-emails-from-matlab</link>
	<description>Professional Matlab consulting, development and training</description>
	<lastBuildDate>Thu, 28 Nov 2019 15:33:42 +0000</lastBuildDate>
	<sy:updatePeriod>
	hourly	</sy:updatePeriod>
	<sy:updateFrequency>
	1	</sy:updateFrequency>
	<generator>https://wordpress.org/?v=6.7.2</generator>
	<item>
		<title>
		By: BPoliti		</title>
		<link>https://undocumentedmatlab.com/articles/sending-html-emails-from-matlab#comment-507961</link>

		<dc:creator><![CDATA[BPoliti]]></dc:creator>
		<pubDate>Thu, 28 Nov 2019 15:33:42 +0000</pubDate>
		<guid isPermaLink="false">http://undocumentedmatlab.com/?p=6986#comment-507961</guid>

					<description><![CDATA[Hi,
Thank you for the very nice article! It has helped me a lot and works like a charm :)

One thing with the modified code is that it is necessary to add an attachment to send an HTML format mail (it returns the error &quot;not enough arguments&quot; otherwise).
To change that and be able to send only HTML text, a simple copy of the argument parsing code from the &quot;sendmail&quot; function to the &quot;sendEmail&quot; function works.

Here is the modified code: 

&lt;pre lang=&quot;matlab&quot;&gt;
function sendEmail(to, subject, theMessage, attachments)
%SENDEMAIL Send e-mail wrapper (with HTML formatting)
% Argument parsing.
  narginchk(2,4);
  if ischar(to)
    to = {to};
  end
  if (nargin &lt; 3)
    theMessage = &#039;&#039;;
  end
  if (nargin &lt; 4)
    attachments = [];
  elseif ischar(attachments)
    attachments = {attachments};
  end
  endmail(to, subject, theMessage, attachments);
&lt;/pre&gt;

I hope it will be useful!

Cheers]]></description>
			<content:encoded><![CDATA[<p>Hi,<br />
Thank you for the very nice article! It has helped me a lot and works like a charm 🙂</p>
<p>One thing with the modified code is that it is necessary to add an attachment to send an HTML format mail (it returns the error &#8220;not enough arguments&#8221; otherwise).<br />
To change that and be able to send only HTML text, a simple copy of the argument parsing code from the &#8220;sendmail&#8221; function to the &#8220;sendEmail&#8221; function works.</p>
<p>Here is the modified code: </p>
<pre lang="matlab">
function sendEmail(to, subject, theMessage, attachments)
%SENDEMAIL Send e-mail wrapper (with HTML formatting)
% Argument parsing.
  narginchk(2,4);
  if ischar(to)
    to = {to};
  end
  if (nargin < 3)
    theMessage = '';
  end
  if (nargin < 4)
    attachments = [];
  elseif ischar(attachments)
    attachments = {attachments};
  end
  endmail(to, subject, theMessage, attachments);
</pre>
<p>I hope it will be useful!</p>
<p>Cheers</p>
]]></content:encoded>
		
			</item>
		<item>
		<title>
		By: matlabi		</title>
		<link>https://undocumentedmatlab.com/articles/sending-html-emails-from-matlab#comment-416388</link>

		<dc:creator><![CDATA[matlabi]]></dc:creator>
		<pubDate>Mon, 13 Nov 2017 23:05:22 +0000</pubDate>
		<guid isPermaLink="false">http://undocumentedmatlab.com/?p=6986#comment-416388</guid>

					<description><![CDATA[hi
Smtp settings Where should we place?]]></description>
			<content:encoded><![CDATA[<p>hi<br />
Smtp settings Where should we place?</p>
]]></content:encoded>
		
			</item>
	</channel>
</rss>
