Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- <?php
- require('C:\xampp\htdocs\PHPMailer\class.phpmailer.php');
- $mail = new PHPMailer();
- $mail->IsSMTP();
- $mail->SMTPAuth = true;
- $mail->SMTPSecure ="ssl";
- $mail->SMTPDebug = 1;
- $mail->Host ="smtp.gmail.com";
- $mail->Port = 465;
- $mail->Username ="arduinoonly@gmail.com";//sender username
- $mail->Password ="arduino123";//sender password
- $mail->IsHTML(true);
- $mail->From =$mail->Username;
- $mail->FromName ="Arduino Only";
- $mail->addAddress("simpplvespa@gmail.com");
- $mail->WordWrap=50;
- $mail->Subject = "Arduino";
- $mail->Body = "Motion Detected!";
- if(!$mail->Send()){
- echo "Message Not sent!";
- echo 'Mailer error: ' .$mail->ErrorInfo;
- }else{
- echo "Message sent!";
- }
- ?>
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement