<?xml version="1.0" encoding="utf-8" ?><rss version="2.0" xml:base="https://www.webmaster-forums.net/crss/node/1035112" xmlns:dc="http://purl.org/dc/elements/1.1/">
  <channel>
    <title></title>
    <link>https://www.webmaster-forums.net/crss/node/1035112</link>
    <description></description>
    <language>en</language>
          <item>
    <title></title>
    <link>https://www.webmaster-forums.net/serverside-scripting/php-email-script-help#comment-1203835</link>
    <description> &lt;p&gt;There is a thread around here somewhere on how to configure the setup for emails on pc&lt;br /&gt;
I tried a quick search but didn&#039;t come up with it, try searching (in this forum) for things like: php email localhost server - a combination of those&lt;/p&gt;
 </description>
     <pubDate>Mon, 10 Jul 2006 21:24:53 +0000</pubDate>
 <dc:creator>Busy</dc:creator>
 <guid isPermaLink="false">comment 1203835 at https://www.webmaster-forums.net</guid>
  </item>
  <item>
    <title></title>
    <link>https://www.webmaster-forums.net/serverside-scripting/php-email-script-help#comment-1203833</link>
    <description> &lt;p&gt;Well, i figured out a bit more.&lt;/p&gt;
&lt;p&gt;The server is Windows and i plugged in the separate SMTP server into the php.ini as follows:&lt;/p&gt;
&lt;p&gt;&lt;div class=&quot;codeblock&quot;&gt;&lt;code&gt;[mail function]&lt;br /&gt;; For Win32 only.&lt;br /&gt;SMTP = 147.***.233.10&lt;br /&gt;smtp_port = 25&lt;br /&gt;&lt;br /&gt;; For Win32 only.&lt;br /&gt;;sendmail_from = me@example.com&lt;br /&gt;&lt;br /&gt;; For Unix only.&amp;nbsp; You may supply arguments as well (default: &amp;quot;sendmail -t -i&amp;quot;).&lt;br /&gt;;sendmail_path =&lt;br /&gt;&lt;br /&gt;; Force the addition of the specified parameters to be passed as extra parameters&lt;br /&gt;; to the sendmail binary. These parameters will always replace the value of&lt;br /&gt;; the 5th parameter to mail(), even in safe mode.&lt;br /&gt;;mail.force_extra_parameters =&lt;/code&gt;&lt;/div&gt;&#039;&lt;/p&gt;
&lt;p&gt;I restarted the server after making the changes.. but the e-mails still don&#039;t go.&lt;/p&gt;
&lt;p&gt;Here&#039;s an example of the test scripts i&#039;m running:&lt;/p&gt;
&lt;p&gt;&lt;div class=&quot;codeblock&quot;&gt;&lt;code&gt;&lt;span style=&quot;color: #000000&quot;&gt;&lt;span style=&quot;color: #0000BB&quot;&gt;&amp;lt;?php&lt;br /&gt;&lt;/span&gt;&lt;span style=&quot;color: #007700&quot;&gt;if (isset(&lt;/span&gt;&lt;span style=&quot;color: #0000BB&quot;&gt;$_POST&lt;/span&gt;&lt;span style=&quot;color: #007700&quot;&gt;[&lt;/span&gt;&lt;span style=&quot;color: #DD0000&quot;&gt;&#039;sendit&#039;&lt;/span&gt;&lt;span style=&quot;color: #007700&quot;&gt;])) {&lt;br /&gt;&lt;br /&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp; &lt;/span&gt;&lt;span style=&quot;color: #0000BB&quot;&gt;$to &lt;/span&gt;&lt;span style=&quot;color: #007700&quot;&gt;= \&lt;/span&gt;&lt;span style=&quot;color: #DD0000&quot;&gt;&quot;msaz87@yahoo.com\&quot;; //Change to your email&lt;br /&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp; &lt;/span&gt;&lt;span style=&quot;color: #0000BB&quot;&gt;$subject&lt;/span&gt;&lt;span style=&quot;color: #DD0000&quot;&gt; = \&quot;Test Email\&quot;;&lt;br /&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp; &lt;/span&gt;&lt;span style=&quot;color: #0000BB&quot;&gt;$message&lt;/span&gt;&lt;span style=&quot;color: #DD0000&quot;&gt; = \&quot;Hello, this is a test email.\&quot;;&lt;br /&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp; &lt;/span&gt;&lt;span style=&quot;color: #0000BB&quot;&gt;$headers&lt;/span&gt;&lt;span style=&quot;color: #DD0000&quot;&gt; = \&quot;From: someone@somewhere.com\&quot;;&lt;br /&gt;&lt;br /&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp; echo \&quot;Mail sent, check your inbox\&quot;;&lt;br /&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp; exit;&lt;br /&gt;&lt;br /&gt;} else {&lt;br /&gt;&lt;br /&gt;&lt;br /&gt;&lt;br /&gt;&amp;lt;form&amp;nbsp; method=\&quot;post\&quot; action=\&quot; &lt;/span&gt;&lt;span style=&quot;color: #0000BB&quot;&gt;$_SERVER&lt;/span&gt;&lt;span style=&quot;color: #007700&quot;&gt;[&lt;/span&gt;&lt;span style=&quot;color: #DD0000&quot;&gt;&#039;PHP_SELF&#039;]; \&quot;&amp;gt;&lt;br /&gt;&lt;br /&gt;&amp;lt;input type=\&quot;submit\&quot; name=\&quot;sendit\&quot; value=\&quot;Send It\&quot; /&amp;gt;&lt;br /&gt;&lt;br /&gt;&amp;lt;/form&amp;gt;&lt;br /&gt;&lt;br /&gt;&lt;br /&gt;&lt;br /&gt;}&lt;br /&gt;?&amp;gt;&lt;/span&gt;&lt;/span&gt;&lt;/code&gt;&lt;/div&gt;&lt;/p&gt;
&lt;p&gt;Does this give anyone a better idea? Thanks.&lt;/p&gt;
 </description>
     <pubDate>Mon, 10 Jul 2006 21:02:27 +0000</pubDate>
 <dc:creator>msaz87</dc:creator>
 <guid isPermaLink="false">comment 1203833 at https://www.webmaster-forums.net</guid>
  </item>
  <item>
    <title></title>
    <link>https://www.webmaster-forums.net/serverside-scripting/php-email-script-help#comment-1203564</link>
    <description> &lt;p&gt;It&#039;s my own server... unfortunately.&lt;/p&gt;
