Tag Archives: php smtp ssl

How to Send Email from a PHP Script Using SMTP Authentication

Install pear:mail, pear:net_smtp code: require_once “Mail.php”; $from = “Sandra Sender “; $to = “Ramona Recipient “; $subject = “Hi!”; $body = “Hi,\n\nHow are you?”; $host = “mail.example.com”; $username = “smtp_username”; $password = “smtp_password”; $headers = array (‘From’ => $from, ‘To’ … Continue reading

Posted in php | Tagged | Leave a comment