<?xml version="1.0"?>
<feed xmlns="http://www.w3.org/2005/Atom" xml:lang="en">
		<id>https://wiki.hostek.com/index.php?action=history&amp;feed=atom&amp;title=PHP_email_not_sending</id>
		<title>PHP email not sending - Revision history</title>
		<link rel="self" type="application/atom+xml" href="https://wiki.hostek.com/index.php?action=history&amp;feed=atom&amp;title=PHP_email_not_sending"/>
		<link rel="alternate" type="text/html" href="https://wiki.hostek.com/index.php?title=PHP_email_not_sending&amp;action=history"/>
		<updated>2026-04-15T03:18:22Z</updated>
		<subtitle>Revision history for this page on the wiki</subtitle>
		<generator>MediaWiki 1.24.2</generator>

	<entry>
		<id>https://wiki.hostek.com/index.php?title=PHP_email_not_sending&amp;diff=2164&amp;oldid=prev</id>
		<title>Maxm at 16:41, 13 June 2014</title>
		<link rel="alternate" type="text/html" href="https://wiki.hostek.com/index.php?title=PHP_email_not_sending&amp;diff=2164&amp;oldid=prev"/>
				<updated>2014-06-13T16:41:11Z</updated>
		
		<summary type="html">&lt;p&gt;&lt;/p&gt;
&lt;table class='diff diff-contentalign-left'&gt;
				&lt;col class='diff-marker' /&gt;
				&lt;col class='diff-content' /&gt;
				&lt;col class='diff-marker' /&gt;
				&lt;col class='diff-content' /&gt;
				&lt;tr style='vertical-align: top;'&gt;
				&lt;td colspan='2' style=&quot;background-color: white; color:black; text-align: center;&quot;&gt;← Older revision&lt;/td&gt;
				&lt;td colspan='2' style=&quot;background-color: white; color:black; text-align: center;&quot;&gt;Revision as of 16:41, 13 June 2014&lt;/td&gt;
				&lt;/tr&gt;&lt;tr&gt;&lt;td colspan=&quot;2&quot; class=&quot;diff-lineno&quot;&gt;Line 23:&lt;/td&gt;
