Advertisement
Guest User

Untitled

a guest
Aug 17th, 2017
461
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
PHP 0.87 KB | None | 0 0
  1. <?php
  2. include ("smtp.class.php");
  3.  
  4. /* Configuração da classe.smtp.php */
  5. $host = array("host" => "mail.luanrodrigues.com.br"); /*host do servidor SMTP */
  6. $smtp = new Smtp($host);
  7. $smtp->user = "luan@luanrodrigues.com.br"; /*usuario do servidor SMTP */
  8. $smtp->pass = "luan1100229933@#"; /* senha dousuario do servidor SMTP*/
  9. $smtp->debug =true; /* ativar a autenticação SMTP*/
  10.  
  11. /* envia uma mensagem */
  12. $from= "luan@luanrodrigues.com.br"; /* seu e-mail */
  13. $to = "luan@titux.com.br"; /* o e-mail cadastrado*/
  14. $subject = "Teste de e-mail utilizando SMTP"; /* assunto da mensagem */
  15. $msg = "Você está recebendo esta mensagem de teste<br>";
  16. //$msg .= array("Para confirma clique no link abaixo");
  17. $arr_send = array('recipients'=> array($to), 'from'=> $from, 'subject'=> $subject,'body'=> $msg);
  18. if($smtp->Send($arr_send)){
  19. echo "Enviado";
  20. }
  21. else{
  22. echo "Nao Enviado";
  23. }
  24. ?>
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement