November 1, 2012 at 13:45 /
I use the wp_mail() function, that uses mail() by default but has an SMTP too. It’s not easy to activate, but if you edit the following code with your details and add it to easyReservations.php or better as an own wordpress plugin (copy, rename & edit hello.php in /wp-content/plugins/) it should work.
1 2 3 4 5 6 7 8 9 10 11 12 13 |
function smtp_wp_mail($phpmailer) { $phpmailer->IsSMTP(); // telling the class to use SMTP $phpmailer->Host = "smtp.example.com"; // set the SMTP server host $phpmailer->Port = 465; // set the SMTP server port $phpmailer->SMTPSecure = "ssl"; // enable SMTP via SSL $phpmailer->SMTPAuth = true; // enable SMTP authentication $phpmailer->Username = "wordpress@example.com"; // set the SMTP account username $phpmailer->Password = "SECRETPASSWORD"; // set the SMTP account password return $phpmailer; } add_action("phpmailer_init", "smtp_wp_mail"); |