<?xml version="1.0"?>
<?xml-stylesheet type="text/css" href="https://script.spoken-tutorial.org/skins/common/feed.css?303"?>
<feed xmlns="http://www.w3.org/2005/Atom" xml:lang="en">
		<id>https://script.spoken-tutorial.org/index.php?action=history&amp;feed=atom&amp;title=PHP-and-MySQL%2FC4%2FSending-Email-Part-3%2FEnglish</id>
		<title>PHP-and-MySQL/C4/Sending-Email-Part-3/English - Revision history</title>
		<link rel="self" type="application/atom+xml" href="https://script.spoken-tutorial.org/index.php?action=history&amp;feed=atom&amp;title=PHP-and-MySQL%2FC4%2FSending-Email-Part-3%2FEnglish"/>
		<link rel="alternate" type="text/html" href="https://script.spoken-tutorial.org/index.php?title=PHP-and-MySQL/C4/Sending-Email-Part-3/English&amp;action=history"/>
		<updated>2026-04-06T01:12:03Z</updated>
		<subtitle>Revision history for this page on the wiki</subtitle>
		<generator>MediaWiki 1.23.17</generator>

	<entry>
		<id>https://script.spoken-tutorial.org/index.php?title=PHP-and-MySQL/C4/Sending-Email-Part-3/English&amp;diff=884&amp;oldid=prev</id>
		<title>Pravin1389: moved PHP-and-MySQL/C4/Sending-Email-(Part 3)/English to PHP-and-MySQL/C4/Sending-Email-Part-3/English</title>
		<link rel="alternate" type="text/html" href="https://script.spoken-tutorial.org/index.php?title=PHP-and-MySQL/C4/Sending-Email-Part-3/English&amp;diff=884&amp;oldid=prev"/>
				<updated>2012-12-01T15:30:35Z</updated>
		
		<summary type="html">&lt;p&gt;moved &lt;a href=&quot;/index.php/PHP-and-MySQL/C4/Sending-Email-(Part_3)/English&quot; class=&quot;mw-redirect&quot; title=&quot;PHP-and-MySQL/C4/Sending-Email-(Part 3)/English&quot;&gt;PHP-and-MySQL/C4/Sending-Email-(Part 3)/English&lt;/a&gt; to &lt;a href=&quot;/index.php/PHP-and-MySQL/C4/Sending-Email-Part-3/English&quot; title=&quot;PHP-and-MySQL/C4/Sending-Email-Part-3/English&quot;&gt;PHP-and-MySQL/C4/Sending-Email-Part-3/English&lt;/a&gt;&lt;/p&gt;
&lt;table class='diff diff-contentalign-left'&gt;
				&lt;tr style='vertical-align: top;'&gt;
				&lt;td colspan='1' style=&quot;background-color: white; color:black; text-align: center;&quot;&gt;← Older revision&lt;/td&gt;
				&lt;td colspan='1' style=&quot;background-color: white; color:black; text-align: center;&quot;&gt;Revision as of 15:30, 1 December 2012&lt;/td&gt;
				&lt;/tr&gt;&lt;tr&gt;&lt;td colspan='2' style='text-align: center;'&gt;&lt;div class=&quot;mw-diff-empty&quot;&gt;(No difference)&lt;/div&gt;
&lt;/td&gt;&lt;/tr&gt;&lt;/table&gt;</summary>
		<author><name>Pravin1389</name></author>	</entry>

	<entry>
		<id>https://script.spoken-tutorial.org/index.php?title=PHP-and-MySQL/C4/Sending-Email-Part-3/English&amp;diff=581&amp;oldid=prev</id>
		<title>Chandrika: Created page with '{| border=1 !Time !Narration |- |0:00 |Welcome back.  How do we fix this &quot;'Sendmail from not set in php dot ini&quot; error. |- |0:11 |We haven't determined who the email is from. |- …'</title>
		<link rel="alternate" type="text/html" href="https://script.spoken-tutorial.org/index.php?title=PHP-and-MySQL/C4/Sending-Email-Part-3/English&amp;diff=581&amp;oldid=prev"/>
				<updated>2012-11-29T06:59:02Z</updated>
		
		<summary type="html">&lt;p&gt;Created page with &amp;#039;{| border=1 !Time !Narration |- |0:00 |Welcome back.  How do we fix this &amp;quot;&amp;#039;Sendmail from not set in php dot ini&amp;quot; error. |- |0:11 |We haven&amp;#039;t determined who the email is from. |- …&amp;#039;&lt;/p&gt;
