<?xml version="1.0" encoding="utf-8"?>
<rss version="2.0" xmlns:atom="http://www.w3.org/2005/Atom">
	<channel>
		<title><![CDATA[PunBB Forums — 2 questions]]></title>
		<link>https://punbb.informer.com/forums/topic/4094/2-questions/</link>
		<atom:link href="https://punbb.informer.com/forums/feed/rss/topic/4094/" rel="self" type="application/rss+xml" />
		<description><![CDATA[The most recent posts in 2 questions.]]></description>
		<lastBuildDate>Mon, 28 Jun 2004 14:00:25 +0000</lastBuildDate>
		<generator>PunBB</generator>
		<item>
			<title><![CDATA[Re: 2 questions]]></title>
			<link>https://punbb.informer.com/forums/post/16526/#p16526</link>
			<description><![CDATA[<div class="quotebox"><cite>pgregg wrote:</cite><blockquote><div class="quotebox"><cite>RNilsson wrote:</cite><blockquote><p>Even using a empty 5th arg will give error on win32.</p></blockquote></div><p>I&#039;m sorry, but that information is incorrect.&nbsp; PHP will not error, neither will it give a warning if you pass a 5th argument to mail() on Windows.&nbsp; It will simply ignore it.</p></blockquote></div><p>I guess it was specific when using IIS in that case as i hade to remove the -f arg from my code to make it work.</p>]]></description>
			<author><![CDATA[null@example.com (RNilsson)]]></author>
			<pubDate>Mon, 28 Jun 2004 14:00:25 +0000</pubDate>
			<guid>https://punbb.informer.com/forums/post/16526/#p16526</guid>
		</item>
		<item>
			<title><![CDATA[Re: 2 questions]]></title>
			<link>https://punbb.informer.com/forums/post/16395/#p16395</link>
			<description><![CDATA[<p>ok. It&#039;s too hard for me.<br />I&#039;ll try to obtain an answer with a new post.</p><p>Thank you for all.</p><p>Respectfully,</p><p>Ludo</p>]]></description>
			<author><![CDATA[null@example.com (Ludo)]]></author>
			<pubDate>Sat, 26 Jun 2004 18:59:13 +0000</pubDate>
			<guid>https://punbb.informer.com/forums/post/16395/#p16395</guid>
		</item>
		<item>
			<title><![CDATA[Re: 2 questions]]></title>
			<link>https://punbb.informer.com/forums/post/16375/#p16375</link>
			<description><![CDATA[<p>Guess they have removed sendmail then.&nbsp; Start reading up on cURL - you will be able to use curl to make a e.g. curlmail() function which creates a POST to your formmail.pl script to send the email.</p><p>It&#039;s a non-trivial task - not impossible, but beyond the scope and time I have available here.&nbsp; Good luck.</p>]]></description>
			<author><![CDATA[null@example.com (pgregg)]]></author>
			<pubDate>Sat, 26 Jun 2004 12:07:55 +0000</pubDate>
			<guid>https://punbb.informer.com/forums/post/16375/#p16375</guid>
		</item>
		<item>
			<title><![CDATA[Re: 2 questions]]></title>
			<link>https://punbb.informer.com/forums/post/16373/#p16373</link>
			<description><![CDATA[<p>Hi,</p><p>So I tell you what I made and what I obtained.<br />As you asked me to, I have created a file named test.php in which I put this:</p><p>&lt;?php<br />$email = &lt;&lt;&lt;EOMAIL<br />From: ludo &lt;ludo at free d0t fr&gt;<br />To: ludo &lt;ldevergne at free d0t fr&gt;<br />Subject: Test</p><p>testing</p><p>EOMAIL;<br />$fh = popen(&#039;/usr/sbin/sendmail -t -i&#039;, &#039;w&#039;);<br />fwrite($fh, $email);<br />fclose($fh);</p><p>?&gt;</p><p>I&#039;ve uploaded this file to the root of my website.</p><p>I&#039;ve executed it entering ldevergne.free.fr/test.php</p><p>This is what I obtained:</p><p>Warning: fwrite(): supplied argument is not a valid stream resource in /var/www/free.fr/1/7/ldevergne/forum/test.php on line 11</p><p>Warning: fclose(): supplied argument is not a valid stream resource in /var/www/free.fr/1/7/ldevergne/forum/test.php on line 12</p><p>Waiting for your reply,</p><p>Ludo</p>]]></description>
			<author><![CDATA[null@example.com (Ludo)]]></author>
			<pubDate>Sat, 26 Jun 2004 09:28:07 +0000</pubDate>
			<guid>https://punbb.informer.com/forums/post/16373/#p16373</guid>
		</item>
		<item>
			<title><![CDATA[Re: 2 questions]]></title>
			<link>https://punbb.informer.com/forums/post/16343/#p16343</link>
			<description><![CDATA[<div class="quotebox"><cite>Ludo wrote:</cite><blockquote><p>Sorry to have problem to understand but In which file must I ad or modify this code?</p><p>PS: please could you edit your last post and modify the email adress you write in order to avoid spam. For example, you can write ludo at free dot fr and ldevergne at free dot fr. I thank you for this.</p></blockquote></div><p>Just put it in it&#039;s own php file and run it - it is a test to see if we can make PHP send an email.</p><p>Email changed.</p>]]></description>
			<author><![CDATA[null@example.com (pgregg)]]></author>
			<pubDate>Fri, 25 Jun 2004 21:42:23 +0000</pubDate>
			<guid>https://punbb.informer.com/forums/post/16343/#p16343</guid>
		</item>
		<item>
			<title><![CDATA[Re: 2 questions]]></title>
			<link>https://punbb.informer.com/forums/post/16318/#p16318</link>
			<description><![CDATA[<div class="quotebox"><cite>RNilsson wrote:</cite><blockquote><p>Even using a empty 5th arg will give error on win32.</p></blockquote></div><p>I&#039;m sorry, but that information is incorrect.&nbsp; PHP will not error, neither will it give a warning if you pass a 5th argument to mail() on Windows.&nbsp; It will simply ignore it.</p>]]></description>
			<author><![CDATA[null@example.com (pgregg)]]></author>
			<pubDate>Fri, 25 Jun 2004 11:36:11 +0000</pubDate>
			<guid>https://punbb.informer.com/forums/post/16318/#p16318</guid>
		</item>
		<item>
			<title><![CDATA[Re: 2 questions]]></title>
			<link>https://punbb.informer.com/forums/post/16316/#p16316</link>
			<description><![CDATA[<div class="quotebox"><cite>pgregg wrote:</cite><blockquote><div class="quotebox"><cite>RNilsson wrote:</cite><blockquote><p>I&#039;ve had some problems dealing with mail() and the 5:th arg in a win32 dev env.<br />Just FYI.</p></blockquote></div><p>Well, I hate to be the one to point this out, but the 5th arg is (as the manual notes) is passed as additional parameters to the sendmail_path program, which by definition is unix only; therefore the 5th arg has no relevance to Win32.</p></blockquote></div><br /><p>Yeah, that is why i brought it up so pun won&#039;t break if the changed is implemented<br /></p><div class="codebox"><pre><code>[addition] Rickard: you might like to change the email.php from:
function pun_mail($to, $subject, $message, $from = &#039;&#039;)
to
function pun_mail($to, $subject, $message, $from = &#039;&#039;, $extra=&#039;&#039;)

and the call from:
mail($to, $subject, $message, $headers);
to
mail($to, $subject, $message, $headers, $extra);

to prepare the code to be able to pass &quot;-f [adminemail]&quot; in the extra arg for some webservers.</code></pre></div><p>Even using a empty 5th arg will give error on win32.</p>]]></description>
			<author><![CDATA[null@example.com (RNilsson)]]></author>
			<pubDate>Fri, 25 Jun 2004 11:28:27 +0000</pubDate>
			<guid>https://punbb.informer.com/forums/post/16316/#p16316</guid>
		</item>
		<item>
			<title><![CDATA[Re: 2 questions]]></title>
			<link>https://punbb.informer.com/forums/post/16312/#p16312</link>
			<description><![CDATA[<div class="quotebox"><cite>pgregg wrote:</cite><blockquote><p>Hmm, ok - this might work:</p><p>$email = &lt;&lt;&lt;EOMAIL<br />From: ludo &lt;ludo at free dot fr&gt;<br />To: ludo &lt;ldevergneat free dot fr&gt;<br />Subject: Test</p><p>testing</p><p>EOMAIL;<br />$fh = popen(&#039;/usr/sbin/sendmail -t -i&#039;, &#039;w&#039;);<br />fwrite($fh, $email);<br />fclose($fh);</p><p>If this works, then there is your method for sending emails...</p></blockquote></div><p>Sorry to have problem to understand but In which file must I ad or modify this code?</p><p>PS: please could you edit your last post and modify the email adress you write in order to avoid spam. For example, you can write ludo at free dot fr and ldevergne at free dot fr. I thank you for this.</p>]]></description>
			<author><![CDATA[null@example.com (Ludo)]]></author>
			<pubDate>Fri, 25 Jun 2004 11:07:44 +0000</pubDate>
			<guid>https://punbb.informer.com/forums/post/16312/#p16312</guid>
		</item>
		<item>
			<title><![CDATA[Re: 2 questions]]></title>
			<link>https://punbb.informer.com/forums/post/16294/#p16294</link>
			<description><![CDATA[<p>Hmm, ok - this might work:</p><p>$email = &lt;&lt;&lt;EOMAIL<br />From: ludo &lt;ludo at free d0t fr&gt;<br />To: ludo &lt;ludo at free d0t fr&gt;<br />Subject: Test</p><p>testing</p><p>EOMAIL;<br />$fh = popen(&#039;/usr/sbin/sendmail -t -i&#039;, &#039;w&#039;);<br />fwrite($fh, $email);<br />fclose($fh);</p><p>If this works, then there is your method for sending emails...</p>]]></description>
			<author><![CDATA[null@example.com (pgregg)]]></author>
			<pubDate>Fri, 25 Jun 2004 10:03:58 +0000</pubDate>
			<guid>https://punbb.informer.com/forums/post/16294/#p16294</guid>
		</item>
		<item>
			<title><![CDATA[Re: 2 questions]]></title>
			<link>https://punbb.informer.com/forums/post/16286/#p16286</link>
			<description><![CDATA[<p>Hi,</p><p>It&#039;s a choice made by my webhoster. It&#039;s ot an error. They assume it.<br />They made this choice because of people who abused with sending lots of mail whith php. There were problems because it was too much. Since this moment, only <br />&lt;FORM METHOD=&quot;POST&quot; ACTION=&quot;http://perso0.free.fr/cgi-bin/form2mail.pl&quot;&gt;<br />works.<br />It&#039;s a free webhoster so I can&#039;t complain</p><p>Apparently this is the php info for my webhoster :<br /><a href="http://free.box.free.fr/info.php3">http://free.box.free.fr/info.php3</a></p><p>Ludo</p>]]></description>
			<author><![CDATA[null@example.com (Ludo)]]></author>
			<pubDate>Fri, 25 Jun 2004 09:04:44 +0000</pubDate>
			<guid>https://punbb.informer.com/forums/post/16286/#p16286</guid>
		</item>
		<item>
			<title><![CDATA[Re: 2 questions]]></title>
			<link>https://punbb.informer.com/forums/post/16268/#p16268</link>
			<description><![CDATA[<div class="quotebox"><cite>Ludo wrote:</cite><blockquote><p>sorry but I don&#039;t know what shell access is.... so I think I don&#039;t have any access unless I would certainly know it.</p><p>Second, I had a look at curl but it&#039;s very hard for me. I just wanted to have an easy solution for my problem. Am I the only one to have this kind of problem?</p></blockquote></div><p>I guess you dont have shell access then.</p><p>look in phpinfo() and let us know what sendmail_path is set to.&nbsp; Also ask your host why mail() is broken or disabled.&nbsp; It is very rare for ISPs to disable mail() since that&#039;s perhaps the single most useful feature in PHP (for companies hosting their sites).</p><div class="quotebox"><cite>RNilsson wrote:</cite><blockquote><p>I&#039;ve had some problems dealing with mail() and the 5:th arg in a win32 dev env.<br />Just FYI.</p></blockquote></div><p>Well, I hate to be the one to point this out, but the 5th arg is (as the manual notes) is passed as additional parameters to the sendmail_path program, which by definition is unix only; therefore the 5th arg has no relevance to Win32.</p>]]></description>
			<author><![CDATA[null@example.com (pgregg)]]></author>
			<pubDate>Thu, 24 Jun 2004 21:56:11 +0000</pubDate>
			<guid>https://punbb.informer.com/forums/post/16268/#p16268</guid>
		</item>
		<item>
			<title><![CDATA[Re: 2 questions]]></title>
			<link>https://punbb.informer.com/forums/post/16249/#p16249</link>
			<description><![CDATA[<p>sorry but I don&#039;t know what shell access is.... so I think I don&#039;t have any access unless I would certainly know it.</p><p>Second, I had a look at curl but it&#039;s very hard for me. I just wanted to have an easy solution for my problem. Am I the only one to have this kind of problem?</p><p>Thanks,</p><p>Ludo</p>]]></description>
			<author><![CDATA[null@example.com (Ludo)]]></author>
			<pubDate>Thu, 24 Jun 2004 19:48:16 +0000</pubDate>
			<guid>https://punbb.informer.com/forums/post/16249/#p16249</guid>
		</item>
		<item>
			<title><![CDATA[Re: 2 questions]]></title>
			<link>https://punbb.informer.com/forums/post/16245/#p16245</link>
			<description><![CDATA[<div class="quotebox"><cite>Ludo wrote:</cite><blockquote><p>I&#039;ve forgotten to tell you that the webserver on which is intalled punbb does not allow mail with php but only with cgi. For example, my provider give this script to send mail :<br />&lt;FORM METHOD=&quot;POST&quot; ACTION=&quot;http://perso0.free.fr/cgi-bin/form2mail.pl&quot;&gt;</p><p>So I think the problem is here but I don&#039;t know how to resolve it.</p></blockquote></div><p>Oh dear!&nbsp; Well this certainly puts the cat among the pigeons.... <img src="https://punbb.informer.com/forums/img/smilies/sad.png" width="15" height="15" alt="sad" /></p><div class="quotebox"><cite>Ludo wrote:</cite><blockquote><p>Return-Path: &lt;ldevergne ats free dot fr&gt;<br />...</p></blockquote></div><p>This probably isn&#039;t going to help, but it shows that the local machine runs postfix and that the form2mail.pl injects directly to this.&nbsp; The machine is not running (or listening) on the SMTP port, so you can&#039;t use the SMTP method.</p><br /><p>First thing to try: Do you have shell access?&nbsp; If so, look up some documentation on postfix and find out what program controls the injection of email from the shell.&nbsp; Even if you don&#039;t have shell access, find this out anyway.&nbsp; Then you&#039;re going to have to do some hacking of email.php.&nbsp; If you aren&#039;t good with PHP, then I&#039;d give up now, because this involves a popen() to open a handle to the injection program and then fwrite() to manually enter the email including headers.</p><p>The second option, is another hack job <img src="https://punbb.informer.com/forums/img/smilies/sad.png" width="15" height="15" alt="sad" />&nbsp; It involves reading up on cURL <a href="http://www.php.net/curl">www.php.net/curl</a> and having PHP generate a POST call to your formmail.pl url to send the email.</p><p>Good luck.</p>]]></description>
			<author><![CDATA[null@example.com (pgregg)]]></author>
			<pubDate>Thu, 24 Jun 2004 19:38:29 +0000</pubDate>
			<guid>https://punbb.informer.com/forums/post/16245/#p16245</guid>
		</item>
		<item>
			<title><![CDATA[Re: 2 questions]]></title>
			<link>https://punbb.informer.com/forums/post/16233/#p16233</link>
			<description><![CDATA[<div class="quotebox"><cite>RNilsson wrote:</cite><blockquote><p>I&#039;ve had some problems dealing with mail() and the 5:th arg in a win32 dev env.<br />Just FYI.</p></blockquote></div><p>I don&#039;t understand what you mean. I prefer waiting an answer from Rickard or pgregg</p><p>Ludo</p>]]></description>
			<author><![CDATA[null@example.com (Ludo)]]></author>
			<pubDate>Thu, 24 Jun 2004 16:07:44 +0000</pubDate>
			<guid>https://punbb.informer.com/forums/post/16233/#p16233</guid>
		</item>
		<item>
			<title><![CDATA[Re: 2 questions]]></title>
			<link>https://punbb.informer.com/forums/post/16222/#p16222</link>
			<description><![CDATA[<p>I&#039;ve had some problems dealing with mail() and the 5:th arg in a win32 dev env.<br />Just FYI.</p>]]></description>
			<author><![CDATA[null@example.com (RNilsson)]]></author>
			<pubDate>Thu, 24 Jun 2004 13:08:47 +0000</pubDate>
			<guid>https://punbb.informer.com/forums/post/16222/#p16222</guid>
		</item>
	</channel>
</rss>
