Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- function Email($to, $subject, $body)
- {
- require 'inc/PHPMailerAutoload.php';
- $mail = new PHPMailer;
- //$mail->SMTPDebug = 3; // Enable verbose debug output
- $mail->isSMTP(); // Set mailer to use SMTP
- $mail->Host = 'smtp.zoho.com'; // Specify main and backup SMTP servers
- $mail->SMTPAuth = true; // Enable SMTP authentication
- $mail->Username = 'site@btcmodafinil.com'; // SMTP username
- $mail->Password = '6hugdKL9ThyF'; // SMTP password
- $mail->SMTPSecure = 'tls'; // Enable TLS encryption, `ssl` also accepted
- $mail->Port = 587; // TCP port to connect to
- $mail->setFrom('hello@btcmodafinil.com', 'BTC Modafinil Team');
- $mail->addAddress($to); // Add a recipient
- $mail->isHTML(true); // Set email format to HTML
- $mail->Subject = $subject;
- $mail->Body = $body;
- if(!$mail->send()) {
- return $mail->ErrorInfo;
- } else {
- return true;
- }
- }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement