Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- if(!empty($_POST)){
- foreach($_POST['ck'] as $ck){
- $msg = "<img src="http://www.site.com.br/images/$ck"width="100px" height="70px"><br>";
- // manda e-mail usuario
- $mail = new PHPMailer();
- $mail-> IsSMTP();
- $mail->CharSet = "UTF-8";
- $mail->SMTPAuth = true;
- $mail->SMTPSecure = 'tls';
- $mail->Port = 587;
- $mail->Host = "smtp.zoho.com";
- $mail->Username = "usuario@exemplo.com";
- $mail->Password = "senha";
- $mail->SetFrom("usuario@exemplo.com", "usuario");
- $mail->AddAddress("recebedor@exemplo.com", "usuario");
- $mail->Subject = "assunto";
- $mail->msgHTML($msg);
- if($mail->send()){
- echo "enviado com sucesso";
- exit();
- }else{
- echo "Erro ao enviar o email".$mail->ErrorInfo;
- }
- }
- }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement