PABX criado para pesquisas
You can not select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
 
 
 
 
 
 

70 lines
4.1 KiB

#!/usr/bin/php -q
<?php
error_reporting(E_ALL);
ini_set('display_errors', true);
require ("phpmailer/class.phpmailer.php");
echo "Enviando Email" . "\r\n";
$mail = new PHPMailer(true);
try {
//Configurações do Servidor
$mail->SMTPDebug = 2; // Enable verbose debug output
$mail->isSMTP(); // Set mailer to use SMTP
$mail->Host = 'smtp.megalink.net.br'; // Specify main and backup SMTP servers
$mail->SMTPAuth = true; // Enable SMTP authentication
$mail->Username = 'no_reply@megalink.net.br'; // SMTP username
$mail->Password = 'mega@link'; // SMTP password
//$mail->SMTPSecure = 'tls'; // Enable TLS encryption, `ssl` also accepted
$mail->Port = 587; // TCP port to connect to
//Remetente
$mail->setFrom('no-reply@megalink.net.br', 'No-Reply MegaLink');
//Recebedores
$mail->addAddress('desenvolvimento01@simplesip.com.br');
//Conteudo
$mail->isHTML(true); // Set email format to HTML
$mail->Subject = '(NO-REPLY) Segunda Via de Boleto MegaLink';
$mail->CharSet = 'UTF-8';
$mail->Body = "<div class='separator' style='clear: both; text-align: left;'>
<a href='https://2.bp.blogspot.com/-C-P-Sv-gMy8/WNkvvpDKyJI/AAAAAAAAAQs/B_N_62_KBywEqphMnopH01Od-46rbKYngCLcB/s1600/logo.png' imageanchor='1' style='margin-left: 1em; margin-right: 1em;'><img border='0' src='https://2.bp.blogspot.com/-C-P-Sv-gMy8/WNkvvpDKyJI/AAAAAAAAAQs/B_N_62_KBywEqphMnopH01Od-46rbKYngCLcB/s1600/logo.png' /></a>&nbsp; &nbsp; &nbsp;&nbsp;</div>
<div class='separator' style='clear: both; text-align: left;'>
<br /></div>
<div class='separator' style='clear: both; text-align: center;'>
<span style='font-size: large;'><b>&nbsp;Atendimento Megalink</b></span></div>
<div class='separator' style='clear: both; text-align: left;'>
<br /></div>
<div class='separator' style='clear: both; text-align: left;'>
Ola, <span style='background-color: white; color: #222222; display: inline; float: none; font-family: sans-serif; font-size: 14px; font-style: normal; font-weight: 400; letter-spacing: normal; text-align: left; text-indent: 0px; text-transform: none; white-space: normal; word-spacing: 0px;'><b>Jose Henrique Joanoni</b></div>
<br />
Voce esta recebendo em anexo sua conta com vencimento em: <b>18/01/2019</b><br />
Caso ja possua o boleto, favor desconsiderar esse e-mail.<br />
<br />
<br />
<div style='text-align: left;'>
Por favor, Nao responda esta mensagem.</div>
<div style='text-align: left;'>
<br /></div>
<div style='text-align: left;'>
Atenciosamente,</div>
<div style='text-align: left;'>
MegaLink e Servicos</div>
<div style='text-align: left;'>
www.megalink.net.br</div>
<div class='separator' style='clear: both; text-align: center;'>
<a href='https://1.bp.blogspot.com/-sED8XKW6UXQ/WNkWVhS7QFI/AAAAAAAAAQc/88ZmOI3oxlY8XgEQTewEBj_U2HNPfml_wCEw/s1600/Screenshot_1.png' imageanchor='1' style='margin-left: 1em; margin-right: 1em;'><img border='0' height='66' src='https://1.bp.blogspot.com/-sED8XKW6UXQ/WNkWVhS7QFI/AAAAAAAAAQc/88ZmOI3oxlY8XgEQTewEBj_U2HNPfml_wCEw/s200/Screenshot_1.png' width='200' /></a></div>
<div style='text-align: right;'>
<br />
<br /><div style='text-align: left;'>
<br /></div>
</div>";
$mail->send();
echo "Email enviado com sucesso.";
} catch (Exception $e) {
$msg = $mail->ErrorInfo;
echo $msg;
}