| You are here: | About>Computing & Technology>Email> How Email Works> Email Programming Tips> How to Send Email from a PHP Script Using SMTP Authentication - About Email |
![]() |
This tip is known to work withHow to Send Email from a PHP Script Using SMTP AuthenticationSending an email from a PHP script is simple, fast and easy. If it works.
PHP mail() and SMTP AuthenticationPart of what makes the PHP mail() function is so simple is its lack of flexibility. Most importantly and frustratingly, the stock mail() does not usually allow you to use the SMTP server of your choice, and it does not support SMTP authentication, required by many a mail server today, at all. Fortunately, overcoming PHP's built-in shortcomings need not be difficult, complicated or painful either. For most email uses, the free PEAR Mail package offers all the power and flexibility needed, and it authenticates with your desired outgoing mail server, too. For enhanced security, secure SSL connections are supported. Send Email from a PHP Script Using SMTP AuthenticationTo connect to an outgoing SMTP server from a PHP script using SMTP authentication and send an email:
Sending Mail from PHP Using SMTP Authentication - Example<?php Sending Mail from PHP Using SMTP Authentication and SSL Encryption - Example<?php This tip is known to work with |
Las Vegas on a BudgetFind a BargainHotel DealsCheap EatsFree AttractionsEntertainment for Less |
All Topics | Email Article | Print this Page | | ![]() |
| Advertising Info | News & Events | Work at About | SiteMap | Reprints | Help | Our Story | Be a Guide |
| User Agreement | Ethics Policy | Patent Info. | Privacy Policy | ©2008 About, Inc., A part of The New York Times Company. All rights reserved. |


