unable to send emails though localhost wordpress using xampp

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

Read More
[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:xamppsendmailsendmail.exe" -t"

; XAMPP: Comment out this if you want to work with mailToDisk, It writes all mails in the C:xamppmailoutput folder
;sendmail_path="C:xamppmailtodiskmailtodisk.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.
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.

Related posts

3 comments

  1. please try this plugin your problem will be short out : wordpress mail SMTP

    https://wordpress.org/plugins/wp-mail-smtp/
    

    if you have query regarding to setting then please asked me..

Comments are closed.