<?xml version="1.0" encoding="utf-8"?>
<feed xmlns="http://www.w3.org/2005/Atom">
	<title type="html"><![CDATA[FrontAccounting forum — xls mail patch]]></title>
	<link rel="self" href="https://frontaccounting.com/punbb/extern.php?action=feed&amp;tid=5522&amp;type=atom" />
	<updated>2015-03-08T05:09:04Z</updated>
	<generator>PunBB</generator>
	<id>https://frontaccounting.com/punbb/viewtopic.php?id=5522</id>
		<entry>
			<title type="html"><![CDATA[Re: xls mail patch]]></title>
			<link rel="alternate" href="https://frontaccounting.com/punbb/viewtopic.php?pid=22812#p22812" />
			<content type="html"><![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>]]></content>
			<author>
				<name><![CDATA[apmuthu]]></name>
				<uri>https://frontaccounting.com/punbb/profile.php?id=364</uri>
			</author>
			<updated>2015-03-08T05:09:04Z</updated>
			<id>https://frontaccounting.com/punbb/viewtopic.php?pid=22812#p22812</id>
		</entry>
		<entry>
			<title type="html"><![CDATA[Re: xls mail patch]]></title>
			<link rel="alternate" href="https://frontaccounting.com/punbb/viewtopic.php?pid=22397#p22397" />
			<content type="html"><![CDATA[<p>What I meant was the extra tabs in some lines added highlighted in the attachment.</p>]]></content>
			<author>
				<name><![CDATA[apmuthu]]></name>
				<uri>https://frontaccounting.com/punbb/profile.php?id=364</uri>
			</author>
			<updated>2015-02-04T17:36:44Z</updated>
			<id>https://frontaccounting.com/punbb/viewtopic.php?pid=22397#p22397</id>
		</entry>
		<entry>
			<title type="html"><![CDATA[Re: xls mail patch]]></title>
			<link rel="alternate" href="https://frontaccounting.com/punbb/viewtopic.php?pid=22392#p22392" />
			<content type="html"><![CDATA[<p>Tabulators are set to 4 in our php editors.</p><p>/Joe</p>]]></content>
			<author>
				<name><![CDATA[joe]]></name>
				<uri>https://frontaccounting.com/punbb/profile.php?id=3</uri>
			</author>
			<updated>2015-02-04T09:20:12Z</updated>
			<id>https://frontaccounting.com/punbb/viewtopic.php?pid=22392#p22392</id>
		</entry>
		<entry>
			<title type="html"><![CDATA[Re: xls mail patch]]></title>
			<link rel="alternate" href="https://frontaccounting.com/punbb/viewtopic.php?pid=22387#p22387" />
			<content type="html"><![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>]]></content>
			<author>
				<name><![CDATA[apmuthu]]></name>
				<uri>https://frontaccounting.com/punbb/profile.php?id=364</uri>
			</author>
			<updated>2015-02-04T07:58:22Z</updated>
			<id>https://frontaccounting.com/punbb/viewtopic.php?pid=22387#p22387</id>
		</entry>
		<entry>
			<title type="html"><![CDATA[Re: xls mail patch]]></title>
			<link rel="alternate" href="https://frontaccounting.com/punbb/viewtopic.php?pid=22386#p22386" />
			<content type="html"><![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>]]></content>
			<author>
				<name><![CDATA[joe]]></name>
				<uri>https://frontaccounting.com/punbb/profile.php?id=3</uri>
			</author>
			<updated>2015-02-04T07:35:14Z</updated>
			<id>https://frontaccounting.com/punbb/viewtopic.php?pid=22386#p22386</id>
		</entry>
		<entry>
			<title type="html"><![CDATA[xls mail patch]]></title>
			<link rel="alternate" href="https://frontaccounting.com/punbb/viewtopic.php?pid=22377#p22377" />
			<content type="html"><![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>]]></content>
			<author>
				<name><![CDATA[apmuthu]]></name>
				<uri>https://frontaccounting.com/punbb/profile.php?id=364</uri>
			</author>
			<updated>2015-02-03T07:12:42Z</updated>
			<id>https://frontaccounting.com/punbb/viewtopic.php?pid=22377#p22377</id>
		</entry>
</feed>
