<?xml version="1.0" encoding="utf-8"?>
<feed xmlns="http://www.w3.org/2005/Atom">
	<title type="html"><![CDATA[FrontAccounting forum — Can't email invoices]]></title>
	<link rel="self" href="https://frontaccounting.com/punbb/extern.php?action=feed&amp;tid=1621&amp;type=atom" />
	<updated>2014-08-11T06:07:46Z</updated>
	<generator>PunBB</generator>
	<id>https://frontaccounting.com/punbb/viewtopic.php?id=1621</id>
		<entry>
			<title type="html"><![CDATA[Re: Can't email invoices]]></title>
			<link rel="alternate" href="https://frontaccounting.com/punbb/viewtopic.php?pid=20489#p20489" />
			<content type="html"><![CDATA[<p>By the way, I use 2.3.21 version.</p><p>Thanks again</p>]]></content>
			<author>
				<name><![CDATA[Javi]]></name>
				<uri>https://frontaccounting.com/punbb/profile.php?id=19547</uri>
			</author>
			<updated>2014-08-11T06:07:46Z</updated>
			<id>https://frontaccounting.com/punbb/viewtopic.php?pid=20489#p20489</id>
		</entry>
		<entry>
			<title type="html"><![CDATA[Re: Can't email invoices]]></title>
			<link rel="alternate" href="https://frontaccounting.com/punbb/viewtopic.php?pid=20488#p20488" />
			<content type="html"><![CDATA[<p>Hello!!<br />I have the same problem, I can&#039;t send invoices&nbsp; &quot;TAX INVOICE 1. Sending document by email failed. Email: xxx@xxx.xom&quot;&nbsp; I tried to do some of the things commented here but&nbsp; I dont have any program knowledge.</p><p>Thanks in advance for your help!!</p>]]></content>
			<author>
				<name><![CDATA[Javi]]></name>
				<uri>https://frontaccounting.com/punbb/profile.php?id=19547</uri>
			</author>
			<updated>2014-08-11T05:57:13Z</updated>
			<id>https://frontaccounting.com/punbb/viewtopic.php?pid=20488#p20488</id>
		</entry>
		<entry>
			<title type="html"><![CDATA[Re: Can't email invoices]]></title>
			<link rel="alternate" href="https://frontaccounting.com/punbb/viewtopic.php?pid=7226#p7226" />
			<content type="html"><![CDATA[<p>Sorry mph, the mailbox is in frontaccounting.net domain.<br />To avoid problems we will establish the mailbox also at *.com.</p><p>Janusz</p>]]></content>
			<author>
				<name><![CDATA[itronics]]></name>
				<uri>https://frontaccounting.com/punbb/profile.php?id=89</uri>
			</author>
			<updated>2010-10-27T07:48:04Z</updated>
			<id>https://frontaccounting.com/punbb/viewtopic.php?pid=7226#p7226</id>
		</entry>
		<entry>
			<title type="html"><![CDATA[Re: Can't email invoices]]></title>
			<link rel="alternate" href="https://frontaccounting.com/punbb/viewtopic.php?pid=7224#p7224" />
			<content type="html"><![CDATA[<p>Okay,</p><p>&nbsp; What is it with me and emailing <img src="https://frontaccounting.com/punbb/img/smilies/roll.png" width="15" height="15" alt="roll" /> <img src="https://frontaccounting.com/punbb/img/smilies/smile.png" width="15" height="15" alt="smile" />&nbsp; I tried to send the modified file to contributions@frontaccounting.com<br /></p><div class="quotebox"><blockquote><p>Mail Delivery Failure:</p><p>Arrival-Date: Tue, 26 Oct 2010 18:41:52 -0400</p><p>Last-Attempt-Date: Tue, 26 Oct 2010 18:41:52 -0400<br />Remote-MTA: dns; frontaccounting.com<br />Diagnostic-Code: smtp; 550 No Such User Here<br />Action: failed<br />Final-Recipient: rfc822; contributions@frontaccounting.com<br />Status: 5.0.0</p></blockquote></div>]]></content>
			<author>
				<name><![CDATA[mph]]></name>
				<uri>https://frontaccounting.com/punbb/profile.php?id=2201</uri>
			</author>
			<updated>2010-10-27T01:38:37Z</updated>
			<id>https://frontaccounting.com/punbb/viewtopic.php?pid=7224#p7224</id>
		</entry>
		<entry>
			<title type="html"><![CDATA[Re: Can't email invoices]]></title>
			<link rel="alternate" href="https://frontaccounting.com/punbb/viewtopic.php?pid=7219#p7219" />
			<content type="html"><![CDATA[<div class="quotebox"><blockquote><p>I have used patches for my own stuff, but have never submitted one before.&nbsp; Other than documenting what I&#039;ve done and trying to keep the code as fluid as possible with the original style.&nbsp; Are there any other requirements / guidelines I should / could use?</p></blockquote></div><p>No, i don&#039;t think so. You can send changed files, or patches against selected sources version. We always check the sources before submitting to CVS.</p><p>Thanks in advance MPH <img src="https://frontaccounting.com/punbb/img/smilies/smile.png" width="15" height="15" alt="smile" /><br />Janusz</p><p>PS. I also use Suhoshin patch on PHP without any side effects, but I think it can depend on mail content.<br />J.</p>]]></content>
			<author>
				<name><![CDATA[itronics]]></name>
				<uri>https://frontaccounting.com/punbb/profile.php?id=89</uri>
			</author>
			<updated>2010-10-26T13:31:08Z</updated>
			<id>https://frontaccounting.com/punbb/viewtopic.php?pid=7219#p7219</id>
		</entry>
		<entry>
			<title type="html"><![CDATA[Re: Can't email invoices]]></title>
			<link rel="alternate" href="https://frontaccounting.com/punbb/viewtopic.php?pid=7215#p7215" />
			<content type="html"><![CDATA[<p>You can just send your edited files to contributions (email in the Announcement Forum). Please add your own comments.</p>]]></content>
			<author>
				<name><![CDATA[joe]]></name>
				<uri>https://frontaccounting.com/punbb/profile.php?id=3</uri>
			</author>
			<updated>2010-10-26T07:29:54Z</updated>
			<id>https://frontaccounting.com/punbb/viewtopic.php?pid=7215#p7215</id>
		</entry>
		<entry>
			<title type="html"><![CDATA[Re: Can't email invoices]]></title>
			<link rel="alternate" href="https://frontaccounting.com/punbb/viewtopic.php?pid=7211#p7211" />
			<content type="html"><![CDATA[<p>Absolutely!</p><p>&nbsp; It&#039;ll just take me a little longer.&nbsp; It was late (for me) last night when I got it working.&nbsp; I&#039;ve yet to change where the text / html content types go in the header.&nbsp; I should be able to do that fairly easily tonight.&nbsp; </p><p>&nbsp; I have used patches for my own stuff, but have never submitted one before.&nbsp; Other than documenting what I&#039;ve done and trying to keep the code as fluid as possible with the original style.&nbsp; Are there any other requirements / guidelines I should / could use?</p><p>Regards,</p><p>MPH</p>]]></content>
			<author>
				<name><![CDATA[mph]]></name>
				<uri>https://frontaccounting.com/punbb/profile.php?id=2201</uri>
			</author>
			<updated>2010-10-25T15:51:00Z</updated>
			<id>https://frontaccounting.com/punbb/viewtopic.php?pid=7211#p7211</id>
		</entry>
		<entry>
			<title type="html"><![CDATA[Re: Can't email invoices]]></title>
			<link rel="alternate" href="https://frontaccounting.com/punbb/viewtopic.php?pid=7208#p7208" />
			<content type="html"><![CDATA[<p>Would you like to provide the patch you have done as a contribution to FrontAccounting, to be included in next release?</p><p>Janusz</p>]]></content>
			<author>
				<name><![CDATA[itronics]]></name>
				<uri>https://frontaccounting.com/punbb/profile.php?id=89</uri>
			</author>
			<updated>2010-10-25T09:50:07Z</updated>
			<id>https://frontaccounting.com/punbb/viewtopic.php?pid=7208#p7208</id>
		</entry>
		<entry>
			<title type="html"><![CDATA[Re: Can't email invoices]]></title>
			<link rel="alternate" href="https://frontaccounting.com/punbb/viewtopic.php?pid=7207#p7207" />
			<content type="html"><![CDATA[<p>Janusz,</p><p><strong>I&#039;ve got it figured out!!!&nbsp; </strong></p><p>The suhosin security patch for PHP was blocking the emails before the ever got to postfix(My email server).&nbsp; This would explain why I couldn&#039;t find any info in it&#039;s log files.&nbsp; I didn&#039;t find it until I increased the debug level in the postfix config file.<br />from /var/log/messages:</p><div class="quotebox"><blockquote><p>Oct 24 20:12:02 myserver suhosin[4627]: ALERT - mail() - double newline in headers, possible injection, <strong><span class="bbu">mail dropped</span></strong> (attacker &#039;10.x.x.x&#039;, file &#039;/home/user/workspace/frontaccounting/reporting/includes/class.mail.inc&#039;, line 138)</p></blockquote></div><p>Rather than remove a security measure, I decided to &quot;massage&quot; the code a little.&nbsp; I removed all of the double &quot;\n&quot;s that I could find in the header and it still was failing.&nbsp; Once I separated the body from the header, I was getting the emails.&nbsp; However, for some reason there were extra line feeds in the uuencoded data which rendered the attachment useless.&nbsp; Adobe said it was corrupt or improperly decoded.&nbsp; So, I changed the chunking to a length of 72(which really is moot, it just wants a value) and added a &quot;\n&quot; for the EOL, and it everything is working great!!<br />The \n may not be right since I haven&#039;t tested it on a windows box yet.&nbsp; I would think it&#039;s okay because email is email.&nbsp; Both Windows and Linux read the same email very close to the same.</p><p>Thank You for your help and pointing me in the right direction.</p><p>Regards,</p><p>MPH</p>]]></content>
			<author>
				<name><![CDATA[mph]]></name>
				<uri>https://frontaccounting.com/punbb/profile.php?id=2201</uri>
			</author>
			<updated>2010-10-25T01:51:38Z</updated>
			<id>https://frontaccounting.com/punbb/viewtopic.php?pid=7207#p7207</id>
		</entry>
		<entry>
			<title type="html"><![CDATA[Re: Can't email invoices]]></title>
			<link rel="alternate" href="https://frontaccounting.com/punbb/viewtopic.php?pid=7205#p7205" />
			<content type="html"><![CDATA[<p>You have tested mail() function with clean email address, so try the same in FA: remove company name and brackets leaving just email address. The constraints in form of email address header&nbsp; depends only on mailer setup and are outside of FA/PHP scope.</p><p>Janusz</p>]]></content>
			<author>
				<name><![CDATA[itronics]]></name>
				<uri>https://frontaccounting.com/punbb/profile.php?id=89</uri>
			</author>
			<updated>2010-10-24T09:32:50Z</updated>
			<id>https://frontaccounting.com/punbb/viewtopic.php?pid=7205#p7205</id>
		</entry>
		<entry>
			<title type="html"><![CDATA[Re: Can't email invoices]]></title>
			<link rel="alternate" href="https://frontaccounting.com/punbb/viewtopic.php?pid=7204#p7204" />
			<content type="html"><![CDATA[<p>Addendum:</p><p>&nbsp; After a little more research (Following your instructions) It appears to be a problem with the $this-&gt;email header.&nbsp; I&#039;ve changed the other 2 variables and it works fine.&nbsp; Any other combination including the header fails.&nbsp; I don&#039;t have time to dig any further at the moment, hopefully later this evening.</p><p>Regards,</p><p>MPH<br />-----------<br />Janusz,</p><p>&nbsp; Thanks for the info.&nbsp; Here are the parameters being passed to the mail command.&nbsp; They all look normal to me.&nbsp; But I&#039;ve not programmed anything this involved before. </p><p>Some of it may not look quite right as I&#039;ve removed any personal information, email addresses etc...&nbsp; I did verify that the original values are correct and the file pointed to does exist.</p><p>These are the variables and their values after executing the $ret = mail($mail, $this-&gt;subject, &quot;&quot;, $this-&gt;header); statement.</p><div class="quotebox"><blockquote><p>$mail = Company Name Removed &lt;my_email@address.com&gt;</p><p>&nbsp; $this-&gt;email<br />&nbsp; &nbsp; to = Company Name Removed &lt;my_email@address.com&gt;</p><p>&nbsp; &nbsp; cc =</p><p>&nbsp; &nbsp; bcc =</p><p>&nbsp; &nbsp; attachment = ../company/0/pdf_files/Invoice11.pdf</p><p>&nbsp; &nbsp; boundry = a5bc2dd9d48cdbf1c107d47cadbcd068</p><p>&nbsp; &nbsp; header = From: My Company &lt;my_email@address.com&gt;<br />&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp;MIME-Version: 1.0<br />&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp;Content-Type: multipart/mixed; boundary=a5bc2dd9d48cdbf1c107d47cadbcd068</p><p>&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp;This is a multi-part message in MIME format<br />&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp;--a5bc2dd9d48cdbf1c107d47cadbcd068<br />&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp;Content-Type: text/plain; charset=ISO-8859-1<br />&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp;Content-Transfer-Encoding: 8bit</p><p>&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp;Dear Test Customer</p><p>&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp;Attached you will find&nbsp; Invoice No. 11</p><p>&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp;Kindest regards</p><p>&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp;Administrator<br />&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp;My Company<br />&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp;My Address<br />&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp;My City<br />&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp;00000<br />&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp;my_email@address.com<br />&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp;000.000.0000<br />&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp;--a5bc2dd9d48cdbf1c107d47cadbcd068<br />&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp;Content-Type: application/pdf; name=Invoice11.pdf<br />&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp;Content-Transfer-Encoding: base64<br />&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp;Content-Disposition: attachment; filename=Invoice11.pdf<br />&nbsp; &nbsp; &nbsp; &nbsp; <br />&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp;Removed uuencoded data.</p><p>&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp;--a5bc2dd9d48cdbf1c107d47cadbcd068--</p><p>&nbsp; &nbsp; subject = Invoice No. 11</p><p>&nbsp; &nbsp; body = Content-Type: text/plain; charset=ISO-8859-1<br />&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; Content-Transfer-Encoding: 8bit</p><p>&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; Dear Test Customer</p><p>&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; Attached you will find&nbsp; Invoice No. 11</p><p>&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; Kindest regards</p><p>&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; Me :)<br />&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; My Company<br />&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; My Address<br />&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; My City<br />&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; 00000<br />&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; my_email@address.com<br />&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; 000.000.0000</p><p>&nbsp; &nbsp;ret = false</p></blockquote></div><p>Thanks,</p><p>MPH</p>]]></content>
			<author>
				<name><![CDATA[mph]]></name>
				<uri>https://frontaccounting.com/punbb/profile.php?id=2201</uri>
			</author>
			<updated>2010-10-23T18:21:14Z</updated>
			<id>https://frontaccounting.com/punbb/viewtopic.php?pid=7204#p7204</id>
		</entry>
		<entry>
			<title type="html"><![CDATA[Re: Can't email invoices]]></title>
			<link rel="alternate" href="https://frontaccounting.com/punbb/viewtopic.php?pid=7202#p7202" />
			<content type="html"><![CDATA[<p>Mails in FA are sent using emial class in reporting/includes/class.mail.inc. Make some tests on parameters passed to mail() in email::send() and finding&nbsp; source of the problem should be easy. Probably this is due to invalid form of $mail parameter.<br />Janusz</p>]]></content>
			<author>
				<name><![CDATA[itronics]]></name>
				<uri>https://frontaccounting.com/punbb/profile.php?id=89</uri>
			</author>
			<updated>2010-10-23T09:31:26Z</updated>
			<id>https://frontaccounting.com/punbb/viewtopic.php?pid=7202#p7202</id>
		</entry>
		<entry>
			<title type="html"><![CDATA[Can't email invoices]]></title>
			<link rel="alternate" href="https://frontaccounting.com/punbb/viewtopic.php?pid=7201#p7201" />
			<content type="html"><![CDATA[<p>Hi,</p><p>&nbsp; I loaded&nbsp; FA 2.2.11 a few nights ago.&nbsp; I&#039;m still poking my way around. </p><p>One problem that I can&#039;t seem to find my way around is: I can&#039;t email invoices.&nbsp; I keep getting </p><div class="quotebox"><blockquote><p>Sending document by email failed</p></blockquote></div><p>I did some digging around here and see that AF uses the mail function in PHP.&nbsp; I can&#039;t find any entries let along errors in either the mail log or the PHP log.&nbsp; I&#039;m using postfix and can send email from the command line.&nbsp; As a test I got a short PHP mailing script </p><div class="codebox"><pre><code>&lt;?php
# The message
$message = &quot;Line 1\nLine 2\nLine 3&quot;;
# Send
mail(&#039;my.email@mydomain.com&#039;, &#039;My Subject&#039;, $message);
?&gt;</code></pre></div><p>Which works fine.</p><p>What can I check next?</p><p>Thank You,</p><p>MPH</p>]]></content>
			<author>
				<name><![CDATA[mph]]></name>
				<uri>https://frontaccounting.com/punbb/profile.php?id=2201</uri>
			</author>
			<updated>2010-10-23T02:35:05Z</updated>
			<id>https://frontaccounting.com/punbb/viewtopic.php?pid=7201#p7201</id>
		</entry>
</feed>