&lt;td colspan=&quot;2&quot; class=&quot;diff-lineno&quot;&gt;Line 23:&lt;/td&gt;&lt;/tr&gt;
&lt;tr&gt;&lt;td class='diff-marker'&gt;&amp;#160;&lt;/td&gt;&lt;td style=&quot;background-color: #f9f9f9; color: #333333; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #e6e6e6; vertical-align: top; white-space: pre-wrap;&quot;&gt;&lt;div&gt;#&amp;lt;pre&amp;gt;chown root:mailtrap /usr/sbin/sendmail&amp;lt;/pre&amp;gt;&lt;/div&gt;&lt;/td&gt;&lt;td class='diff-marker'&gt;&amp;#160;&lt;/td&gt;&lt;td style=&quot;background-color: #f9f9f9; color: #333333; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #e6e6e6; vertical-align: top; white-space: pre-wrap;&quot;&gt;&lt;div&gt;#&amp;lt;pre&amp;gt;chown root:mailtrap /usr/sbin/sendmail&amp;lt;/pre&amp;gt;&lt;/div&gt;&lt;/td&gt;&lt;/tr&gt;
&lt;tr&gt;&lt;td class='diff-marker'&gt;&amp;#160;&lt;/td&gt;&lt;td style=&quot;background-color: #f9f9f9; color: #333333; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #e6e6e6; vertical-align: top; white-space: pre-wrap;&quot;&gt;&lt;div&gt;#&amp;lt;pre&amp;gt;chmod 2755 /usr/sbin/sendmail&amp;lt;/pre&amp;gt;&lt;/div&gt;&lt;/td&gt;&lt;td class='diff-marker'&gt;&amp;#160;&lt;/td&gt;&lt;td style=&quot;background-color: #f9f9f9; color: #333333; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #e6e6e6; vertical-align: top; white-space: pre-wrap;&quot;&gt;&lt;div&gt;#&amp;lt;pre&amp;gt;chmod 2755 /usr/sbin/sendmail&amp;lt;/pre&amp;gt;&lt;/div&gt;&lt;/td&gt;&lt;/tr&gt;
&lt;tr&gt;&lt;td colspan=&quot;2&quot;&gt;&amp;#160;&lt;/td&gt;&lt;td class='diff-marker'&gt;+&lt;/td&gt;&lt;td style=&quot;color:black; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #a3d3ff; vertical-align: top; white-space: pre-wrap;&quot;&gt;&lt;div&gt;&lt;ins style=&quot;font-weight: bold; text-decoration: none;&quot;&gt;&lt;/ins&gt;&lt;/div&gt;&lt;/td&gt;&lt;/tr&gt;
&lt;tr&gt;&lt;td colspan=&quot;2&quot;&gt;&amp;#160;&lt;/td&gt;&lt;td class='diff-marker'&gt;+&lt;/td&gt;&lt;td style=&quot;color:black; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #a3d3ff; vertical-align: top; white-space: pre-wrap;&quot;&gt;&lt;div&gt;&lt;ins style=&quot;font-weight: bold; text-decoration: none;&quot;&gt;[[Category:&amp;#160; Linux VPS]]&lt;/ins&gt;&lt;/div&gt;&lt;/td&gt;&lt;/tr&gt;
&lt;tr&gt;&lt;td colspan=&quot;2&quot;&gt;&amp;#160;&lt;/td&gt;&lt;td class='diff-marker'&gt;+&lt;/td&gt;&lt;td style=&quot;color:black; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #a3d3ff; vertical-align: top; white-space: pre-wrap;&quot;&gt;&lt;div&gt;&lt;ins style=&quot;font-weight: bold; text-decoration: none;&quot;&gt;[[Category:&amp;#160; PHP]]&lt;/ins&gt;&lt;/div&gt;&lt;/td&gt;&lt;/tr&gt;
&lt;/table&gt;</summary>
		<author><name>Maxm</name></author>	</entry>

	<entry>
		<id>https://wiki.hostek.com/index.php?title=PHP_email_not_sending&amp;diff=2163&amp;oldid=prev</id>
		<title>Maxm: Created page with &quot;==Testing the PHP mail function== To test if the PHP mail function is working, save and run the following script.  &lt;pre&gt;&lt;?php $message = &quot;This is just a test. Please disregard...&quot;</title>
		<link rel="alternate" type="text/html" href="https://wiki.hostek.com/index.php?title=PHP_email_not_sending&amp;diff=2163&amp;oldid=prev"/>
				<updated>2014-06-13T16:38:04Z</updated>
		
		<summary type="html">&lt;p&gt;Created page with &amp;quot;==Testing the PHP mail function== To test if the PHP mail function is working, save and run the following script.  &amp;lt;pre&amp;gt;&amp;lt;?php $message = &amp;quot;This is just a test. Please disregard...&amp;quot;&lt;/p&gt;
&lt;p&gt;&lt;b&gt;New page&lt;/b&gt;&lt;/p&gt;&lt;div&gt;==Testing the PHP mail function==&lt;br /&gt;
To test if the PHP mail function is working, save and run the following script.&lt;br /&gt;
&lt;br /&gt;
&amp;lt;pre&amp;gt;&amp;lt;?php&lt;br /&gt;
$message = &amp;quot;This is just a test. Please disregard.&amp;quot;;&lt;br /&gt;
&lt;br /&gt;
if(mail('youremail@domain.com', 'PHP Mail Test', $message)){&lt;br /&gt;
        echo &amp;quot;sent&amp;quot;;&lt;br /&gt;
}else{&lt;br /&gt;
        echo &amp;quot;failed&amp;quot;;&lt;br /&gt;
}&lt;br /&gt;
&lt;br /&gt;
?&amp;gt;&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
If it fails, then there is a problem with PHP passing email messages to sendmail. &lt;br /&gt;
&lt;br /&gt;
==Troubleshooting==&lt;br /&gt;
Check the Apache error log file: /usr/local/apache/logs/error_log&lt;br /&gt;
&lt;br /&gt;
If you see an error message like: &amp;lt;pre&amp;gt;sendmail: Not running with correct effective GID.  Is sendmail binary setgid mailtrap?&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
To resolve this issue perform the following:&lt;br /&gt;
#&amp;lt;pre&amp;gt;chown root:mailtrap /usr/sbin/sendmail&amp;lt;/pre&amp;gt;&lt;br /&gt;
#&amp;lt;pre&amp;gt;chmod 2755 /usr/sbin/sendmail&amp;lt;/pre&amp;gt;&lt;/div&gt;</summary>
		<author><name>Maxm</name></author>	</entry>

	</feed>