Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- <?php
- require_once('class.phpmailer.php');
- $mail = new PHPMailer();
- $mail->IsSMTP();
- $mail->CharSet="UTF-8";
- $mail->SMTPSecure = 'tls';
- $mail->Host = 'smtp.gmail.com';
- $mail->Port = 587;
- $mail->Username = 'mailsemillas@gmail.com';
- $mail->Password = 'agente2016';
- $mail->SMTPAuth = true;
- $mail->From = 'mailsemillas@gmail.com';
- $mail->FromName = 'Mohammad Masoudian';
- $mail->AddAddress('oguisk@hotmail.com');
- $mail->AddReplyTo('oguisk@hotmail.com', 'Information');
- $mail->IsHTML(true);
- $mail->Subject = "PHPMailer Test Subject via Sendmail, basic";
- $mail->AltBody = "To view the message, please use an HTML compatible email viewer!";
- $mail->Body = "Hello";
- if(!$mail->Send())
- {
- echo "Mailer Error: " . $mail->ErrorInfo;
- }
- else
- {
- echo "Message sent!";
- }
- ?>
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement