Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- <?php
- require_once("class.phpmailer.php");
- require_once("class.smtp.php");
- $email = $_GET['email'];
- $nome = $_GET['nome'];
- $mail = new PHPMailer();
- //$mail->IsSMTP();
- $mail->Host = "mail.getmyidol.com";
- //$mail->SMTPAuth = true;
- //$mail->Username = 'seumail@dominio.net';
- //$mail->Password = 'senha';
- $mail->From = 'contato@getmyidol.com';
- $mail->FromName = 'Contato Getmyidol';
- $mail->AddAddress($email, $nome);
- $mail->IsHTML(true);
- $mail->Subject = "Compra efetuada com sucesso";
- $mail->Body = "Este é o corpo da mensagem de teste, em <b>HTML</b>! :)";
- $mail->AltBody = "Este é o corpo da mensagem de teste, em Texto Plano! \r\n :)";
- //$mail->AddAttachment("c:/temp/documento.pdf", "novo_nome.pdf"); // Insere um anexo
- $enviado = $mail->Send();
- $mail->ClearAllRecipients();
- $mail->ClearAttachments();
- if ($enviado) {
- echo "E-mail enviado com sucesso!";
- } else {
- echo "Não foi possível enviar o e-mail.";
- echo "<b>Informações do erro:</b> " . $mail->ErrorInfo;
- }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement