Form to Email - Xampp, PHP, Javascript, MAC OS

故事扮演 提交于 2020-01-06 18:36:54

问题


How to test "Contact us" page that takes form input, action = "send.php" which consists of mail function? I am using Xampp on Mac OS El capitan. No mail is received in the gmail inbox!


回答1:


You can use PHPMailer class with SMTP.

Please visit PHPMailer SMTP Example

You can use Gmail SMTP server.

In this way you don't have to setup Mail Server on your OSX/Windows.




回答2:


First of all, you cannot send emails to Gmail from your local computer. 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.

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).



来源:https://stackoverflow.com/questions/36910789/form-to-email-xampp-php-javascript-mac-os

易学教程内所有资源均来自网络或用户发布的内容,如有违反法律规定的内容欢迎反馈
该文章没有解决你所遇到的问题?点击提问,说说你的问题,让更多的人一起探讨吧!