Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- .user.ini
- authmail.debug = Off
- authmail.port = 587
- authmail.address = "email@gmail.com"
- authmail.smtp_account = "email=gmail.com"
- authmail.smtp = "smtp.gmail.com"
- php_value authmail.password = "senha"
- <?php
- $headers = "Content-type:text/html; charset=utf-8";
- $destino = $email1;
- $de = utf8_decode("Contrato - ".$pro."");
- $assunto = $menutitle;
- include ("../email/htmladm.php");
- include ("class.phpmailer.php");
- $mail = new PHPMailer();// Inicia a classe PHPMailer
- // Define os dados do servidor e tipo de conexão
- // =-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=
- $mail->IsSMTP(); // Define que a mensagem será SMTP
- $mail->SMTPAuth = true; // Usar autenticação SMTP (obrigatório para smtp.seudomínio.com.br)
- $mail->Host = "smtp.gmail.com"; // Endereço do servidor SMTP (caso queira utilizar a autenticação, utilize o host smtp.seudomínio.com.br)
- $mail->Port = 587;
- $mail->Username = ("email@gmail.com");
- $mail->Password = ("senha");
- $mail->SMTPSecure = "tls";
- $mail->Mailer = ("mail");
- // Define o remetente
- // =-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=
- $mail->Sender = $email; // Seu e-mail
- $mail->From = utf8_decode($email); // Seu e-mail
- $mail->FromName = $de; // Seu nome
- $mail->Subject = utf8_decode($assunto);
- $mail->IsHTML(true);
- $mail->MsgHTML($html);
- $mail->Body = $html;
- $mail->AddAddress ($destino);
- $mail->AddReplyTo("$email","$nome");
- $mail->Wordwrap = 50;
- //$mail->Addbcc ($para);
- //$mail->AddCC('ciclano@site.net', 'Ciclano'); // Copia
- //$mail->AddBCC('fulano@dominio.com.br', 'Fulano da Silva'); // Cópia Oculta
- //$mail->CharSet = 'iso-8859-1'; // Charset da mensagem (opcional)
- //$mail->AddAttachment("/home/login/documento.pdf", "novo_nome.pdf"); // Insere um anexo
- $mail->Send($headers, $destino, $html);
- $mail->ClearAllRecipients();
- $mail->ClearAttachments();
- ?>
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement