Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- $mail = new PHPMailer();
- $mail->IsSMTP();
- $mail->Host = "smtp.gmail.com";
- $mail->Port = 587;
- $mail->SMTPSecure = "tls";
- $mail->SMTPAuth = true;
- $mail->Username = "email@gmail.com";
- $mail->Password = "senha";
- $mail->From = email@origem.com;
- $mail->FromName = "Nome Origem";
- $mail->AddAddress("email@destinatario.com", "Nome destinatário");
- $mail->IsHTML(true);
- $mail->Charset = "utf-8";
- $mail->Subject = "Assunto da mensagem";
- $mail->Body = "Corpo da mensagem;
- if ($mail->Send()) {
- echo "Enviado com sucesso!";
- } else {
- echo "Erro ao enviar!";
- }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement