2024-08-22 03:31:11 來自:219.84.252.165
 回覆
1樓. 回覆 : 2068 時間 : 2024-08-22 03:50:10
打開XAMPP的php.ini檔案,更改以下內容:
將:
; extension=php_openssl.dll
更改為:
extension=php_openssl.dll
在[mail function]位置,將:
SMTP=localhost
smtp_port=25
;sendmail_path =
更改為:
SMTP=smtp.gmail.com
smtp_port=465
sendmail_path = "\"C:\xampp\sendmail\sendmail.exe\" -t"
打開XAMPP的sendmail.ini檔案,正常sendmail.ini檔案是位於c:\xampp\sendmail資料夾內。
在[sendmail]位置,將:
smtp_server=mail.mydomain.com
smtp_port=25
auth_username=
auth_password=
更改為:
smtp_server=smtp.gmail.com
smtp_port=465
auth_username=<your gmail login>
auth_password=<your gmail password>
約41行
force_sender=sample@gmail.com ← gmail信箱
stunnel
stunnel.conf 檔,位置在 C:Program Filesstunnelstunnel.conf
原本是註解的就拿掉分號,取消註解。
cert = stunnel.pem
socket = l:TCP_NODELAY=1
socket = r:TCP_NODELAY=1
debug = 7
output = stunnel.log
client = yes
[ssmtp]
accept = 127.0.0.1:25
connect = smtp.gmail.com:465