&lt;p&gt;Thanks for your help. I&#039;ll look around while i wait for more help.&lt;/p&gt;
&lt;p&gt;&lt;strong&gt;Edit:&lt;/strong&gt;&lt;br /&gt;
I checked my php.ini to see if i had set up the SMTP incorrectly. Here&#039;s what it says:&lt;br /&gt;
&lt;div class=&quot;codeblock&quot;&gt;&lt;code&gt;[mail function]&lt;br /&gt;; For Win32 only.&lt;br /&gt;SMTP = localhost&lt;br /&gt;smtp_port = 25&lt;br /&gt;&lt;br /&gt;; For Win32 only.&lt;br /&gt;;sendmail_from = me@example.com&lt;br /&gt;&lt;br /&gt;; For Unix only.&amp;nbsp; You may supply arguments as well (default: &amp;quot;sendmail -t -i&amp;quot;).&lt;br /&gt;;sendmail_path =&lt;br /&gt;&lt;br /&gt;; Force the addition of the specified parameters to be passed as extra parameters&lt;br /&gt;; to the sendmail binary. These parameters will always replace the value of&lt;br /&gt;; the 5th parameter to mail(), even in safe mode.&lt;br /&gt;;mail.force_extra_parameters =&lt;/code&gt;&lt;/div&gt;&#039;&lt;/p&gt;
&lt;p&gt;Problem is, i&#039;m unfamiliar with this... so if anyone can tell that this is a problem, i&#039;d love to know. Thanks&lt;/p&gt;
 </description>
     <pubDate>Thu, 06 Jul 2006 21:25:22 +0000</pubDate>
 <dc:creator>msaz87</dc:creator>
 <guid isPermaLink="false">comment 1203564 at https://www.webmaster-forums.net</guid>
  </item>
  <item>
    <title></title>
    <link>https://www.webmaster-forums.net/serverside-scripting/php-email-script-help#comment-1203562</link>
    <description> &lt;p&gt;Ok, just ran a copy of it on my server to make sure that I didn&#039;t do a typo &lt;img src=&quot;https://www.webmaster-forums.net/misc/smileys/wink.png&quot; title=&quot;Wink&quot; alt=&quot;Wink&quot; class=&quot;smiley-content&quot; /&gt; (it works)&lt;/p&gt;
