title: Cant set sender name phpmailer
body: <p>So I'm setting up a script to send emails from a contact us form. Everything is working great besides the fact that I can't set sender's name properly. I get an error:</p>
  
  <pre><code>Warning: Creating default object from empty value
  </code></pre>
  
  <p>My code looks like this:</p>
  
  <pre><code>&lt;?php $eemail = $_REQUEST['email'] ;
   $message = $_REQUEST['message']; $subject = $_REQUEST['subject']; $fname =
   $_REQUEST['name'];
  
   require("class.phpmailer.php"); $mail = new PHPMailer();  
  
   $mail-&gt;Username = "email";  // SMTP username
   $mail-&gt;Password = "password"; // SMTP password  $mail-&gt;IsSMTP(); 
   $mail-&gt;SMTPAuth = true;  $mail-&gt;Host = 'aspmx.l.google.com'; 
   $mail-&gt;Port = 25;
  
  
  
   $mail-&gt;From = $eemail; $name-&gt;FromName = $fname; $mail-&gt;Subject =
   $subject;
  
   $mail-&gt;AddAddress("email", "name");
  
  
   $mail-&gt;WordWrap = 50;
  
   $mail-&gt;IsHTML(true);
  
   $mail-&gt;Body    = $message; $mail-&gt;AltBody = $message;
  
   if(!$mail-&gt;Send()) {    echo "Message could not be sent. &lt;p&gt;";    echo
   "Mailer Error: " . $mail-&gt;ErrorInfo;    exit; }
  
   echo "Message has been sent"; ?&gt;
  </code></pre>