While I working on a PHP script, sometimes it need to send emails. To see the progress I have to upload the full project online. Is there any way to setting up a mail server in my local machine? I'm using windows 8.
可以将文章内容翻译成中文,广告屏蔽插件可能会导致该功能失效(如失效,请关闭广告屏蔽插件后再试):
问题:
回答1:
Use a STMP Mail class and you can send it for example via Google Mail. No need to upload it on your server then.
回答2:
PHPMailer
is a full featured email transfer Class for PHP supporting SMTP and POP3. So you not need to setup mail server on your pc. It works on localhost too.
Class Features
- Probably the world's most popular code for sending email from PHP!
- Used by many open-source projects: Drupal, SugarCRM, Yii, Joomla! and many more
- Integrated SMTP support - send without a local mail server
- Send emails with multiple TOs, CCs, BCCs and REPLY-TOs
- Multipart/alternative emails for mail clients that do not read HTML email
- Support for 8bit, base64, binary, and quoted-printable encoding
- SMTP authentication with LOGIN, PLAIN, NTLM and CRAM-MD5 mechanisms
- Native language support
- Compatible with PHP 5.0 and later
- Much more!
Githup Repo and more about it