title: Email for xampp: Having parse error: syntax error, unexpected '@'
body: <p><strong>Error Received:</strong></p>
  
  <blockquote>
    <p>Parse error: syntax error, unexpected '@' in
    C:\xampp\htdocs\FYP_v4\mailSMTP.php on line 11</p>
  </blockquote>
  
  <p>I am using PHPmailer from Github. I was supposed to receive a email after running <strong>mailSTMP.php</strong> to authorize the username, but ended up receiving the error mentioned above instead. Please advise and assist. Thank you!</p>
  
  <p>From <strong>mailSTMP.php</strong>,
      
  
  <pre><code>//require_once('class.phpmailer.php');
  require_once('PHPMailerAutoload.php');
  
  $mail = new PHPMailer();
  $mail-&gt;IsSMTP();
  $mail-&gt;CharSet = "UTF-8";
  $mail-&gt;SMTPSecure = 'tls';
  $mail-&gt;Host = 'smtp.gmail.com';
  $mail-&gt;Port = 587;
  $mail-&gt;Username = 'username@gmail.com';
  $mail-&gt;Password = 'password';
  $mail-&gt;SMTPAuth = true;
  
  $mail-&gt;From = 'username@gmail.com';
  $mail-&gt;FromName = 'Mohammad Masoudian';
  $mail-&gt;AddAddress('xxxxxxx@mail.com');
  $mail-&gt;AddReplyTo('xxxxxxx@gmail.com', 'Information');
  
  $mail-&gt;IsHTML(true);
  $mail-&gt;Subject = "PHPMailer Test Subject via Sendmail, basic";
  $mail-&gt;AltBody = "To view the message, please use an HTML compatible email viewer!";
  $mail-&gt;Body = "Hello";
  
  $mail-&gt;SMTPDebug = 1;                     // enables SMTP debug information (for testing)
  if (!$mail-&gt;Send()) {
      echo "Mailer Error: " . $mail-&gt;ErrorInfo;
  } else {
      echo "Message sent!";
  }
  ?&gt;
  </code></pre>
  
  <p>From <strong>php.ini</strong>, </p>
  
  <pre><code>;;;;;;;;;;;;;;;;;;;;;;;;;
  ; Paths and Directories ;
  ;;;;;;;;;;;;;;;;;;;;;;;;;
  
  ; UNIX: "/path1:/path2"
  ;include_path = ".:/php/includes"
  ;
  ; Windows: "\path1;\path2"
  include_path=".;C:\xampp\php\PEAR;C:\xampp\htdocs\FYP_v4"
  ;
  ; PHP's default setting for include_path is ".;/path/to/php/pear"
  ; http://php.net/include-path
  </code></pre>
  
  <p>From <strong>sendmail.ini</strong>,</p>
  
  <pre><code>; or to IIS's "pickup" directory.  (generally C:\Inetpub\mailroot\Pickup)
  ; emails delivered via IIS's pickup directory cause sendmail to
  ; run quicker, but you won't get error messages back to the calling
  ; application.
  
  smtp_server=smtp.gmail.com
  
  ; smtp port (normally 25)
  
  smtp_port=587
  
  ; SMTPS (SSL) support
  ;   auto = use SSL for port 465, otherwise try to use TLS
  ;   ssl  = alway use SSL
  ;   tls  = always use TLS
  ;   none = never try to use SSL
  
  smtp_ssl=auto
  
  ; the default domain for this server will be read from the registry
  ; this will be appended to email addresses when one isn't provided
  ; if you want to override the value in the registry, uncomment and modify
  
  ;default_domain=mydomain.com
  
  ; log smtp errors to error.log (defaults to same directory as sendmail.exe)
  ; uncomment to enable logging
  
  error_logfile=error.log
  
  ; create debug log as debug.log (defaults to same directory as sendmail.exe)
  ; uncomment to enable debugging
  
  ;debug_logfile=debug.log
  
  ; if your smtp server requires authentication, modify the following two lines
  
  auth_username= username@gmail.com
  auth_password= password
  
  ; if your smtp server uses pop3 before smtp authentication, modify the 
  ; following three lines.  do not enable unless it is required.
  
  pop3_server= smtp.gmail.com
  pop3_username= username@gmail.com
  pop3_password= password
  
  
  ; force the sender to always be the following email address
  ; this will only affect the "MAIL FROM" command, it won't modify 
  ; the "From: " header of the message content
  
  force_sender= username@gmail.com
  
  ; force the sender to always be the following email address
  ; this will only affect the "RCTP TO" command, it won't modify 
  ; the "To: " header of the message content
  
  force_recipient=
  
  ; sendmail will use your hostname and your default_domain in the ehlo/helo
  ; smtp greeting.  you can manually set the ehlo/helo name if required
  
  hostname=
  </code></pre>