&lt;p&gt;Now you have it down that it is not actually a problem with your code (although there are issues with it), so next check the server configuration. Is this your own server or a hosting company? &lt;/p&gt;
&lt;p&gt;If it is a hosting company, contact them and let them know that you cannot send e-mail via php. I&#039;d give them the location of the sample code you ran as well. This may help prevent an &quot;easy reply&quot;. Always give them details of steps you have already taken to resolve the problem.&lt;/p&gt;
&lt;p&gt;If it is your own server, well, we&#039;ll have to wait for someone else to post suggestions of things to check. All the servers I have run had PHP/mySQL/mail/apache already setup from the installer. (one redhat, 3 Suse, 2 FreeBSD).&lt;/p&gt;
&lt;p&gt;-Greg&lt;/p&gt;
 </description>
     <pubDate>Thu, 06 Jul 2006 21:18:44 +0000</pubDate>
 <dc:creator>Greg K</dc:creator>
 <guid isPermaLink="false">comment 1203562 at https://www.webmaster-forums.net</guid>
  </item>
  <item>
    <title></title>
    <link>https://www.webmaster-forums.net/serverside-scripting/php-email-script-help#comment-1203559</link>
    <description> &lt;blockquote class=&quot;bb-quote-body&quot;&gt;&lt;p&gt;Quote: So start here, create a separate program to test that the basics of even using the mail() function.&lt;/p&gt;&lt;/blockquote&gt;
