Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- <?php
- require_once "Mail.php";
- $htmlcontent = "Hi, How are you?";
- $host = "smtp.indianvisaservice.org.in";
- $port = "587";
- $username = "support@indianvisaservice.org.in";
- $password = "somepassword";
- $replyto = "support@indianvisaservice.org";
- $to = "imthegrv@gmail.com";
- $subject = "Complete Your e-Visa Application-".$appid."";
- $from = "support@indianvisaservice.org.in";
- $headers = array ('From' => $from,
- 'To' => $to,
- 'Reply-To' => $replyto,
- 'Subject' => $subject,
- 'MIME-Version' => '1.0',
- 'Content-Type' => "text/html; charset=ISO-8859-1");
- $smtp = Mail::factory('smtp',
- array ('host' => $host,
- 'port' => $port,
- 'auth' => true,
- 'socket_options' => array('ssl' => array('verify_peer_name' => false)),
- 'username' => $username,
- 'password' => $password));
- $recipients = $to;
- $mail = $smtp->send($recipients, $headers, $htmlContent);
- if (PEAR::isError($mail)) {
- echo("<p>" . $mail->getMessage() . "</p>");
- } else {
- echo "Sent Successfully.";
- }
- ?>
Add Comment
Please, Sign In to add comment