<?php require_once('class.phpmailer.php'); $mailer = new PHPMailer(); $mailer->IsSMTP(); $mailer->SMTPDebug = 1; $mailer->Port = 465; //Indica a porta de conexão para a saída de e-mails $mailer->Host = 'tls://localhost'; $mailer->SMTPAuth = true; //define se haverá ou não autenticação no SMTP $mailer->Username = 'seuemail@dominio'; //Informe o e-mai o completo $mailer->Password = 'sua senha'; //Senha da caixa postal $mailer->FromName = 'seu nome'; //Nome que será exibido para o destinatário $mailer->From = 'seuemail@dominio'; //Obrigatório ser a mesma caixa postal indicada em "username" $mailer->AddAddress('destinatario@dominio','Nome do destinatário'); //Destinatários $mailer->Subject = 'Teste enviado através do PHP Mailer'; $mailer->Body = 'Este é um teste realizado com o PHP Mailer'; if(!$mailer->Send()) { echo "Message was not sent"; echo "Mailer Error: " . $mailer->ErrorInfo; exit; } print "E-mail enviado!" ?>
$mailer->Port = 465; //Indica a porta de conexão para a saída de e-mails $mailer->Host = 'tls://localhost';
A conexão segura TLS tem que ser habilitada para que os envios sejam validados.
Atenção: O código mencionado acima é somente uma sugestão. Caso haja dúvidas quanto sua utilização, sugerimos que verifique juntamente a um desenvolvedor de sua confiança.
Veja também
- PHP Mail – Como enviar e-mails utilizando a função Mail nativa do PHP
- Limite para envio e recebimento de e-mails na revenda
O artigo ajudou ?
SimNão
Jestem pod wrażeniem Twojej przenikliwości fakty i pisanie umiejętność złożoną problem dostępną Nadmierną pracę|To wyślij to klejnot Więc uszczęśliwiony przyniosłem to|Ty zmusić, aby niesamowite zdolność wydziału do ustawiania atrakcyjna treść|To pismo na najwyższym poziomie zdobyłeś unfamiliar obserwującego|Twój enter był zarówno wnikliwy, jak i uroczo napisany|Jestem zdumiony podczas jak wiele au fait z tego posta|wykonujesz adept pracę To dispatch jest ratyfikacją o tym} {https://kredytero.pl|kredytero.pl|kredyt|kredyty|kredyt online|kredyty online|kredyt przez internet|kredyty przez internet}!
This actually answered my downside, thanks!
Pretty section of content. I just stumbled upon your site and in accession capital to assert that I acquire in fact enjoyed account your blog posts. Anyway I will be subscribing to your augment and even I achievement you access consistently quickly.
It’s really a cool and helpful piece of info. I’m glad that you shared this helpful info with us. Please stay us informed like this. Thanks for sharing.
You completed a number of nice points there. I did a search on the issue and found nearly all people will have the same opinion with your blog.betflik
Hi this is kind of of off topic but I was wanting to know if blogs use WYSIWYG editors or if you have to manually code with HTML. I’m starting a blog soon but have no coding know-how so I wanted to get guidance from someone with experience. Any help would be enormously appreciated!
I’m not that much of a internet reader to be honest but your sites really nice, keep it up! I’ll go ahead and bookmark your site to come back down the road. Many thanks
You completed a number of nice points there. I did a search on the issue and found nearly all people will have the same opinion with your blog.betflik