您好, 欢迎来到 !    登录 | 注册 | | 设为首页 | 收藏本站

使用GMAIL邮件服务器从在PHP中运行XAMMP的本地主机发送电子邮件

使用GMAIL邮件服务器从在PHP中运行XAMMP的本地主机发送电子邮件

是给我答案的链接

[安装]“ 用于Windows的伪sendmail ”。如果您不使用XAMPP,则可以在这里下载:http ://glob.com.au/sendmail/sendmail.zip

@H_419_6@[Modify] the PHP.ini file to use it (commented out the other lines):

[mail function]
; For Win32 only.
; SMTP = smtp.gmail.com
; smtp_port = 25

; For Win32 only.
; sendmail_from = <e-mail username>@gmail.com

; For Unix only. You may supply arguments as well (default: "sendmail -t

-i”). sendmail_path = “C:\xampp\sendmail\sendmail.exe -t”

(忽略“仅Unix”位,因为我们实际上正在使用sendmail)

然后,您必须在安装sendmail的目录中配置“ sendmail.ini”文件

@H_419_6@[sendmail]

smtp_server=smtp.gmail.com
smtp_port=25
error_logfile=error.log
debug_logfile=debug.log
auth_username=<username>
auth_password=<password>
force_sender=<e-mail username>@gmail.com
php 2022/1/1 18:15:03 有526人围观

撰写回答


你尚未登录,登录后可以

和开发者交流问题的细节

关注并接收问题和回答的更新提醒

参与内容的编辑和改进,让解决方法与时俱进

请先登录

推荐问题


联系我
置顶