User Profile
-
Ravi Kumar started a new conversation Sending mail through SMTP in php 6 years ago ago
I am trying to use this However that gives me error .
require_once "Mail.php"; $from = "Sandra Sender"; $to = "Ramona Recipient "; $subject = "Hi!"; $body = "Hi,\n\nHow are you?"; $host = "tls://smtp.googlemail.com"; $port = "587"; $username = "ravi@gmail.com"; $password = "*****"; $headers = array ('From' => $from, 'To' => $to, 'Subject' => $subject); $smtp = Mail::factory('smtp', array ('host' => $host, 'port' => $port, 'auth' => true, 'username' => $username, 'password' => $password)); $mail = $smtp->send($to, $headers, $body); if (PEAR::isError($mail)) { echo(" " . $mail->getMessage() . "
"); } else { echo("Message successfully sent!
"); } -
Ravi Kumar started a new conversation Send mail through core php 6 years ago ago
I am trying to use this However that gives me error .
How can i send mail through basic mail() function of core php