Created
August 11, 2018 05:49
-
-
Save ShiponKarmakar/5673846eb7a373bc83e9cbe106d1f26e to your computer and use it in GitHub Desktop.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
<?php | |
require_once "Mail.php"; | |
$from = "Sandra Sender <[email protected]>"; | |
$to = "Ramona Recipient <[email protected]>"; | |
$subject = "Hi!"; | |
$body = "Hi,\n\nHow are you?"; | |
$host = "fortune.solidhosting.pro"; | |
$port = "587"; | |
$username = "info@shipon .com"; | |
$password = "8vabTURf%j+G"; | |
$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("<p>" . $mail->getMessage() . "</p>"); | |
} else { | |
echo("<p>Message successfully sent!</p>"); | |
} | |
?> |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment