<?php

use PHPMailer\PHPMailer\PHPMailer;
use PHPMailer\PHPMailer\Exception;

require 'autoload.php';
function smtp_mailer($to,$subject,$msg){
    $mail = new PHPMailer();


// 	$mail->SMTPDebug = 2;									
	$mail->isSMTP();										
	$mail->Host	 = 'mail.addmyentry.com;';				
	$mail->SMTPAuth = true;							
	$mail->Username = 'admin@addmyentry.com';				
	$mail->Password = '$)kcy06W%(+7';					
	$mail->SMTPSecure = 'ssl';							
	$mail->Port	 = 465;

	$mail->setFrom('admin@addmyentry.com');		
	$mail->addAddress($to);

	$mail->isHTML(true);								
	$mail->Subject = $subject;
	$mail->Body = $msg;
	if(!$mail->send()){
		echo $mail->ErrorInfo;
	}else{
		// echo 'Sent';
	}
}
?>
