Phpmailer using smtp with Gmail not working - connection timing out

前端 未结 8 1972
天命终不由人
天命终不由人 2020-12-11 07:52

I\'ve looked into the following links:

phpmailer send gmail smtp timeout

send email using Gmail SMTP server through PHP Mailer

http://uly.me/phpmaile

相关标签:
8条回答
  • 2020-12-11 08:29

    This question has many duplicates, so here's a canned answer:

    1. Base your code on the gmail example provided with PHPMailer
    2. Check out the troubleshooting docs
    3. Be aware of this issue, related to what Larry K said.
    0 讨论(0)
  • 2020-12-11 08:33

    Download sendmail for Windows from http://www.glob.com.au/sendmail/sendmail.zip Copy sendmail.exe and sendmail.ini into C:/usr/lib/

    Edit sendmail.ini and enter your mail account credentials.

    You might want to configure these 2 fields as well (or sending may not work) force_sender=you-sender@yourdomain.com force_recipient=you@yourdomain.com By the way I uncommented debug_logfile so I can see what data is being sent to my SMTP server.

    edit c:\php\php.ini

    sendmail_from = you@yourdomain.com

    ; For Unix only. You may supply arguments as well (default: "sendmail -t -i"). sendmail_path = C:/usr/lib/sendmail.exe -t -i

    Restart apache Start sendmail.exe either from [Start] > Run > C:/usr/lib/sendmail.exe or Go to C:/usr/lib in Windows Explorer and then DoubleClick on the exe file.

    And this solution appears in Sendmail Wamp Php

    I tried it on Windows 10 now and it runs with gmail account

    Added:

    Open CMD and make a sendmail as daemon/service using

    sc create SendMail binpath= "C:\usr\lib\sendmail.exe"
    

    Now, be sure you have OpenSSL installed on your system, you can download it from here: https://slproweb.com/products/Win32OpenSSL.html

    Installs the version what do you need and dont remember to install "files to windows folder". Do a restart and try again, you will have it solved.

    0 讨论(0)
提交回复
热议问题