Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- <?php
- /**
- * descricao EmailEnviar
- *
- * @author adrianosites.com.br
- */
- class EmailEnviar extends PHPMailer {
- /**
- * inicia os dados de conexao com o host
- *
- */
- function __construct() {
- $this->isSMTP();
- $this->isHTML(true);
- $this->CharSet = 'UTF-8';
- $this->Port = 587;
- $this->SMTPDebug = 0;
- $this->SMTPSecure = "tls";
- $this->Host = 'smtp-mail.outlook.com';
- $this->SMTPAuth = true;
- $this->Username = "janainatutor@hotmail.com";
- $this->Password = "xxxxxxxxx"; // SMTP account password
- //$this->SetFrom('janainatutor@hotmail.com', 'Adriano sites php imoveis');
- $this->From = 'janainatutor@hotmail.com';
- $this->FromName = 'Acordo Imóvel';
- }
- /**
- *
- * @param type $destinatario
- * @param type $assunto
- * @param type $msg
- *
- * envia o email
- */
- public function Enviar($destinatario,$assunto,$msg) {
- $this->Subject = $assunto;
- $this->addAddress($destinatario);
- $this->Body = $msg;
- if(parent::send()):
- parent::clearAllRecipients();
- else:
- echo 'erro no envio' . $this->ErrorInfo ;
- endif;
- }
- }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement