[insert_php] require_once(ABSPATH . WPINC . '/class-phpmailer.php');
require_once(ABSPATH . WPINC . '/class-smtp.php');

$name = $_POST['your_name'];
$email = $_POST['your_email'];
$tel = $_POST['your_tel'];
$enquiry = $_POST['your_enquiry'];

/*
To:
lestudioballet@gmail.com

From:
web@lestudioballet.com

Subject:
LSB General Enquiry

Additional Headers:
Cc: maytsang@gmail.com
Reply-To: [your-email]

Message Body:
[your-name] [your-email] [your-tel] [your-enquiry] */

$mail = new PHPMailer();

$mail->SMTPDebug = true;

$mail->isSMTP();
$mail->Host = 'email-smtp.us-east-1.amazonaws.com';
$mail->Port = 465;
$mail->SMTPAuth = true;
$mail->Username = 'AKIAJYOCRDVEBQHYQESQ';
$mail->Password = 'AmK+DP5GHGIIK+Oyxda/+AkOecxQBp2aCD1KRM+PQ9kT';
$mail->SMTPSecure = 'ssl';

$mail->From = 'web@lestudioballet.com';
$mail->FromName = 'WordPress';

$mail->addAddress('lestudioballet@gmail.com');
// $mail->addAddress('kw.leowong@gmail.com');

$mail->addReplyTo($email);

$mail->addBCC("maytsang@gmail.com");
// $mail->addBCC("algotechltd.hk@gmail.com");

$subject = "LSB General Enquiry";

$body = "$name
$email
$tel
$enquiry";

$mail->WordWrap = 50;

$mail->isHTML(true);

$mail->CharSet = 'UTF-8';

$mail->Subject = $subject;

$mail->Body = $body;

if(!$mail->send())
{
echo '

'.$mail->ErrorInfo.'

';
}
else
{
echo '

';
}
[/insert_php]