Advertisement
Guest User

Untitled

a guest
Mar 2nd, 2019
294
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 0.50 KB | None | 0 0
  1. <?php
  2.  
  3. require('mail/class.phpmailer.php');
  4.  
  5. $mail = new PHPmailer();
  6. $mail->IsSMTP();
  7. $mail->Host='in.mailjet.com';
  8. $mail->SMTPAuth=true;
  9. $mail->SMTPSecure = 'ssl';
  10. $mail->Port = 465;
  11. $mail->Username='xxx' ;
  12. $mail->Password='xxx' ;
  13. $mail->From='contact@creanims.com';
  14. $mail->AddAddress('hgus@hotmail.fr');
  15. $mail->Subject='Objet du message';
  16. $mail->Body='Votre message';
  17.  
  18. if(!$mail->Send()){
  19. echo $mail->ErrorInfo;
  20. }
  21. else{
  22. echo 'Mail envoyé avec succès';
  23. }
  24.  
  25. ?>
  26.  
  27. $mail->SetFrom('contact@creanims.com');
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement