I use PHP version 5.4.7, win 7 x64, localhost  

this is my code: 

```
mail("my_gmail@gmail.com",$subject,$message,"From: $user\n");

```

I've changed the file `php.ini`:  

1. remove semicon in `extension=php_openssl.dll`  

2. change into 

```
[mail function]   
SMTP=smtp.gmail.com
smtp_port=587
sendmail_from = my-gmail-id@gmail.com
sendmail_path = "\"C:\xampp\sendmail\sendmail.exe\" -t"

```

and replace all existing code in `sendmail.ini` into  

[sendmail] 

```
smtp_server=smtp.gmail.com
smtp_port=587
error_logfile=error.log  
debug_logfile=debug.log
auth_username=my-gmail-id@gmail.com
auth_password=my-gmail-password
force_sender=my-gmail-id@gmail.com

```

but i still cant received the email, anyone know my mistakes?plz