Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- $Email = new PHPMailer;
- $Email->IsSMTP();
- $Email->Host = "mail.cliqueipet.com.br";
- $Email->SMTPAuth = false;
- $Email->IsHTML(true);
- $Email->Username = "xxxx";
- $Email->Password = "xxxx";
- $Email->SMTPSecure = "tls";
- //$Email->SMTPDebug = 2;
- $Email->From = "convites@xxx.com.br";
- $Email->CharSet = "UTF-8";
- $Email->FromName = $Nome . " - Festa na Vila das Pitangas";
- //here is i am adding address
- for($i=0; $i<count($email); $i++):
- $Email->AddAddress($email[$i]);
- endfor;
- $Email->Port = 587;
- $Email->Subject = " Convite para festa de $Nome na Vila das Pitangas. ";
- for($i=0; $i<count($email); $i++):
- $mail->addAddress($email[$i]);
- $mail->Subject = 'Convite para festa de $Nome na Vila das Pitangas.';
- $mail->Body = '<your mail body here>';
- if(!$mail->send()) {
- echo 'Message was not sent.';
- echo 'Mailer error: ' . $mail->ErrorInfo;
- } else {
- echo 'Message has been sent.';
- }
- endfor; //this should end when ur first email sent
- $bcc_emails = "info@live.com;other@hotmail.com";
- $bcc_emails_array = explode(";", $bcc_emails);
- foreach($bcc_emails_array as $email)
- {
- $mail->addBCC($email);
- }
Add Comment
Please, Sign In to add comment