&lt;p&gt;&lt;b&gt;New page&lt;/b&gt;&lt;/p&gt;&lt;div&gt;{| border=1&lt;br /&gt;
!Time&lt;br /&gt;
!Narration&lt;br /&gt;
|-&lt;br /&gt;
|0:00&lt;br /&gt;
|Welcome back.  How do we fix this &amp;quot;'Sendmail from not set in php dot ini&amp;quot; error.&lt;br /&gt;
|-&lt;br /&gt;
|0:11&lt;br /&gt;
|We haven't determined who the email is from.&lt;br /&gt;
|-&lt;br /&gt;
|0:18&lt;br /&gt;
|We need to do this in order to send the email.&lt;br /&gt;
|-&lt;br /&gt;
|0:23&lt;br /&gt;
|We won't use something like a &amp;quot;from&amp;quot; parameter here.&lt;br /&gt;
|-&lt;br /&gt;
|0:29&lt;br /&gt;
|We need to send to specific headers.&lt;br /&gt;
|-&lt;br /&gt;
|0:32&lt;br /&gt;
|So here we create a &amp;quot;headers&amp;quot; variable which is not equal to something like &amp;quot;me @me.com&amp;quot; &lt;br /&gt;
|-&lt;br /&gt;
|0:43&lt;br /&gt;
|What we need to do is work with the standardised mail header and that is &amp;quot;From:&amp;quot; and a colon not semi colon and then we say for example &amp;quot;php academy&amp;quot; &lt;br /&gt;
|-&lt;br /&gt;
|0:54&lt;br /&gt;
|Or you could say something like &amp;quot;admin @php academy&amp;quot;  and add &amp;quot;.com&amp;quot; if you like.&lt;br /&gt;
|-&lt;br /&gt;
|1:02&lt;br /&gt;
|I don't actually have that domain name but we'll just keep it as that. &lt;br /&gt;
|-&lt;br /&gt;
|1:08&lt;br /&gt;
|So &amp;quot;From: admin @phpacademy.com&amp;quot;.  &lt;br /&gt;
|-&lt;br /&gt;
|1:11&lt;br /&gt;
|Inside our mail we need to add another parameter now which is &amp;quot;headers&amp;quot;.&lt;br /&gt;
|-&lt;br /&gt;
|1:18&lt;br /&gt;
|And now we come here and you can type &amp;quot;Alex&amp;quot; and here &amp;quot;This is a test!&amp;quot; &lt;br /&gt;
|-&lt;br /&gt;
|1:24&lt;br /&gt;
|Click on &amp;quot;Send me this&amp;quot; and we face another error. &lt;br /&gt;
|-&lt;br /&gt;
|1:27&lt;br /&gt;
|Now I am not actually running a mail server on my computer. &lt;br /&gt;
|-&lt;br /&gt;
|1:33&lt;br /&gt;
|If you don't want to run a mail server on your computer, google for at mail free mail server and this will install a mail server on your computer just like we are doing now running on a local host. &lt;br /&gt;
|-&lt;br /&gt;
|1:46&lt;br /&gt;
|And you will have a SMTP mail server running under local host. &lt;br /&gt;
|-&lt;br /&gt;
|1:54&lt;br /&gt;
|Now as I don't have a mail server, I will use my university email system which is the DNS or the &amp;quot;Domain Name Server&amp;quot; of my university email &lt;br /&gt;
|-&lt;br /&gt;
|2:06&lt;br /&gt;
|That's the way my email is sent through my university. &lt;br /&gt;
|-&lt;br /&gt;
|2:11&lt;br /&gt;
|If you know a specific DNS Server, if you have a domain name already,  if you have a website you will know it or you will be able to find it, at least. &lt;br /&gt;
|-&lt;br /&gt;
|2:22&lt;br /&gt;
|You will be able to send an email through that. &lt;br /&gt;
|-&lt;br /&gt;
|2:27&lt;br /&gt;
|I know that my university email DNS server is &amp;quot;mailhost dot shef dot ac dot uk&amp;quot; because I'm in Sheffield university. &lt;br /&gt;
|-&lt;br /&gt;
|2:36&lt;br /&gt;
|So I need to incorporate this into my &amp;quot;php dot ini&amp;quot;. &lt;br /&gt;
|-&lt;br /&gt;
|2:41&lt;br /&gt;
|And the best way to do this is to come here and setup our variables &lt;br /&gt;
|-&lt;br /&gt;
|2:46&lt;br /&gt;
|okay we need 2 - set SMTP in &amp;quot;php dot ini&amp;quot; &lt;br /&gt;
|-&lt;br /&gt;
|2:59&lt;br /&gt;
|And instead of opening up my &amp;quot;php dot ini&amp;quot; file ,I'll just use the &amp;quot;ini set&amp;quot; function.&lt;br /&gt;
|-&lt;br /&gt;
|3:05&lt;br /&gt;
|And the variable name is &amp;quot;SMTP&amp;quot;.&lt;br /&gt;
|-&lt;br /&gt;
|3:12&lt;br /&gt;
|So we are editing this line inside our &amp;quot;php dot ini&amp;quot; file.&lt;br /&gt;
|-&lt;br /&gt;
|3:16&lt;br /&gt;
|And I type the mail host in there as the value. &lt;br /&gt;
|-&lt;br /&gt;
|3:20&lt;br /&gt;
|Here we just say echo &amp;quot;get ini&amp;quot; which gets a specific value. &lt;br /&gt;
|-&lt;br /&gt;
|3:25&lt;br /&gt;
|Next I'll say SMTP and that can just kill the script there. &lt;br /&gt;
|-&lt;br /&gt;
|3:30&lt;br /&gt;
|So we can see how this works. &lt;br /&gt;
|-&lt;br /&gt;
|3:32&lt;br /&gt;
|So if I say &amp;quot;Alex&amp;quot; and then &amp;quot;Test&amp;quot; and click on &amp;quot;Send me this&amp;quot;.&lt;br /&gt;
|-&lt;br /&gt;
|3:40&lt;br /&gt;
|Oh! Sorry I have typed this completely wrong. Big mistake. That is &amp;quot;ini get&amp;quot; and lets refresh that. &lt;br /&gt;
|-&lt;br /&gt;
|3:52&lt;br /&gt;
|Okay we are basically setting our &amp;quot;SMTP&amp;quot; inside our &amp;quot;ini&amp;quot; file to &amp;quot;mail host dot shef dot ac dot uk&amp;quot;. &lt;br /&gt;
|-&lt;br /&gt;
|3:59&lt;br /&gt;
|And then we will echo out the value of this.&lt;br /&gt;
|-&lt;br /&gt;
|4:03&lt;br /&gt;
|So just tells me that that is set to &amp;quot;mail host dot shef dot ac dot uk&amp;quot;. &lt;br /&gt;
|-&lt;br /&gt;
|4:10&lt;br /&gt;
|Presuming this mail host server or DNS server works, then the rest of the code will work.&lt;br /&gt;
|-&lt;br /&gt;
|4:17&lt;br /&gt;
|After sending our mail I'll just kill the page.&lt;br /&gt;
|-&lt;br /&gt;
|4:24&lt;br /&gt;
|Um.... no I won't .  I'll just kill the page. &lt;br /&gt;
|-&lt;br /&gt;
|4:28&lt;br /&gt;
|Lets go back and say &amp;quot;Alex&amp;quot; and &amp;quot;This is a test&amp;quot;.&lt;br /&gt;
|-&lt;br /&gt;
|4:36&lt;br /&gt;
|Just checking that everything is okay. We've got my &amp;quot;to&amp;quot;, my &amp;quot;subject&amp;quot;, my &amp;quot;headers&amp;quot; saying &amp;quot;From:admin@phpacademy.com&amp;quot;.&lt;br /&gt;
|-&lt;br /&gt;
|4:45&lt;br /&gt;
|And our body in here and we are executing our mail function.&lt;br /&gt;
|-&lt;br /&gt;
|4:51&lt;br /&gt;
|So when I click &amp;quot;Send me this&amp;quot;, nothing happens. We've got no errors so we can presume that everything has worked.&lt;br /&gt;
|-&lt;br /&gt;
|4:58&lt;br /&gt;
|If I come into my hotmail or my email and click on my INBOX, you can see that we've now got a mail from &amp;quot;admin @ phpacademy dot com&amp;quot;.&lt;br /&gt;
|-&lt;br /&gt;
|5:09&lt;br /&gt;
|If we click on it, we have &amp;quot;Email from PHPAcademy&amp;quot; as our subject line that we had set here.&lt;br /&gt;
|-&lt;br /&gt;
|5:17&lt;br /&gt;
|And we have the email address that I specified from.&lt;br /&gt;
|-&lt;br /&gt;
|5:22&lt;br /&gt;
|You can put this as from Alex or from phpacademy.&lt;br /&gt;
|-&lt;br /&gt;
|5:27&lt;br /&gt;
|And then we have &amp;quot;This is an email from Alex&amp;quot; which is the name we gave inside the form here.&lt;br /&gt;
|-&lt;br /&gt;
|5:35&lt;br /&gt;
|And then we have 2 line breaks which are present - 1 and 2&lt;br /&gt;
|-&lt;br /&gt;
|5:40&lt;br /&gt;
|And &amp;quot;This is a test&amp;quot; which is the text I put in there.&lt;br /&gt;
|-&lt;br /&gt;
|5:46&lt;br /&gt;
|So that's a mail function by using my university's DNS mail server.&lt;br /&gt;
|-&lt;br /&gt;
|5:50&lt;br /&gt;
|Your INSP will have a DNS mail server.&lt;br /&gt;
|-&lt;br /&gt;
|5:55&lt;br /&gt;
|It may require authentication on which I will be completing the tutorial soon.&lt;br /&gt;
|-&lt;br /&gt;
|6:00&lt;br /&gt;
|So if this doesn't work for you watch that tutorial or just drop me an email or contact me through my youtube.&lt;br /&gt;
|-&lt;br /&gt;
|6:09&lt;br /&gt;
|OK so I hope that was useful to a lot of people.&lt;br /&gt;
|-&lt;br /&gt;
|6:13&lt;br /&gt;
|Please subscribe if you haven't already.&lt;br /&gt;
|-&lt;br /&gt;
|6:15&lt;br /&gt;
|Alright, thanks for watching. This is Evan Varkey dubbing for the Spoken Tutorial Project.  Bye bye.&lt;/div&gt;</summary>
		<author><name>Chandrika</name></author>	</entry>

	</feed>