Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- PHP 5.2.14 (cli) (built: Jul 27 2010 10:49:36)
- Copyright (c) 1997-2010 The PHP Group
- Zend Engine v2.2.0, Copyright (c) 1998-2010 Zend Technologies
- require("PHPMailer_5.2.1/class.phpmailer.php");
- $mail = new PHPMailer();
- $mail->IsSMTP();
- $mail->Mailer = "smtp";
- $mail->Host = "ssl://smtp.live.com";
- $mail->Port = 587;
- $mail->SMTPAuth = true;
- $mail->Username = "some_email@hotmail.nl";
- $mail->Password = "password";
- $mail->From = "some_email@hotmail.nl";
- $mail->AddAddress("some_other_email@hotmail.nl");
- $mail->Subject = "Subject";
- $mail->Body = "Hi!";
- if(!$mail->Send()) {
- echo 'Message was not sent.';
- echo 'Mailer error: ' . $mail->ErrorInfo;
- } else {
- echo 'Message has been sent.';
- Message was not sent.Mailer error: The following From address failed: some_email@hotmail.nl
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement