I tried every solution possible , looked every answer at `stackoverflow` but nothing worked. Here is my `sendmail.ini` file settings  

```
smtp_server=smtp.gmail.com
smtp_port=465
smtp_ssl=auto
auth_username=myemail@gmail.com
auth_password=password
pop3_server=
pop3_username=
pop3_password=
force_sender=myemail@gmail.com
force_recipient=
hostname=localhost

```

and my `php.ini` file  

```
[mail function]
; XAMPP: Comment out this if you want to work with an SMTP Server like Mercury
 SMTP = smtp.gmail.com
 smtp_port = 465

; For Win32 only.
; http://php.net/sendmail-from
sendmail_from = sinc964@gmail.com

; XAMPP IMPORTANT NOTE (1): If XAMPP is installed in a base directory with spaces (e.g. c:\program filesC:\xampp) fakemail and mailtodisk do not work correctly.
; XAMPP IMPORTANT NOTE (2): In this case please copy the sendmail or mailtodisk folder in your root folder (e.g. C:\sendmail) and use this for sendmail_path.  
; XAMPP: Comment out this if you want to work with fakemail for forwarding to your mailbox (sendmail.exe in the sendmail folder)
sendmail_path = "\"C:\xampp\sendmail\sendmail.exe\" -t"

; XAMPP: Comment out this if you want to work with mailToDisk, It writes all mails in the C:\xampp\mailoutput folder
;sendmail_path="C:\xampp\mailtodisk\mailtodisk.exe"

```

When I try to send a message using `contact-form-7` plugin , `sendmail.exe` pops up and stays there and this animation keeps on circling [link](http://prntscr.com/7tbv7w).  
I have wasted half of my day to just fix this problem , any help would be great.

**Update**  

I am using `smtp4dev` software which is receiving the sent emails through localhost but emails are not being received either on google or yahoo.