title: Can't send mail from php using xampp
body: <p>I want to send mail in php from localhost, I had config two files php.in and sendmail.in, but not working for me. I'm using windows 8</p>
  
  <pre><code>[mail function]
  SMTP = localhost
  smtp_port = 25
  sendmail_path = "\"C:\xampp\sendmail\sendmail.exe\" -t"
  mail.add_x_header=Off
  </code></pre>
  
  <p>In sendmail.ini</p>
  
  <pre><code>smtp_server=smtp.gmail.com
  smtp_port=587
  smtp_ssl=auto
  error_logfile=error.log
  debug_logfile=debug.log
  auth_username=myaccount@gmail.com
  auth_password=mypassword
  force_sender=myaccount@gmail.com
  </code></pre>
  
  <p>and my file php to check send mail</p>
  
  <pre><code>mail('myaccount@gmail.com','test subject','test message',"From: username01@gmail.com")
  </code></pre>
  
  <p>but not working, this is my debug file</p>
  
  <pre><code>14/06/08 18:57:25 ** --- MESSAGE BEGIN ---
  14/06/08 18:57:25 ** To: myaccount@gmail.com
  14/06/08 18:57:25 ** Subject: test subject
  14/06/08 18:57:25 ** From: username01@gmail.com
  14/06/08 18:57:25 ** 
  14/06/08 18:57:25 ** test message
  14/06/08 18:57:25 ** --- MESSAGE END ---
  14/06/08 18:57:27 ** Connecting to smtp.gmail.com:587
  14/06/08 18:57:27 ** Connected.
  14/06/08 18:57:27 &lt;&lt; 220 mx.google.com ESMTP 8sm79651218igr.2 - gsmtp&lt;EOL&gt;
  14/06/08 18:57:27 &gt;&gt; EHLO admin&lt;EOL&gt;
  14/06/08 18:57:28 &lt;&lt; 250-mx.google.com at your service, [1.52.22.18]&lt;EOL&gt;250-SIZE 35882577&lt;EOL&gt;250-8BITMIME&lt;EOL&gt;250-STARTTLS&lt;EOL&gt;250-ENHANCEDSTATUSCODES&lt;EOL&gt;250 CHUNKING&lt;EOL&gt;
  14/06/08 18:57:28 ** Authenticating as khanghuynh92@gmail.com
  14/06/08 18:57:28 &gt;&gt; STARTTLS&lt;EOL&gt;
  14/06/08 18:57:28 &lt;&lt; 220 2.0.0 Ready to start TLS&lt;EOL&gt;
  14/06/08 18:57:28 &gt;&gt; QUIT&lt;EOL&gt;
  14/06/08 18:57:28 &lt;&lt;  5  1S”O§×ãd´§ÒÞð5U0~K’ˆî8`fwqLÚÙú     ÿ   #     z0‚v0‚^ :ä^nìó0
      *†H†÷
   0I10   UUS10U
  
  Google Inc1%0#UGoogle Internet Authority G20
  130910075447Z
  140910075447Z0h10   UUS10U
  California10U
  Mountain View10U
  
  Google Inc10Usmtp.gmail.com0‚"0
      *†H†÷
   ‚ 0‚
  ‚ ©0 ÚÖÖ×Ì®TË¥Ÿ.Jå‚ð·›’
  QSÙ^ú{pî¯69~0!ã…°vFH;ARDñãRWAé«{Î»?‘CjÏ)öž3s’~´«WšUm› VäVË—e;¾õðÄ7òù’–c¤bœZßæ’%•Ò¨Ýf'v?P&gt;_ˆ,¨ÌihB?’Ÿs2Ç6&gt;á?ßYCI¨|   ±^2òš¿D…Ÿ$X3~˜ð$Øqõÿ®¢VñöÓ [§º«ÇTÕN–æî¾ÞÖmbc0¿™¢²‘öŸ•Ó½'3xÙ‘&lt;Vpú¥õã%ãÂÿy})´†d¶Ô‚µéâ™ÁJ0½[ £‚A0‚=0U%0++0U0‚smtp.gmail.com0h+\0Z0++0†http://pki.google.com/GIAG2.crt0++0†http://clients1.google.com/ocsp0UCMe¸ˆÌ×vø:†)Æð&amp;º0Uÿ0 0U#0€JÝ¼öhµvõ¶»bºZ/0U 00
  +Öy00U)0'0% # !†http://pki.google.com/GIAG2.crl0
      *†H†÷
   ‚  Þ}@µ†¼-
  FÅìY§y¼_x¤_ƒYƒDZš§®×a”àbÑyC¤neï}F–&lt;“y"LÞ¢ûsÍ¨‰S3åK “ÿ)HÚD¨ÿB¦ßŠÀçðüà–¿Õ$&lt;qàqTÐYN`íR±n…ùÿÐ™9™'ýå`²;Ög®ºÞÎìopYWV˜låt²ë’äÎ$×ŠD~1Œ"¡¿p0?Joª ó«Gè®¡˜Q9»X.+(¶ÇÓË&lt;ƒ.¹Ëñ"h–(J«&gt;¯m®Ë¶Æh(,WýàÝ`T•îi•å
  pN­mé!óc×ÃaÂeüÐza+î‹!Tåö 0‚0‚ì :i0
      *†H†÷
   0B10   UUS10U
  
  GeoTrust Inc.10UGeoTrust Global CA0
  130405151555Z
  150404151555Z0I10   UUS10U
  
  Google Inc1%0#U
  14/06/08 18:57:28 &lt;&lt; Google Internet Authority G20‚"0&lt;CR&gt;   *†H†÷&lt;CR&gt; ‚ 0‚
  ‚ œ*w\ØP‘:£‚àØPH¼‰?ñpˆF~àÅñ‰Î!îZþa
  ·2D‰ tSOU¤Î‚b•îëY_Æá€Ä^”?¼[H8ôS÷$æû‘éÄÏôS
  ôJüŸTÞ}¾ ko‡ÀÐP(0@ÚsQlÿ:&lt;§7Ž½Kë}$Þæùü1qû”Õ`ó.J¯BÒËêÄj²ÌSÝK‹ÈaÍ¨&gt;c+„5ie„ÈÅF"øS•¾ã€JÆ*ìº— Ç9™ ðaz•%ŒNRuâ¶íÊüÎ"j³NÏF——~À±Þ{¯E3Ïº&gt;q·Þô%%Â
  5‰ûy‰7Å¯Žri £û0ø0U#0€Àz˜h‰û«d}ª}e¸ÊÌN0UJÝ¼öhµvõ¶»bºZ/0Uÿ0ÿ 0Uÿ0:U3010/ - +†)http://crl.geotrust.com/crls/gtglobal.crl0=+10/0-+0†!http://gtglobal-ocsp.geotrust.com0U 00
  +Öy0
      *†H†÷
   ‚ 6×€'­*›8w³# uX»±~ƒBºrÚØŽ6—àð•;7ýBXþ"Èk½8^Ñ;%në^gvF@ÚÈx
  í•fÚŽ†o€¡ºV2•†ÜÜjÊŒ[ö¿Ìo…XÃhQÍýÈ÷y=™5ðV£½àYíOD  £ž8zöFÑO¾Ð@üUþ^&lt;ÚV½–Q{oW*Û¢ª–ÜŒtÂ•¾ðn•ÿð&lt;¬²ÌsûèÆðû3³•;ãÂËhXsÛ¨$b;5
  ©3½x.Lx]P:Ôî Èp8Ü²ùgú‡@]aÀQkƒkÍ:Êá§xüÊÚ”Ð,=~yÈ P $T3q 0‚}0‚æ »æ0
      *†H†÷
   0N10   UUS10U
  Equifax1-0+U$Equifax Secure Certificate Authority0
  020521040000Z
  180821040000Z0B10   UUS10U
  
  GeoTrust Inc.10UGeoTrust Global CA0‚"0
      *†H†÷
   ‚ 0‚
  ‚ ÚÌc0ýô#V~[ß&lt;l8äq·x‘Ô¼¡ØLø¨C¶éM!ˆÚX/f9)½x‹8è·j~q¤æÄ`¦°ï€ä‰(ž%Öíƒó­¦‘Ç˜ÉB5­˜F’.OÊñ‡CÁ•W-Pï‰-€zW­òî_kÒ ¹ø5ÙÀF£{rÈ‘¿ÉU+ÍÐ—&gt;œ&amp;dÌßÎƒqÊNæÔÕ{©ÍUÞÈìÒ^8Så\OŒ-þP#6üfæËŽ¤9 ·•9‘þ8.ÑšöM&gt;o¯,`9âú6S9Ô^&amp;+Û=¨½2ë(Rqå«3=á8»6„bœyê0ô_À+èqkäù £ð0í0U#0€Hæhù+Ò²•×GØ# O3˜
  14/06/08 18:57:28 &lt;&lt; ŸÔ0UÀz˜h‰û«d}ª}e¸ÊÌN0Uÿ0ÿ0Uÿ0:U3010/ - +†)http://crl.geotrust.com/crls/secureca.crl0NU G0E0CU  0;09+-https://www.geotrust.com/resources/repository0
      *†H†÷
    vánNK†0²ÏðÇÇq~fîÂíÔ;ÿððÈNÖC8°¹0}ÐUƒ¢jË6œèHf£m¸ÔGþ‹Z\sü®Ù28«—4ª–Òë£I¶»å‘ïƒ6ëVoÊÚ¼scä{&gt;"Ë=í_8tœãPN¡¯˜îaò„?    
  14/06/08 18:57:28 &lt;&lt;  F
  14/06/08 18:57:28 ** Disconnected.
  14/06/08 18:57:28 ** Disconnecting from smtp.gmail.com:587
  14/06/08 18:57:28 ** Disconnected.
  14/06/08 18:57:28 ** Disconnected.
  14/06/08 18:57:28 ** Connection Closed Gracefully.
  </code></pre>
  
  <p>Anybody give me some advices, please</p>