title: How to send an email in Wordpress using PHP
body: <p>For starters, I downloaded a Wordpress plugin that allows you to insert PHP snippets into a Wordpress site. I added this code hoping that it will send an email but I have not receeved anything yet. I have used two different snippet plugins, and I am not sure what could be causing the issue, or if there would be an easier way to go about doing this.</p>
  <pre><code>&lt;?php
  
  $to = 'mytestemail@gmail.com';
  
  $subject = 'Test email';
  
  $message = 'Test';
  
  $headers = &quot;From: The Sender name &lt;myemailaddress@gmail.com&gt;&quot;;
  
  mail($to, $subject, $message, $headers); 
  
  ?&gt;
  </code></pre>