&lt;p&gt;I tried the basic mail function script you gave me, Greg... and got a failure.&lt;/p&gt;
&lt;p&gt;What does that mean?&lt;/p&gt;
 </description>
     <pubDate>Thu, 06 Jul 2006 20:55:37 +0000</pubDate>
 <dc:creator>msaz87</dc:creator>
 <guid isPermaLink="false">comment 1203559 at https://www.webmaster-forums.net</guid>
  </item>
  <item>
    <title></title>
    <link>https://www.webmaster-forums.net/serverside-scripting/php-email-script-help#comment-1203528</link>
    <description> &lt;p&gt;&lt;div class=&quot;codeblock&quot;&gt;&lt;code&gt;if (mail(&amp;quot;*****&amp;quot;,&amp;quot;Ask the Managers Question&amp;quot;,&amp;quot;$message&amp;quot;,&amp;quot;From: Form Sender&amp;quot;)) { &lt;/code&gt;&lt;/div&gt;&#039;&lt;br /&gt;
with &#039;******&#039; I am going to guess that&#039;s supposed to be your email address? And you should have more headers than just &#039;From: &#039;, and &#039;Form Sender&#039; should be an email address, even &#039;From: &quot;Form Sender&quot; &#039;&lt;/p&gt;
&lt;p&gt;&lt;div class=&quot;codeblock&quot;&gt;&lt;code&gt;if (mail(&amp;quot;myemail@dodgeit.com&amp;quot;,&amp;quot;Ask the Managers Question&amp;quot;,&amp;quot;$message&amp;quot;,&amp;#039;From: &amp;quot;Form Sender&amp;quot; &amp;lt;noone@dodgeit.com&amp;gt;&amp;#039;)) { &lt;/code&gt;&lt;/div&gt;&#039;&lt;/p&gt;
 </description>
     <pubDate>Thu, 06 Jul 2006 12:42:12 +0000</pubDate>
 <dc:creator>CptAwesome</dc:creator>
 <guid isPermaLink="false">comment 1203528 at https://www.webmaster-forums.net</guid>
  </item>
  <item>
    <title></title>
    <link>https://www.webmaster-forums.net/serverside-scripting/php-email-script-help#comment-1203515</link>
    <description> &lt;p&gt;Take it from where you have an indication there is an error, and work your way back up the code to se what triggered it. Isolate each thing being done and test that one at a time. Being that this happened after moving to a new server, look for things that could cause the problems (some of these do not apply here, but just giving the list for general purposes):&lt;/p&gt;
&lt;p&gt;- Differences between versions/configurations of PHP&lt;br /&gt;
- Differences in OS&#039;s or their versions/configurations&lt;br /&gt;
- Differences in versions/configurations of mySQL&lt;br /&gt;
- Differences in versions/configurations of Apache &lt;/p&gt;
&lt;p&gt;The first thing that my eye spots above the error message is the call to the &lt;strong&gt;mail()&lt;/strong&gt; function.&lt;/p&gt;
&lt;p&gt;So start here, create a separate program to test that the basics of even using the mail() function.&lt;/p&gt;
&lt;p&gt;&lt;div class=&quot;codeblock&quot;&gt;&lt;code&gt;&lt;span style=&quot;color: #000000&quot;&gt;&lt;span style=&quot;color: #0000BB&quot;&gt;&amp;lt;?php&lt;br /&gt;$to &lt;/span&gt;&lt;span style=&quot;color: #007700&quot;&gt;= &lt;/span&gt;&lt;span style=&quot;color: #DD0000&quot;&gt;&#039;nobody@example.com&#039;&lt;/span&gt;&lt;span style=&quot;color: #007700&quot;&gt;;&amp;nbsp;&amp;nbsp;&amp;nbsp; &lt;/span&gt;&lt;span style=&quot;color: #FF8000&quot;&gt;// REPLACE THIS WITH YOUR E-MAIL ADDRESS&lt;br /&gt;&lt;/span&gt;&lt;span style=&quot;color: #0000BB&quot;&gt;$subject &lt;/span&gt;&lt;span style=&quot;color: #007700&quot;&gt;= &lt;/span&gt;&lt;span style=&quot;color: #DD0000&quot;&gt;&#039;PHP mail Test&#039;&lt;/span&gt;&lt;span style=&quot;color: #007700&quot;&gt;;&lt;br /&gt;&lt;/span&gt;&lt;span style=&quot;color: #0000BB&quot;&gt;$message &lt;/span&gt;&lt;span style=&quot;color: #007700&quot;&gt;= &lt;/span&gt;&lt;span style=&quot;color: #DD0000&quot;&gt;&#039;This is a test of PHP mail&#039;&lt;/span&gt;&lt;span style=&quot;color: #007700&quot;&gt;;&lt;br /&gt;&lt;/span&gt;&lt;span style=&quot;color: #0000BB&quot;&gt;$headers &lt;/span&gt;&lt;span style=&quot;color: #007700&quot;&gt;= &lt;/span&gt;&lt;span style=&quot;color: #DD0000&quot;&gt;&#039;From: webmaster@example.com&#039; &lt;/span&gt;&lt;span style=&quot;color: #007700&quot;&gt;. \&lt;/span&gt;&lt;span style=&quot;color: #DD0000&quot;&gt;&quot;\r\n\&quot; .&lt;br /&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp; &#039;X-Mailer: PHP/&#039; . phpversion();&lt;br /&gt;&lt;br /&gt;if (mail(&lt;/span&gt;&lt;span style=&quot;color: #0000BB&quot;&gt;$to&lt;/span&gt;&lt;span style=&quot;color: #DD0000&quot;&gt;, &lt;/span&gt;&lt;span style=&quot;color: #0000BB&quot;&gt;$subject&lt;/span&gt;&lt;span style=&quot;color: #DD0000&quot;&gt;, &lt;/span&gt;&lt;span style=&quot;color: #0000BB&quot;&gt;$message&lt;/span&gt;&lt;span style=&quot;color: #DD0000&quot;&gt;, &lt;/span&gt;&lt;span style=&quot;color: #0000BB&quot;&gt;$headers&lt;/span&gt;&lt;span style=&quot;color: #DD0000&quot;&gt;))&lt;br /&gt;&amp;nbsp; echo \&quot;MAIL SENT\n\&quot;;&lt;br /&gt;else&lt;br /&gt;&amp;nbsp; echo \&quot;MAIL FAILED\n\&quot;;&lt;br /&gt;?&amp;gt;&lt;/span&gt;&lt;/span&gt;&lt;/code&gt;&lt;/div&gt;&lt;br /&gt;
This will let you know that the basic concept of sending mail from PHP works on the new server.&lt;/p&gt;
&lt;p&gt;If this works, then I would look into your FROM field you are giving (&lt;strong&gt;&quot;From: Form Sender&quot;&lt;/strong&gt;). You do not give an actual e-mail address there. Perhaps the new server demands that an actual e-mail address be in this field.&lt;/p&gt;
&lt;p&gt;Also probably just something left over from where you got this script, you have &lt;strong&gt;$to = &quot;$email&quot;;&lt;/strong&gt; which the variable $to isn&#039;t used elsewhere, and the $email isn&#039;t defined beforehand. Same with the line that starts &lt;strong&gt;$subject = &quot;...&lt;/strong&gt;&lt;/p&gt;
&lt;p&gt;Along with general bad coding, you have the  tag twice. There are some other areas where the coding could use improvement. If the form was submitted, the browser will get an opening  tag and never get a closing one. I am assuming you are new and just learning coding, so keep an eye on things like that, and validate your pages (both the form, and the results versions).&lt;/p&gt;
&lt;p&gt;Good luck!&lt;/p&gt;
&lt;p&gt;-Greg&lt;/p&gt;
 </description>
     <pubDate>Thu, 06 Jul 2006 05:47:42 +0000</pubDate>
 <dc:creator>Greg K</dc:creator>
 <guid isPermaLink="false">comment 1203515 at https://www.webmaster-forums.net</guid>
  </item>
  </channel>
</rss>
