<?xml version="1.0" encoding="utf-8"?>
<rss version="2.0" xmlns:atom="http://www.w3.org/2005/Atom">
	<channel>
		<title><![CDATA[FrontAccounting forum — xls mail patch]]></title>
		<link>https://frontaccounting.com/punbb/viewtopic.php?id=5522</link>
		<atom:link href="https://frontaccounting.com/punbb/extern.php?action=feed&amp;tid=5522&amp;type=rss" rel="self" type="application/rss+xml" />
		<description><![CDATA[The most recent posts in xls mail patch.]]></description>
		<lastBuildDate>Sun, 08 Mar 2015 05:09:04 +0000</lastBuildDate>
		<generator>PunBB</generator>
		<item>
			<title><![CDATA[Re: xls mail patch]]></title>
			<link>https://frontaccounting.com/punbb/viewtopic.php?pid=22812#p22812</link>
			<description><![CDATA[<p>Now included in <a href="http://https:/sourceforge.net/p/frontaccounting/mercurial/ci/3debfe1c9b1ca6217cfe701332007faabe9b9ded/tree/reporting/includes/class.mail.inc?diff=5816f08cb1fec6d257236fbf9dd8047632c60163">FA 2.4</a></p>]]></description>
			<author><![CDATA[null@example.com (apmuthu)]]></author>
			<pubDate>Sun, 08 Mar 2015 05:09:04 +0000</pubDate>
			<guid>https://frontaccounting.com/punbb/viewtopic.php?pid=22812#p22812</guid>
		</item>
		<item>
			<title><![CDATA[Re: xls mail patch]]></title>
			<link>https://frontaccounting.com/punbb/viewtopic.php?pid=22397#p22397</link>
			<description><![CDATA[<p>What I meant was the extra tabs in some lines added highlighted in the attachment.</p>]]></description>
			<author><![CDATA[null@example.com (apmuthu)]]></author>
			<pubDate>Wed, 04 Feb 2015 17:36:44 +0000</pubDate>
			<guid>https://frontaccounting.com/punbb/viewtopic.php?pid=22397#p22397</guid>
		</item>
		<item>
			<title><![CDATA[Re: xls mail patch]]></title>
			<link>https://frontaccounting.com/punbb/viewtopic.php?pid=22392#p22392</link>
			<description><![CDATA[<p>Tabulators are set to 4 in our php editors.</p><p>/Joe</p>]]></description>
			<author><![CDATA[null@example.com (joe)]]></author>
			<pubDate>Wed, 04 Feb 2015 09:20:12 +0000</pubDate>
			<guid>https://frontaccounting.com/punbb/viewtopic.php?pid=22392#p22392</guid>
		</item>
		<item>
			<title><![CDATA[Re: xls mail patch]]></title>
			<link>https://frontaccounting.com/punbb/viewtopic.php?pid=22387#p22387</link>
			<description><![CDATA[<p>Thanks Joe. <a href="http://https:/sourceforge.net/p/frontaccounting/mercurial/ci/3debfe1c9b1ca6217cfe701332007faabe9b9ded/tree/reporting/includes/class.mail.inc?diff=5816f08cb1fec6d257236fbf9dd8047632c60163">Check the indents</a>.</p>]]></description>
			<author><![CDATA[null@example.com (apmuthu)]]></author>
			<pubDate>Wed, 04 Feb 2015 07:58:22 +0000</pubDate>
			<guid>https://frontaccounting.com/punbb/viewtopic.php?pid=22387#p22387</guid>
		</item>
		<item>
			<title><![CDATA[Re: xls mail patch]]></title>
			<link>https://frontaccounting.com/punbb/viewtopic.php?pid=22386#p22386</link>
			<description><![CDATA[<p>The mail extensen XLS has been included in class.mail.inc and sent to HG repository 2.4.</p><p>Ehe End() functionality in excel_report.inc will be fixed during the 2.4 release.</p><p>/Joe</p>]]></description>
			<author><![CDATA[null@example.com (joe)]]></author>
			<pubDate>Wed, 04 Feb 2015 07:35:14 +0000</pubDate>
			<guid>https://frontaccounting.com/punbb/viewtopic.php?pid=22386#p22386</guid>
		</item>
		<item>
			<title><![CDATA[xls mail patch]]></title>
			<link>https://frontaccounting.com/punbb/viewtopic.php?pid=22377#p22377</link>
			<description><![CDATA[<p>The current <strong>reporting/includes/class.mail.inc</strong> does not allow emailing of xls files. Also the CC and BCC constructs can be simplified using implode(). The following patch addresses them:<br /></p><div class="codebox"><pre><code>--- old/reporting/includes/class.mail.inc    Mon Sep 29 21:21:28 2014
+++ new/reporting/includes/class.mail.inc    Tue Feb 03 12:30:19 2015
@@ -97,6 +97,8 @@
         if ($filename == $file . &#039;.zip&#039;) return &#039;application/x-zip-compressed&#039;;
         $file = basename($filename, &#039;.pdf&#039;);
         if ($filename == $file . &#039;.pdf&#039;) return &#039;application/pdf&#039;;
+        $file = basename($filename, &#039;.xls&#039;);
+        if ($filename == $file . &#039;.xls&#039;) return &#039;application/vnd.ms-excel&#039;;
         $file = basename($filename, &#039;.csv&#039;);
         if ($filename == $file . &#039;.csv&#039;) return &#039;application/vnd.ms-excel&#039;;
         $file = basename($filename, &#039;.tar&#039;);
@@ -114,31 +116,17 @@
 
     function send()
     {
-        // CC Empfänger hinzufügen
-        $max = count($this-&gt;cc);
-        if ($max &gt; 0)
-        {
-            $this-&gt;header .= &quot;Cc: &quot;.$this-&gt;cc[0];
-            for ($i = 1; $i &lt; $max; $i++)
-            {
-                $this-&gt;header .= &quot;, &quot;.$this-&gt;cc[$i];
-            }
-            $this-&gt;header .= &quot;\n&quot;;
-        }
-        // BCC Empfänger hinzufügen
-        $max = count($this-&gt;bcc);
-        if ($max &gt; 0)
-        {
-            $this-&gt;header .= &quot;Bcc: &quot;.$this-&gt;bcc[0];
-            for ($i = 1; $i &lt; $max; $i++)
-            {
-                $this-&gt;header .= &quot;, &quot;.$this-&gt;bcc[$i];
-            }
-            $this-&gt;header .= &quot;\n&quot;;
-        }
+        // Add CC Recipients
+        if (!empty($this-&gt;cc))
+            $this-&gt;header .= &quot;Cc: &quot; . implode(&quot;, &quot;, $this-&gt;cc) . &quot;\n&quot; ;
+
+        // Add BCC Recipients
+        if (!empty($this-&gt;bcc))
+            $this-&gt;header .= &quot;Bcc: &quot; . implode(&quot;, &quot;, $this-&gt;bcc) . &quot;\n&quot; ;
+
         $this-&gt;header .= &quot;Content-Type: multipart/mixed;\n boundary=\&quot;$this-&gt;boundary\&quot;\n&quot;;
 
-        // Attachment hinzufügen
+        // Add Attachments
         $max = count($this-&gt;attachment);
         if ($max &gt; 0)
         {</code></pre></div><p>In the file <strong>reporting/includes/excel_report.inc</strong> this will enable the creation of an equivalent method <strong>End()</strong> (what a name for a&nbsp; class method!) that now only exists in <strong>reporting/includes/pdf_report.inc</strong> file.</p><p>@joe: can incorporate into FA 2.4 and backport it.</p><p><strong>References:</strong><br /><a href="http://stackoverflow.com/questions/974079/setting-mime-type-for-excel-document">http://stackoverflow.com/questions/9740 … l-document</a><br /><a href="http://filext.com/faq/office_mime_types.php">http://filext.com/faq/office_mime_types.php</a></p>]]></description>
			<author><![CDATA[null@example.com (apmuthu)]]></author>
			<pubDate>Tue, 03 Feb 2015 07:12:42 +0000</pubDate>
			<guid>https://frontaccounting.com/punbb/viewtopic.php?pid=22377#p22377</guid>
		</item>
	</channel>
</rss>
