function sendEmail($email, $subject, $body) { require_once 'class/class.phpmailer2.php'; $connect = new db(); $mail = new PHPMailer(); $mail->IsAmazonSES(); $mail->AddAmazonSESKey($connect->aws_access_key_id, $connect->aws_secret_key); // Enable SMTP authentication $mail->CharSet = "UTF-8"; // SMTP secret $mail->From = '*****@*****.**'; $mail->FromName = 'Tabluu Support'; $mail->Subject = $subject; $mail->AltBody = $body; $mail->Body = $body; $mail->AddAddress($email); $mail->addBCC("*****@*****.**"); //if($rows->permission > 0) //$mail->addBCC($rows->usermail); //$mail->AddAddress('*****@*****.**'); $mail->Send(); $mail->ClearAllRecipients(); return; }
$plain_text = $name . ', ' . _('Your password has been reset, here\'s your new one') . ': ' . _('Password') . ': ' . $new_pass . ' ' . _('Remember to change it immediately once you log back in.'); $message = ' <p>' . $name . ',</p> <p>' . _('Your password has been reset, here\'s your new one') . ':</p> <p><strong>' . _('Password') . '</strong>: ' . $new_pass . '</p> <p>' . _('Remember to change it immediately once you log back in.') . '</p> '; //send email to me $mail = new PHPMailer(); if ($aws_key != '' && $aws_secret != '') { $mail->IsAmazonSES(); $mail->AddAmazonSESKey($aws_key, $aws_secret); } $mail->CharSet = "UTF-8"; $mail->From = $email; $mail->FromName = $company; $mail->Subject = '[' . $company . '] ' . _('Your new password'); $mail->AltBody = $plain_text; $mail->MsgHTML($message); $mail->AddAddress($email, $company); $mail->Send(); } echo true; } else { echo _('Email does not exist.'); }
} $q3 = 'SELECT from_name, from_email, reply_to FROM apps WHERE id = ' . $app; $r3 = mysqli_query($mysqli, $q3); if ($r3) { while ($row = mysqli_fetch_array($r3)) { $from_name = $row['from_name']; $from_email = $row['from_email']; $reply_to = $row['reply_to']; } } } include 'includes/helpers/class.phpmailer.php'; $mail = new PHPMailer(); if ($s3_key != '' && $s3_secret != '') { $mail->IsAmazonSES(); $mail->AddAmazonSESKey($s3_key, $s3_secret); } $mail->CharSet = "UTF-8"; $mail->From = $from_email; $mail->FromName = $from_name; $mail->Subject = $thankyou_subject; $mail->AltBody = ''; $mail->MsgHTML($thankyou_message); $mail->AddAddress($email, ''); $mail->AddReplyTo($reply_to, $from_name); $mail->Send(); } //if user sets a redirection URL if ($confirm_url != '') { header("Location: " . $confirm_url); } else {
$smtp_ssl = $row['smtp_ssl']; $smtp_username = $row['smtp_username']; $smtp_password = $row['smtp_password']; } } } for ($i = 0; $i < count($test_email_array); $i++) { //Email tag $html_text2 = str_replace('[Email]', $test_email_array[$i], $html_text); $plain_text2 = str_replace('[Email]', $test_email_array[$i], $plain_text); $title2 = str_replace('[Email]', $test_email_array[$i], $title); //send test email $mail = new PHPMailer(); if (get_app_info('s3_key') != '' && get_app_info('s3_secret') != '') { $mail->IsAmazonSES(); $mail->AddAmazonSESKey(get_app_info('s3_key'), get_app_info('s3_secret')); } else { if ($smtp_host != '' && $smtp_port != '' && $smtp_username != '' && $smtp_password != '') { $mail->IsSMTP(); $mail->SMTPDebug = 0; $mail->SMTPAuth = true; $mail->SMTPSecure = $smtp_ssl; $mail->Host = $smtp_host; $mail->Port = $smtp_port; $mail->Username = $smtp_username; $mail->Password = $smtp_password; } } $mail->Timezone = get_app_info('timezone'); $mail->CharSet = "UTF-8"; $mail->From = $from_email;
$credits = json_decode($rowmail->credits); $subject = $rowmail->subject; $body = $rowmail->body; // htmldecode($rowmail->body); $credit = $credits->{'credits'}; $date = $credits->{'date'}; // query emails followers $resultfollow = mysql_query("SELECT id,email FROM businessCustomer_{$placeId} WHERE follow = 1 LIMIT {$offsets},{$limit}"); if (mysql_num_rows($resultfollow)) { // query location profile $proResult = mysql_query("SELECT DISTINCT businessName,f.address,f.city,f.country,f.zip,f.contactNo FROM businessProfile as f WHERE f.profilePlaceId = {$placeId}"); $frow = mysql_fetch_object($proResult); $group = $rowmail->groupId; $mail = new PHPMailer(); $mail->IsAmazonSES(); $mail->AddAmazonSESKey($connect->aws_access_key_id, $connect->aws_secret_key); $mail->From = '*****@*****.**'; $mail->FromName = 'Tabluu'; while ($row2 = mysql_fetch_object($resultfollow)) { $footer = ""; //echo $row2->email.'<br/>'; if ($credit > 0) { $credit--; $id = $placeId . '|' . $row2->id; $id = base64_encode($id); $footer = '<p><strong>Powered by Tabluu & sent by:</strong><br/>' . $frow->businessName . '<br/>' . $frow->address . ' ' . $frow->city . ' ' . $frow->country . '<br/>' . $frow->contactNo . '</p>' . '<p>To unfollow or unsubscribe, please click below link:<br/>http://camrally.com/unsubscribe.php?id=' . $id . '<a/></p>'; $mail->AddAddress($row2->email); //$mail->addBCC('*****@*****.**'); $mail->Subject = $subject; $mail->Body = nl2br($body . $footer); $mail->AltBody = $body . $footer;