Email: Difference between revisions
No edit summary |
add info about using PHPMailer in conjunction with Google's SMTP server |
||
| Line 9: | Line 9: | ||
== HOWTO == | == HOWTO == | ||
=== My website needs a contact form === | === My website needs a contact form === | ||
If you want to add email to your PHP application or website, then | If you want to add email to your PHP application or website, then use https://github.com/PHPMailer/PHPMailer (or many fine alternatives). Don't use PHP's mail function unless you are really going for basic messaging to yourself only. And, you can use Google's SMTP server to send so you don't have to get blocked and deal with all kinds of other crap. | ||
Make sure your server IP is not blacklisted or firewalled. Telnet to Google: | |||
<source lang="bash"> | |||
telnet smtp.gmail.com 25 | |||
# then | |||
^] # get a telnet prompt | |||
quit [enter] | |||
</source> | |||
Check your server IP with a tool like http://mxtoolbox.com/blacklists.aspx | |||
=== My wiki won't send email === | === My wiki won't send email === | ||