Exemple #1
0
 public function enviarRecuperaSenha($email)
 {
     ## Declarando os models usados ##
     $model_usuario = new Cadastros_Model_Usuarios();
     $mail = new PHPMailer();
     ## Dados do Usuário ##
     $dados = $model_usuario->emailUsuario("usuario", "email_usuario= '{$email}'");
     // Define o idoma
     // =-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=
     $mail->setLanguage('br', 'library/PHPMailer/language/');
     // Define os dados do servidor e tipo de conexão
     // =-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=
     $mail->IsSMTP();
     // Define que a mensagem será SMTP
     $mail->SMTPAuth = true;
     // Usa autenticação SMTP? (opcional)
     $mail->Host = "smtp.gmail.com";
     // Endereço do servidor SMTP
     $mail->Username = '******';
     // Usurio do servidor SMTP
     $mail->Password = '******';
     // Senha do servidor SMTP
     $mail->Port = 465;
     $mail->SMTPSecure = "ssl";
     // sets the prefix to the servier
     // Define o remetente
     // =-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=
     $mail->From = "*****@*****.**";
     // Seu e-mail
     $mail->FromName = "JM Pneus e Renovadora Ltda.";
     // Seu nome
     // Define os destinatário(s)
     // =-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=
     $mail->AddAddress($dados['email_usuario'], $dados['nome_usuario']);
     //Cópia do Usuário
     //        $mail->AddBCC($vendedor['EMAIL'], $nome_cliente); //Cópia Oculta para o Vendedor
     //        $mail->AddAddress('*****@*****.**', $dados['nome_usuario']);
     //        $mail->AddAddress('*****@*****.**', $nome_cliente);
     //        $mail->AddCC('*****@*****.**', $nome_cliente); // Copia
     // Define os dados técnicos da Mensagem
     // =-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=
     $mail->IsHTML(true);
     // Define que o e-mail será enviado como HTML
     $mail->CharSet = 'utf-8';
     // Define a mensagem (Texto e Assunto)
     // =-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=
     $mail->Subject = "Recuperação de Senha";
     // Assunto da mensagem
     ## Corpo da Mensagem em HTML##
     $mail->Body = "<!doctype html>\n<html xmlns='http://www.w3.org/1999/xhtml' xmlns:v='urn:schemas-microsoft-com:vml' xmlns:o='urn:schemas-microsoft-com:office:office'>\n    <head>\n    \t<!-- NAME: VIGNELLI -->\n        <!--[if gte mso 15]>\n\t\t<xml>\n\t\t\t<o:OfficeDocumentSettings>\n\t\t\t<o:AllowPNG/>\n\t\t\t<o:PixelsPerInch>96</o:PixelsPerInch>\n\t\t\t</o:OfficeDocumentSettings>\n\t\t</xml>\n\t\t<![endif]-->\n\t\t<meta charset='UTF-8'>\n        <meta http-equiv='X-UA-Compatible' content='IE=edge'>\n        <meta name='viewport' content='width=device-width, initial-scale=1'>\n\t\t<title>*|MC:SUBJECT|*</title>\n        \n    <style type='text/css'>\n\t\tp{\n\t\t\tmargin:10px 0;\n\t\t\tpadding:0;\n\t\t}\n\t\ttable{\n\t\t\tborder-collapse:collapse;\n\t\t}\n\t\th1,h2,h3,h4,h5,h6{\n\t\t\tdisplay:block;\n\t\t\tmargin:0;\n\t\t\tpadding:0;\n\t\t}\n\t\timg,a img{\n\t\t\tborder:0;\n\t\t\theight:auto;\n\t\t\toutline:none;\n\t\t\ttext-decoration:none;\n\t\t}\n\t\tbody,#bodyTable,#bodyCell{\n\t\t\theight:100%;\n\t\t\tmargin:0;\n\t\t\tpadding:0;\n\t\t\twidth:100%;\n\t\t}\n\t\t#outlook a{\n\t\t\tpadding:0;\n\t\t}\n\t\timg{\n\t\t\t-ms-interpolation-mode:bicubic;\n\t\t}\n\t\ttable{\n\t\t\tmso-table-lspace:0pt;\n\t\t\tmso-table-rspace:0pt;\n\t\t}\n\t\t.ReadMsgBody{\n\t\t\twidth:100%;\n\t\t}\n\t\t.ExternalClass{\n\t\t\twidth:100%;\n\t\t}\n\t\tp,a,li,td,blockquote{\n\t\t\tmso-line-height-rule:exactly;\n\t\t}\n\t\ta[href^=tel],a[href^=sms]{\n\t\t\tcolor:inherit;\n\t\t\tcursor:default;\n\t\t\ttext-decoration:none;\n\t\t}\n\t\tp,a,li,td,body,table,blockquote{\n\t\t\t-ms-text-size-adjust:100%;\n\t\t\t-webkit-text-size-adjust:100%;\n\t\t}\n\t\t.ExternalClass,.ExternalClass p,.ExternalClass td,.ExternalClass div,.ExternalClass span,.ExternalClass font{\n\t\t\tline-height:100%;\n\t\t}\n\t\ta[x-apple-data-detectors]{\n\t\t\tcolor:inherit !important;\n\t\t\ttext-decoration:none !important;\n\t\t\tfont-size:inherit !important;\n\t\t\tfont-family:inherit !important;\n\t\t\tfont-weight:inherit !important;\n\t\t\tline-height:inherit !important;\n\t\t}\n\t\ta.mcnButton{\n\t\t\tdisplay:block;\n\t\t}\n\t\t.mcnImage{\n\t\t\tvertical-align:bottom;\n\t\t}\n\t\t.mcnTextContent{\n\t\t\tword-break:break-word;\n\t\t}\n\t\t.mcnTextContent img{\n\t\t\theight:auto !important;\n\t\t}\n\t\t.mcnDividerBlock{\n\t\t\ttable-layout:fixed !important;\n\t\t}\n\t/*\n\t@tab Page\n\t@section background style\n\t@tip Set the background color and top border for your email. You may want to choose colors that match your company's branding.\n\t*/\n\t\tbody,#bodyTable,#templateFooter{\n\t\t\t/*@editable*/background-color:#FFFFFF;\n\t\t}\n\t/*\n\t@tab Page\n\t@section background style\n\t@tip Set the background color and top border for your email. You may want to choose colors that match your company's branding.\n\t*/\n\t\t#bodyCell{\n\t\t\t/*@editable*/border-top:4px solid #000000;\n\t\t}\n\t/*\n\t@tab Page\n\t@section heading 1\n\t@tip Set the styling for all first-level headings in your emails. These should be the largest of your headings.\n\t@style heading 1\n\t*/\n\t\th1{\n\t\t\t/*@editable*/color:#000000 !important;\n\t\t\tdisplay:block;\n\t\t\t/*@editable*/font-family:Helvetica;\n\t\t\t/*@editable*/font-size:60px;\n\t\t\t/*@editable*/font-style:normal;\n\t\t\t/*@editable*/font-weight:bold;\n\t\t\t/*@editable*/line-height:125%;\n\t\t\t/*@editable*/letter-spacing:-1px;\n\t\t\tmargin:0;\n\t\t\t/*@editable*/text-align:center;\n\t\t}\n\t/*\n\t@tab Page\n\t@section heading 2\n\t@tip Set the styling for all second-level headings in your emails.\n\t@style heading 2\n\t*/\n\t\th2{\n\t\t\t/*@editable*/color:#000000 !important;\n\t\t\tdisplay:block;\n\t\t\t/*@editable*/font-family:Helvetica;\n\t\t\t/*@editable*/font-size:26px;\n\t\t\t/*@editable*/font-style:normal;\n\t\t\t/*@editable*/font-weight:bold;\n\t\t\t/*@editable*/line-height:125%;\n\t\t\t/*@editable*/letter-spacing:normal;\n\t\t\tmargin:0;\n\t\t\t/*@editable*/text-align:center;\n\t\t}\n\t/*\n\t@tab Page\n\t@section heading 3\n\t@tip Set the styling for all third-level headings in your emails.\n\t@style heading 3\n\t*/\n\t\th3{\n\t\t\t/*@editable*/color:#000000 !important;\n\t\t\tdisplay:block;\n\t\t\t/*@editable*/font-family:Helvetica;\n\t\t\t/*@editable*/font-size:20px;\n\t\t\t/*@editable*/font-style:normal;\n\t\t\t/*@editable*/font-weight:bold;\n\t\t\t/*@editable*/line-height:125%;\n\t\t\t/*@editable*/letter-spacing:normal;\n\t\t\tmargin:0;\n\t\t\t/*@editable*/text-align:center;\n\t\t}\n\t/*\n\t@tab Page\n\t@section heading 4\n\t@tip Set the styling for all fourth-level headings in your emails. These should be the smallest of your headings.\n\t@style heading 4\n\t*/\n\t\th4{\n\t\t\t/*@editable*/color:#000000 !important;\n\t\t\tdisplay:block;\n\t\t\t/*@editable*/font-family:Helvetica;\n\t\t\t/*@editable*/font-size:16px;\n\t\t\t/*@editable*/font-style:normal;\n\t\t\t/*@editable*/font-weight:bold;\n\t\t\t/*@editable*/line-height:125%;\n\t\t\t/*@editable*/letter-spacing:normal;\n\t\t\tmargin:0;\n\t\t\t/*@editable*/text-align:left;\n\t\t}\n\t/*\n\t@tab Preheader\n\t@section preheader style\n\t@tip Set the background color and borders for your email's preheader area.\n\t*/\n\t\t#templatePreheader{\n\t\t\t/*@editable*/background-color:#FFFFFF;\n\t\t\t/*@editable*/border-top:0;\n\t\t\t/*@editable*/border-bottom:1px solid #000000;\n\t\t}\n\t/*\n\t@tab Preheader\n\t@section preheader text\n\t@tip Set the styling for your email's preheader text. Choose a size and color that is easy to read.\n\t*/\n\t\t.preheaderContainer .mcnTextContent,.preheaderContainer .mcnTextContent p{\n\t\t\t/*@editable*/color:#000000;\n\t\t\t/*@editable*/font-family:Helvetica;\n\t\t\t/*@editable*/font-size:11px;\n\t\t\t/*@editable*/line-height:125%;\n\t\t\t/*@editable*/text-align:left;\n\t\t}\n\t/*\n\t@tab Preheader\n\t@section preheader link\n\t@tip Set the styling for your email's header links. Choose a color that helps them stand out from your text.\n\t*/\n\t\t.preheaderContainer .mcnTextContent a{\n\t\t\t/*@editable*/color:#000000;\n\t\t\t/*@editable*/font-weight:bold;\n\t\t\t/*@editable*/text-decoration:none;\n\t\t}\n\t/*\n\t@tab Header\n\t@section header style\n\t@tip Set the background color and borders for your email's header area.\n\t*/\n\t\t#templateHeader{\n\t\t\t/*@editable*/background-color:#FFFFFF;\n\t\t\t/*@editable*/border-top:0;\n\t\t\t/*@editable*/border-bottom:0;\n\t\t}\n\t/*\n\t@tab Header\n\t@section header text\n\t@tip Set the styling for your email's header text. Choose a size and color that is easy to read.\n\t*/\n\t\t.headerContainer .mcnTextContent,.headerContainer .mcnTextContent p{\n\t\t\t/*@editable*/color:#000000;\n\t\t\t/*@editable*/font-family:Helvetica;\n\t\t\t/*@editable*/font-size:15px;\n\t\t\t/*@editable*/line-height:150%;\n\t\t\t/*@editable*/text-align:left;\n\t\t}\n\t/*\n\t@tab Header\n\t@section header link\n\t@tip Set the styling for your email's header links. Choose a color that helps them stand out from your text.\n\t*/\n\t\t.headerContainer .mcnTextContent a{\n\t\t\t/*@editable*/color:#ED1B24;\n\t\t\t/*@editable*/font-weight:bold;\n\t\t\t/*@editable*/text-decoration:none;\n\t\t}\n\t/*\n\t@tab Body\n\t@section body style\n\t@tip Set the background color and borders for your email's body area.\n\t*/\n\t\t#templateBody{\n\t\t\t/*@editable*/background-color:#FFFFFF;\n\t\t\t/*@editable*/border-top:0;\n\t\t\t/*@editable*/border-bottom:0;\n\t\t}\n\t/*\n\t@tab Body\n\t@section body text\n\t@tip Set the styling for your email's body text. Choose a size and color that is easy to read.\n\t*/\n\t\t.bodyContainer .mcnTextContent,.bodyContainer .mcnTextContent p{\n\t\t\t/*@editable*/color:#000000;\n\t\t\t/*@editable*/font-family:Helvetica;\n\t\t\t/*@editable*/font-size:15px;\n\t\t\t/*@editable*/line-height:150%;\n\t\t\t/*@editable*/text-align:left;\n\t\t}\n\t/*\n\t@tab Body\n\t@section body link\n\t@tip Set the styling for your email's body links. Choose a color that helps them stand out from your text.\n\t*/\n\t\t.bodyContainer .mcnTextContent a{\n\t\t\t/*@editable*/color:#ED1B24;\n\t\t\t/*@editable*/font-weight:bold;\n\t\t\t/*@editable*/text-decoration:none;\n\t\t}\n\t/*\n\t@tab Footer\n\t@section footer style\n\t@tip Set the borders for your email's footer area.\n\t*/\n\t\t#templateFooter{\n\t\t\t/*@editable*/border-top:0;\n\t\t\t/*@editable*/border-bottom:0;\n\t\t}\n\t/*\n\t@tab Footer\n\t@section footer text\n\t@tip Set the styling for your email's footer text. Choose a size and color that is easy to read.\n\t*/\n\t\t.footerContainer .mcnTextContent,.footerContainer .mcnTextContent p{\n\t\t\t/*@editable*/color:#000000;\n\t\t\t/*@editable*/font-family:Helvetica;\n\t\t\t/*@editable*/font-size:11px;\n\t\t\t/*@editable*/line-height:125%;\n\t\t\t/*@editable*/text-align:center;\n\t\t}\n\t/*\n\t@tab Footer\n\t@section footer link\n\t@tip Set the styling for your email's footer links. Choose a color that helps them stand out from your text.\n\t*/\n\t\t.footerContainer .mcnTextContent a{\n\t\t\t/*@editable*/color:#000000;\n\t\t\t/*@editable*/font-weight:bold;\n\t\t\t/*@editable*/text-decoration:none;\n\t\t}\n\t@media only screen and (max-width: 480px){\n\t\tbody,table,td,p,a,li,blockquote{\n\t\t\t-webkit-text-size-adjust:none !important;\n\t\t}\n\n}\t@media only screen and (max-width: 480px){\n\t\tbody{\n\t\t\twidth:100% !important;\n\t\t\tmin-width:100% !important;\n\t\t}\n\n}\t@media only screen and (max-width: 480px){\n\t\t.templateContainer{\n\t\t\tmax-width:600px !important;\n\t\t\twidth:100% !important;\n\t\t}\n\n}\t@media only screen and (max-width: 480px){\n\t\t.mcnImage{\n\t\t\theight:auto !important;\n\t\t\twidth:100% !important;\n\t\t}\n\n}\t@media only screen and (max-width: 480px){\n\t\t.mcnShareContent,.mcnCaptionTopContent,.mcnCaptionBottomContent,.mcnTextContentContainer,.mcnBoxedTextContentContainer,.mcnImageGroupContentContainer,.mcnCaptionLeftTextContentContainer,.mcnCaptionRightTextContentContainer,.mcnCaptionLeftImageContentContainer,.mcnCaptionRightImageContentContainer,.mcnImageCardLeftTextContentContainer,.mcnImageCardRightTextContentContainer{\n\t\t\tmax-width:100% !important;\n\t\t\twidth:100% !important;\n\t\t}\n\n}\t@media only screen and (max-width: 480px){\n\t\t.mcnBoxedTextContentContainer{\n\t\t\tmin-width:100% !important;\n\t\t}\n\n}\t@media only screen and (max-width: 480px){\n\t\t.mcnImageGroupContent{\n\t\t\tpadding:9px !important;\n\t\t}\n\n}\t@media only screen and (max-width: 480px){\n\t\t.mcnCaptionLeftContentOuter .mcnTextContent,.mcnCaptionRightContentOuter .mcnTextContent{\n\t\t\tpadding-top:9px !important;\n\t\t}\n\n}\t@media only screen and (max-width: 480px){\n\t\t.mcnImageCardTopImageContent,.mcnCaptionBlockInner .mcnCaptionTopContent:last-child .mcnTextContent{\n\t\t\tpadding-top:18px !important;\n\t\t}\n\n}\t@media only screen and (max-width: 480px){\n\t\t.mcnImageCardBottomImageContent{\n\t\t\tpadding-bottom:9px !important;\n\t\t}\n\n}\t@media only screen and (max-width: 480px){\n\t\t.mcnImageGroupBlockInner{\n\t\t\tpadding-top:0 !important;\n\t\t\tpadding-bottom:0 !important;\n\t\t}\n\n}\t@media only screen and (max-width: 480px){\n\t\t.mcnImageGroupBlockOuter{\n\t\t\tpadding-top:9px !important;\n\t\t\tpadding-bottom:9px !important;\n\t\t}\n\n}\t@media only screen and (max-width: 480px){\n\t\t.mcnTextContent,.mcnBoxedTextContentColumn{\n\t\t\tpadding-right:18px !important;\n\t\t\tpadding-left:18px !important;\n\t\t}\n\n}\t@media only screen and (max-width: 480px){\n\t\t.mcnImageCardLeftImageContent,.mcnImageCardRightImageContent{\n\t\t\tpadding-right:18px !important;\n\t\t\tpadding-bottom:0 !important;\n\t\t\tpadding-left:18px !important;\n\t\t}\n\n}\t@media only screen and (max-width: 480px){\n\t\t.mcpreview-image-uploader{\n\t\t\tdisplay:none !important;\n\t\t\twidth:100% !important;\n\t\t}\n\n}\t@media only screen and (max-width: 480px){\n\t/*\n\t@tab Mobile Styles\n\t@section heading 1\n\t@tip Make the first-level headings larger in size for better readability on small screens.\n\t*/\n\t\th1{\n\t\t\t/*@editable*/font-size:24px !important;\n\t\t\t/*@editable*/line-height:125% !important;\n\t\t}\n\n}\t@media only screen and (max-width: 480px){\n\t/*\n\t@tab Mobile Styles\n\t@section heading 2\n\t@tip Make the second-level headings larger in size for better readability on small screens.\n\t*/\n\t\th2{\n\t\t\t/*@editable*/font-size:20px !important;\n\t\t\t/*@editable*/line-height:125% !important;\n\t\t}\n\n}\t@media only screen and (max-width: 480px){\n\t/*\n\t@tab Mobile Styles\n\t@section heading 3\n\t@tip Make the third-level headings larger in size for better readability on small screens.\n\t*/\n\t\th3{\n\t\t\t/*@editable*/font-size:18px !important;\n\t\t\t/*@editable*/line-height:125% !important;\n\t\t}\n\n}\t@media only screen and (max-width: 480px){\n\t/*\n\t@tab Mobile Styles\n\t@section heading 4\n\t@tip Make the fourth-level headings larger in size for better readability on small screens.\n\t*/\n\t\th4{\n\t\t\t/*@editable*/font-size:16px !important;\n\t\t\t/*@editable*/line-height:125% !important;\n\t\t}\n\n}\t@media only screen and (max-width: 480px){\n\t/*\n\t@tab Mobile Styles\n\t@section Boxed Text\n\t@tip Make the boxed text larger in size for better readability on small screens. We recommend a font size of at least 16px.\n\t*/\n\t\t.mcnBoxedTextContentContainer .mcnTextContent,.mcnBoxedTextContentContainer .mcnTextContent p{\n\t\t\t/*@editable*/font-size:18px !important;\n\t\t\t/*@editable*/line-height:125% !important;\n\t\t}\n\n}\t@media only screen and (max-width: 480px){\n\t/*\n\t@tab Mobile Styles\n\t@section Preheader Visibility\n\t@tip Set the visibility of the email's preheader on small screens. You can hide it to save space.\n\t*/\n\t\t#templatePreheader{\n\t\t\t/*@editable*/display:block !important;\n\t\t}\n\n}\t@media only screen and (max-width: 480px){\n\t/*\n\t@tab Mobile Styles\n\t@section Preheader Text\n\t@tip Make the preheader text larger in size for better readability on small screens.\n\t*/\n\t\t.preheaderContainer .mcnTextContent,.preheaderContainer .mcnTextContent p{\n\t\t\t/*@editable*/font-size:14px !important;\n\t\t\t/*@editable*/line-height:115% !important;\n\t\t}\n\n}\t@media only screen and (max-width: 480px){\n\t/*\n\t@tab Mobile Styles\n\t@section Header Text\n\t@tip Make the header text larger in size for better readability on small screens.\n\t*/\n\t\t.headerContainer .mcnTextContent,.headerContainer .mcnTextContent p{\n\t\t\t/*@editable*/font-size:18px !important;\n\t\t\t/*@editable*/line-height:125% !important;\n\t\t}\n\n}\t@media only screen and (max-width: 480px){\n\t/*\n\t@tab Mobile Styles\n\t@section Body Text\n\t@tip Make the body text larger in size for better readability on small screens. We recommend a font size of at least 16px.\n\t*/\n\t\t.bodyContainer .mcnTextContent,.bodyContainer .mcnTextContent p{\n\t\t\t/*@editable*/font-size:18px !important;\n\t\t\t/*@editable*/line-height:125% !important;\n\t\t}\n\n}\t@media only screen and (max-width: 480px){\n\t/*\n\t@tab Mobile Styles\n\t@section footer text\n\t@tip Make the body content text larger in size for better readability on small screens.\n\t*/\n\t\t.footerContainer .mcnTextContent,.footerContainer .mcnTextContent p{\n\t\t\t/*@editable*/font-size:14px !important;\n\t\t\t/*@editable*/line-height:115% !important;\n\t\t}\n\n}</style></head>\n    <body leftmargin='0' marginwidth='0' topmargin='0' marginheight='0' offset='0'>\n        \n            <table align='center' border='0' cellpadding='0' cellspacing='0' height='100%' width='100%' id='bodyTable'>\n                <tr>\n                    <td align='center' valign='top' id='bodyCell' style='padding-bottom:40px;'>\n                        <!-- BEGIN TEMPLATE // -->\n                        <table border='0' cellpadding='0' cellspacing='0' width='100%'>\n                            <tr>\n                                <td align='center' valign='top'>\n                                    <!-- BEGIN PREHEADER // -->\n                                    <table border='0' cellpadding='0' cellspacing='0' width='100%' id='templatePreheader'>\n                                        <tr>\n                                        \t<td align='center' valign='top'>\n                                                <table border='0' cellpadding='0' cellspacing='0' width='600' class='templateContainer'>\n                                                    <tr>\n                                                        <td valign='top' class='preheaderContainer' style='padding-top:10px; padding-bottom:10px'><table border='0' cellpadding='0' cellspacing='0' width='100%' class='mcnTextBlock'>\n    <tbody class='mcnTextBlockOuter'>\n        <tr>\n            <td valign='top' class='mcnTextBlockInner'>\n                \n                <table align='left' border='0' cellpadding='0' cellspacing='0' width='366' class='mcnTextContentContainer'>\n                    <tbody><tr>\n                        \n                        <td valign='top' class='mcnTextContent' style='padding-top:9px; padding-left:18px; padding-bottom:9px; padding-right:0;'>\n                        \n                            <strong><span style='background-color: #FBFBFB;font-family: sans-serif;font-size: 12px;line-height: 21px;'>JM Pneus e Renovadora Ltda.</span></strong>\n                        </td>\n                    </tr>\n                </tbody></table>\n                \n                <table align='right' border='0' cellpadding='0' cellspacing='0' width='197' class='mcnTextContentContainer'>\n                    <tbody><tr>\n                        \n                        <td valign='top' class='mcnTextContent' style='padding-top:9px; padding-right:18px; padding-bottom:9px; padding-left:0;'>\n                        \n                            <a href='*|ARCHIVE|*' target='_blank'></a><a href='http://www.omelhorcaminho.com.br' target='_blank'>Visite nosso site!</a>\n                        </td>\n                    </tr>\n                </tbody></table>\n                \n            </td>\n        </tr>\n    </tbody>\n</table></td>\n                                                    </tr>\n                                                </table>\n                                            </td>                                            \n                                        </tr>\n                                    </table>\n                                    <!-- // END PREHEADER -->\n                                </td>\n                            </tr>\n                            <tr>\n                                <td align='center' valign='top'>\n                                    <!-- BEGIN HEADER // -->\n                                    <table border='0' cellpadding='0' cellspacing='0' width='100%' id='templateHeader'>\n                                        <tr>\n                                            <td align='center' valign='top'>\n                                                <table border='0' cellpadding='0' cellspacing='0' width='600' class='templateContainer'>\n                                                    <tr>\n                                                        <td valign='top' class='headerContainer' style='padding-top:10px; padding-bottom:10px;'><table border='0' cellpadding='0' cellspacing='0' width='100%' class='mcnImageBlock' style='min-width:100%;'>\n    <tbody class='mcnImageBlockOuter'>\n            <tr>\n                <td valign='top' style='padding:0px' class='mcnImageBlockInner'>\n                    <table align='left' width='100%' border='0' cellpadding='0' cellspacing='0' class='mcnImageContentContainer' style='min-width:100%;'>\n                        <tbody><tr>\n                            <td class='mcnImageContent' valign='top' style='padding-right: 0px; padding-left: 0px; padding-top: 0; padding-bottom: 0; text-align:center;'>\n                                \n                                    \n                                        <img align='center' alt='' src='https://gallery.mailchimp.com/12f2dd44047f03156ba43ad7b/images/67fbb20f-8282-4750-993d-47192dcce229.jpg' width='180' style='max-width:180px; padding-bottom: 0; display: inline !important; vertical-align: bottom;' class='mcnImage'>\n                                    \n                                \n                            </td>\n                        </tr>\n                    </tbody></table>\n                </td>\n            </tr>\n    </tbody>\n</table><table border='0' cellpadding='0' cellspacing='0' width='100%' class='mcnDividerBlock' style='min-width:100%;'>\n    <tbody class='mcnDividerBlockOuter'>\n        <tr>\n            <td class='mcnDividerBlockInner' style='min-width:100%; padding:18px;'>\n                <table class='mcnDividerContent' border='0' cellpadding='0' cellspacing='0' width='100%' style='min-width: 100%;border-top-width: 4px;border-top-style: solid;border-top-color: #000000;'>\n                    <tbody><tr>\n                        <td>\n                            <span></span>\n                        </td>\n                    </tr>\n                </tbody></table>\n<!--            \n                <td class='mcnDividerBlockInner' style='padding: 18px;'>\n                <hr class='mcnDividerContent' style='border-bottom-color:none; border-left-color:none; border-right-color:none; border-bottom-width:0; border-left-width:0; border-right-width:0; margin-top:0; margin-right:0; margin-bottom:0; margin-left:0;' />\n-->\n            </td>\n        </tr>\n    </tbody>\n</table><table border='0' cellpadding='0' cellspacing='0' width='100%' class='mcnImageBlock' style='min-width:100%;'>\n    <tbody class='mcnImageBlockOuter'>\n            <tr>\n                <td valign='top' style='padding:9px' class='mcnImageBlockInner'>\n                    <table align='left' width='100%' border='0' cellpadding='0' cellspacing='0' class='mcnImageContentContainer' style='min-width:100%;'>\n                        <tbody><tr>\n                            <td class='mcnImageContent' valign='top' style='padding-right: 9px; padding-left: 9px; padding-top: 0; padding-bottom: 0; text-align:center;'>\n                                \n                                    \n                                        <img align='center' alt='' src='https://gallery.mailchimp.com/12f2dd44047f03156ba43ad7b/images/f3183ecc-5ad3-46c7-8c80-63aab08f730a.jpg' width='564' style='max-width:1280px; padding-bottom: 0; display: inline !important; vertical-align: bottom;' class='mcnImage'>\n                                    \n                                \n                            </td>\n                        </tr>\n                    </tbody></table>\n                </td>\n            </tr>\n    </tbody>\n</table></td>\n                                                    </tr>\n                                                </table>\n                                            </td>\n                                        </tr>\n                                    </table>\n                                    <!-- // END HEADER -->\n                                </td>\n                            </tr>\n                            <tr>\n                                <td align='center' valign='top'>\n                                    <!-- BEGIN BODY // -->\n                                    <table border='0' cellpadding='0' cellspacing='0' width='100%' id='templateBody'>\n                                        <tr>\n                                            <td align='center' valign='top'>\n                                                <table border='0' cellpadding='0' cellspacing='0' width='600' class='templateContainer'>\n                                                    <tr>\n                                                        <td valign='top' class='bodyContainer' style='padding-top:10px; padding-bottom:10px;'><table border='0' cellpadding='0' cellspacing='0' width='100%' class='mcnTextBlock'>\n    <tbody class='mcnTextBlockOuter'>\n        <tr>\n            <td valign='top' class='mcnTextBlockInner'>\n                \n                <table align='left' border='0' cellpadding='0' cellspacing='0' width='100%' class='mcnTextContentContainer'>\n                    <tbody><tr>\n                        \n                        <td valign='top' class='mcnTextContent' style='padding-top:9px; padding-right: 18px; padding-bottom: 9px; padding-left: 18px;'>\n                        \n                            <h3><em style='font-family:open sans; font-size:19px; font-stretch:inherit; line-height:31px; margin:0px; padding:0px; vertical-align:baseline'>“Os maiores inimigos do crescimento profissional são: a falta de motivação e o comodismo. É quando a pessoa não sabe aonde quer chegar e se contenta em ficar aonde está.”</em></h3>\n\n                        </td>\n                    </tr>\n                </tbody></table>\n                \n            </td>\n        </tr>\n    </tbody>\n</table><table border='0' cellpadding='0' cellspacing='0' width='100%' class='mcnTextBlock'>\n    <tbody class='mcnTextBlockOuter'>\n        <tr>\n            <td valign='top' class='mcnTextBlockInner'>\n                \n                <table align='left' border='0' cellpadding='0' cellspacing='0' width='100%' class='mcnTextContentContainer'>\n                    <tbody><tr>\n                        \n                        <td valign='top' class='mcnTextContent' style='padding-top:9px; padding-right: 18px; padding-bottom: 9px; padding-left: 18px;'>\n                        \n                            <div style='text-align: justify;'><br>\n<br>\nBem vindo a JM Pneus <span style='line-height:20.8px; text-align:justify'>&nbsp;<strong>" . $dados['nome_usuario'] . "</strong></span>! Ao receber este e-mail, significa que estamos concedendo <span style='line-height:20.8px'>a você credibilidade e confiança para manipular nossas informações e nos ajudar a atender melhor os nossos clientes. Está é uma mensagem em que iremos informar seus dados&nbsp;</span>acesso ao nosso Sistema de Gerenciamento de Pedidos.<br>\n<br>\n<span style='line-height:20.8px; text-align:justify'>Para acessa o Sistema de Pedidos, use os dados abaixo:</span><br>\n1º. Vocês consegue acessar o sistema clicando <strong><a href='http://208.43.228.122/gestaopedidos/public/index/login' target='_blank'>aqui</a></strong>.<br>\n2º. Seu Usuário será <strong>" . $dados['login_usuario'] . "</strong>.<br>\n3º. Sua senha será '<strong>jm2000</strong>'. Atente que esta senha é padrão e em seu primeiro acesso, o sistema solicitará a troca por uma senha permanente.<br>\n<br>\nViu como vai ser fácil? Agora, caso precise de ajuda, fale com o pessoal da JM que eles te indicarão uma solução ou alguém que possa te ajudar com qualquer dificuldade.<br>\n<br>\nEquipe de Suporte JM Pneus</div>\n\n                        </td>\n                    </tr>\n                </tbody></table>\n                \n            </td>\n        </tr>\n    </tbody>\n</table></td>\n                                                    </tr>\n                                                </table>\n                                            </td>\n                                        </tr>\n                                    </table>\n                                    <!-- // END BODY -->\n                                </td>\n                            </tr>\n                            <tr>\n                                <td align='center' valign='top'>\n                                    <!-- BEGIN FOOTER // -->\n                                    <table border='0' cellpadding='0' cellspacing='0' width='100%' id='templateFooter'>\n                                        <tr>\n                                            <td align='center' valign='top'>\n                                                <table border='0' cellpadding='0' cellspacing='0' width='600' class='templateContainer'>\n                                                    <tr>\n                                                        <td valign='top' class='footerContainer' style='padding-top:10px; padding-bottom:10px;'><table border='0' cellpadding='0' cellspacing='0' width='100%' class='mcnDividerBlock' style='min-width:100%;'>\n    <tbody class='mcnDividerBlockOuter'>\n        <tr>\n            <td class='mcnDividerBlockInner' style='min-width:100%; padding:18px;'>\n                <table class='mcnDividerContent' border='0' cellpadding='0' cellspacing='0' width='100%' style='min-width: 100%;border-top-width: 4px;border-top-style: solid;border-top-color: #000000;'>\n                    <tbody><tr>\n                        <td>\n                            <span></span>\n                        </td>\n                    </tr>\n                </tbody></table>\n<!--            \n                <td class='mcnDividerBlockInner' style='padding: 18px;'>\n                <hr class='mcnDividerContent' style='border-bottom-color:none; border-left-color:none; border-right-color:none; border-bottom-width:0; border-left-width:0; border-right-width:0; margin-top:0; margin-right:0; margin-bottom:0; margin-left:0;' />\n-->\n            </td>\n        </tr>\n    </tbody>\n</table><table border='0' cellpadding='0' cellspacing='0' width='100%' class='mcnFollowBlock'>\n    <tbody class='mcnFollowBlockOuter'>\n        <tr>\n            <td align='center' valign='top' style='padding:9px' class='mcnFollowBlockInner'>\n                <table border='0' cellpadding='0' cellspacing='0' width='100%' class='mcnFollowContentContainer'>\n    <tbody><tr>\n        <td align='center' style='padding-left:9px;padding-right:9px;'>\n            <table border='0' cellpadding='0' cellspacing='0' width='100%' class='mcnFollowContent'>\n                <tbody><tr>\n                    <td align='center' valign='top' style='padding-top:9px; padding-right:9px; padding-left:9px;'>\n                        <table border='0' cellpadding='0' cellspacing='0'>\n                            <tbody><tr>\n                                <td valign='top'>\n                                    <!--[if mso]>\n                                    <table align='left' border='0' cellspacing='0' cellpadding='0' width='524'>\n                                    <tr>\n                                    <td align='left' valign='top' width='524'>\n                                    <![endif]-->\n                                    \n                                        \n                                        \n                                            <table align='left' border='0' cellpadding='0' cellspacing='0'>\n                                                <tbody><tr>\n                                                    <td valign='top' style='padding-right:10px; padding-bottom:9px;' class='mcnFollowContentItemContainer'>\n                                                        <table border='0' cellpadding='0' cellspacing='0' width='100%' class='mcnFollowContentItem'>\n                                                            <tbody><tr>\n                                                                <td align='left' valign='middle' style='padding-top:5px; padding-right:10px; padding-bottom:5px; padding-left:9px;'>\n                                                                    <table align='left' border='0' cellpadding='0' cellspacing='0' width=''>\n                                                                        <tbody><tr>\n                                                                            \n                                                                                <td align='center' valign='middle' width='24' class='mcnFollowIconContent'>\n                                                                                    <a href='http://www.facebook.com' target='_blank'><img src='http://cdn-images.mailchimp.com/icons/social-block-v2/dark-facebook-48.png' style='display:block;' height='24' width='24' class=''></a>\n                                                                                </td>\n                                                                            \n                                                                            \n                                                                        </tr>\n                                                                    </tbody></table>\n                                                                </td>\n                                                            </tr>\n                                                        </tbody></table>\n                                                    </td>\n                                                </tr>\n                                            </tbody></table>\n                                        \n                                    \n                                        \n                                        \n                                            <table align='left' border='0' cellpadding='0' cellspacing='0'>\n                                                <tbody><tr>\n                                                    <td valign='top' style='padding-right:10px; padding-bottom:9px;' class='mcnFollowContentItemContainer'>\n                                                        <table border='0' cellpadding='0' cellspacing='0' width='100%' class='mcnFollowContentItem'>\n                                                            <tbody><tr>\n                                                                <td align='left' valign='middle' style='padding-top:5px; padding-right:10px; padding-bottom:5px; padding-left:9px;'>\n                                                                    <table align='left' border='0' cellpadding='0' cellspacing='0' width=''>\n                                                                        <tbody><tr>\n                                                                            \n                                                                                <td align='center' valign='middle' width='24' class='mcnFollowIconContent'>\n                                                                                    <a href='http://www.twitter.com/' target='_blank'><img src='http://cdn-images.mailchimp.com/icons/social-block-v2/dark-twitter-48.png' style='display:block;' height='24' width='24' class=''></a>\n                                                                                </td>\n                                                                            \n                                                                            \n                                                                        </tr>\n                                                                    </tbody></table>\n                                                                </td>\n                                                            </tr>\n                                                        </tbody></table>\n                                                    </td>\n                                                </tr>\n                                            </tbody></table>\n                                        \n                                    \n                                        \n                                        \n                                            <table align='left' border='0' cellpadding='0' cellspacing='0'>\n                                                <tbody><tr>\n                                                    <td valign='top' style='padding-right:0; padding-bottom:9px;' class='mcnFollowContentItemContainer'>\n                                                        <table border='0' cellpadding='0' cellspacing='0' width='100%' class='mcnFollowContentItem'>\n                                                            <tbody><tr>\n                                                                <td align='left' valign='middle' style='padding-top:5px; padding-right:10px; padding-bottom:5px; padding-left:9px;'>\n                                                                    <table align='left' border='0' cellpadding='0' cellspacing='0' width=''>\n                                                                        <tbody><tr>\n                                                                            \n                                                                                <td align='center' valign='middle' width='24' class='mcnFollowIconContent'>\n                                                                                    <a href='http://plus.google.com.com/' target='_blank'><img src='http://cdn-images.mailchimp.com/icons/social-block-v2/dark-googleplus-48.png' style='display:block;' height='24' width='24' class=''></a>\n                                                                                </td>\n                                                                            \n                                                                            \n                                                                        </tr>\n                                                                    </tbody></table>\n                                                                </td>\n                                                            </tr>\n                                                        </tbody></table>\n                                                    </td>\n                                                </tr>\n                                            </tbody></table>\n                                        \n                                    \n                                    <!--[if mso]>\n                                    </td>\n                                    </tr>\n                                    </table>\n                                    <![endif]-->\n                                </td>\n                            </tr>\n                        </tbody></table>\n                    </td>\n                </tr>\n            </tbody></table>\n        </td>\n    </tr>\n</tbody></table>\n\n            </td>\n        </tr>\n    </tbody>\n</table><table border='0' cellpadding='0' cellspacing='0' width='100%' class='mcnTextBlock'>\n    <tbody class='mcnTextBlockOuter'>\n        <tr>\n            <td valign='top' class='mcnTextBlockInner'>\n                \n                <table align='left' border='0' cellpadding='0' cellspacing='0' width='100%' class='mcnTextContentContainer'>\n                    <tbody><tr>\n                        \n                        <td valign='top' class='mcnTextContent' style='padding-top:9px; padding-right: 18px; padding-bottom: 9px; padding-left: 18px;'>\n                        \n                            <div style='text-align: left;'><em style='color: #222222;font-family: arial,sans-serif;font-size: 12.8px;line-height: normal;'>Copyright © JM Pneus e Renovadora Ltda., Todos os direitos reservados.</em><br style='color: #222222;font-family: arial, sans-serif;font-size: 12.8px;line-height: normal;'>\n<span style='color: #222222;font-family: arial,sans-serif;font-size: 12.8px;line-height: normal;'>Rodovia BR-316, Km 57, S/N, Apeú</span><br style='color: #222222;font-family: arial, sans-serif;font-size: 12.8px;line-height: normal;'>\n<span style='color: #222222;font-family: arial,sans-serif;font-size: 12.8px;line-height: normal;'>Castanhal - Pará - CEP 68.740-420</span><br style='color: #222222;font-family: arial, sans-serif;font-size: 12.8px;line-height: normal;'>\n<span style='color: #222222;font-family: arial,sans-serif;font-size: 12.8px;line-height: normal;'>Fone: (091) 3725-1399</span><br style='color: #222222;font-family: arial, sans-serif;font-size: 12.8px;line-height: normal;'>\n<span style='color: #222222;font-family: arial,sans-serif;font-size: 12.8px;line-height: normal;'>Celulares:&nbsp;</span><span style='color: #222222;font-family: arial,sans-serif;font-size: 12.8px;line-height: 20.8px;text-align: justify;'>98057-3146 (TIM), 99640-0343&nbsp;(OI),&nbsp;99149-2086 (VIVO),&nbsp;98411-7945 (CLARO)</span><br style='color: #222222;font-family: arial, sans-serif;font-size: 12.8px;line-height: normal;'>\n<span style='color: #222222;font-family: arial,sans-serif;font-size: 12.8px;line-height: normal;'>E-mail:&nbsp;</span><a href='mailto:jm2000@jmpneus.com.br' style='color: #1155CC;font-family: arial, sans-serif;font-size: 12.8px;line-height: normal;' target='_blank'>jm2000@jmpneus.com.br</a><br style='color: #222222;font-family: arial, sans-serif;font-size: 12.8px;line-height: normal;'>\n<span style='color: #222222;font-family: arial,sans-serif;font-size: 12.8px;line-height: normal;'>Portal:&nbsp;</span><a href='http://www.omelhorcaminho.com.br/' style='color: #1155CC;font-family: arial, sans-serif;font-size: 12.8px;line-height: normal;' target='_blank'>www.omelhorcaminho.com.br</a></div>\n\n                        </td>\n                    </tr>\n                </tbody></table>\n                \n            </td>\n        </tr>\n    </tbody>\n</table></td>\n                                                    </tr>\n                                                </table>\n                                            </td>\n                                        </tr>\n                                    </table>\n                                    <!-- // END FOOTER -->\n                                </td>\n                            </tr>\n                        </table>\n                        <!-- // END TEMPLATE -->\n                    </td>\n                </tr>\n            </table>\n        \n    </body>\n</html>";
     //        $mail->AltBody = "Contrato sob nº $id, para o cliente: $nome_cliente, CPF/CNPJ: $cnpj.\r\n";
     // Define os anexos (opcional)
     // =-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=
     //      $mail->AddAttachment($arq_pdf); // Insere um anexo
     //      $mail->AddAttachment($arq_xml); // Insere um anexo
     // Envia o e-mail
     $enviado = $mail->Send();
     // Limpa os destinatários e os anexos
     $mail->ClearAllRecipients();
     $mail->ClearAttachments();
     // Exibe uma mensagem de resultado
     if ($enviado) {
         echo "E-mail enviado com sucesso!";
     } else {
         echo "Não foi possível enviar o e-mail.<br /><br />";
         echo "<b>Informações do erro:</b> <br />" . $mail->ErrorInfo;
     }
 }
 public function inativarUsuariosAction()
 {
     $this->_helper->viewRenderer->setNoRender();
     $this->_helper->layout->disableLayout();
     $model_usuarios = new Cadastros_Model_Usuarios();
     $id = $this->getRequest()->getParam('id');
     $where = "id=" . $id;
     $array_dados = array("status_usuario" => '0', "dt_update" => date('Y-m-d H:i:s'));
     $table = "usuario";
     $model_usuarios->editar($table, $array_dados, $where);
     ## Log da transação ##
     $log = new Acesso_Log();
     $log->Log();
     return $this->_helper->redirector('index');
 }