简体   繁体   English

电子邮件表格-Xampp,PHP,Javascript,MAC OS

[英]Form to Email - Xampp, PHP, Javascript, MAC OS

How to test "Contact us" page that takes form input, action = "send.php" which consists of mail function? 如何测试以表格形式输入的“与我们联系”页面,action =由邮件功能组成的“ send.php”? I am using Xampp on Mac OS El capitan. 我在Mac OS El capitan上使用Xampp。 No mail is received in the gmail inbox! gmail收件箱中未收到任何邮件!

You can use PHPMailer class with SMTP. 您可以将PHPMailer类与SMTP一起使用。

Please visit PHPMailer SMTP Example 请访问PHPMailer SMTP示例

You can use Gmail SMTP server. 您可以使用Gmail SMTP服务器。

In this way you don't have to setup Mail Server on your OSX/Windows. 这样,您不必在OSX / Windows上设置Mail Server。

First of all, you cannot send emails to Gmail from your local computer. 首先,您无法从本地计算机向Gmail发送电子邮件。 Unless you have a SMTP server setup, if you want to test an email form I suggest you to setup MailCatcher on your system https://mailcatcher.me . 除非您有SMTP服务器设置,否则,如果要测试电子邮件表单,建议您在系统https://mailcatcher.me上设置MailCatcher。

Once installed you should be able to debug the emails you sent from the form when everything is ready, you can be sure that the form will also work online (unless something is wrong with the server). 安装完成后,您应该可以在一切准备就绪后调试从表单发送的电子邮件,可以确保该表单也可以在线运行(除非服务器出了问题)。

声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM