| | [RESOLVIDO]Customização do envio de email | |
| | Autor | Mensagem |
---|
leonardocr
Mensagens : 91 Data de inscrição : 30/04/2012 Idade : 32
| Assunto: [RESOLVIDO]Customização do envio de email Seg Mar 04, 2013 5:19 pm | |
| Bom montei uma customização do email, ela so pode ser feita direto no banco. Entre no seu banco do ocomon vai na tabela msgconfig e na coluna msg_body coloque assim. - Código:
-
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd"> <html> <head> <meta http-equiv="Content-Type" content="text/html; charset=UTF-8" /> <!-- Facebook sharing information tags --> <meta property="og:title" content="Suporte TI" /> <title>Suporte TI</title> <style type="text/css"> /* Client-specific Styles */ #outlook a{padding:0;} /* Force Outlook to provide a "view in browser" button. */ body{width:100% !important;} .ReadMsgBody{width:100%;} .ExternalClass{width:100%;} /* Force Hotmail to display emails at full width */ body{-webkit-text-size-adjust:none;} /* Prevent Webkit platforms from changing default text sizes. */
/* Reset Styles */ body{margin:0; padding:0;} img{border:0; height:auto; line-height:100%; outline:none; text-decoration:none;} table td{border-collapse:collapse;} #backgroundTable{height:100% !important; margin:0; padding:0; width:100% !important;}
/* Template Styles */
/* /\/\/\/\/\/\/\/\/\/\ STANDARD STYLING: COMMON PAGE ELEMENTS /\/\/\/\/\/\/\/\/\/\ */
/** * @tab Page * @section background color * @tip Set the background color for your email. You may want to choose one that matches your company's branding. * @theme page */ body, #backgroundTable{ /*@editable*/ background-color:#FAFAFA; }
/** * @tab Page * @section email border * @tip Set the border for your email. */ #templateContainer{ /*@editable*/ border: 1px solid #DDDDDD; }
/** * @tab Page * @section heading 1 * @tip Set the styling for all first-level headings in your emails. These should be the largest of your headings. * @style heading 1 */ h1, .h1{ /*@editable*/ color:#202020; display:block; /*@editable*/ font-family:Arial; /*@editable*/ font-size:34px; /*@editable*/ font-weight:bold; /*@editable*/ line-height:100%; margin-top:0; margin-right:0; margin-bottom:10px; margin-left:0; /*@editable*/ text-align:left; }
/** * @tab Page * @section heading 2 * @tip Set the styling for all second-level headings in your emails. * @style heading 2 */ h2, .h2{ /*@editable*/ color:#202020; display:block; /*@editable*/ font-family:Arial; /*@editable*/ font-size:30px; /*@editable*/ font-weight:bold; /*@editable*/ line-height:100%; margin-top:0; margin-right:0; margin-bottom:10px; margin-left:0; /*@editable*/ text-align:left; }
/** * @tab Page * @section heading 3 * @tip Set the styling for all third-level headings in your emails. * @style heading 3 */ h3, .h3{ /*@editable*/ color: #FFFFFF; display: block; /*@editable*/ font-family: Arial; /*@editable*/ font-size: 26px; /*@editable*/ font-weight: bold; /*@editable*/ line-height: 100%; margin-top: 0; margin-right: 0; margin-bottom: 10px; margin-left: 0; /*@editable*/ text-align: left; }
/** * @tab Page * @section heading 4 * @tip Set the styling for all fourth-level headings in your emails. These should be the smallest of your headings. * @style heading 4 */ h4, .h4{ /*@editable*/ color: #202020; display: block; /*@editable*/ font-family: Arial; /*@editable*/ font-size: 26px; /*@editable*/ font-weight: bold; /*@editable*/ line-height: 100%; margin-top: 0; margin-right: 0; margin-bottom: 10px; margin-left: 0; /*@editable*/ text-align: left; }
/* /\/\/\/\/\/\/\/\/\/\ STANDARD STYLING: HEADER /\/\/\/\/\/\/\/\/\/\ */
/** * @tab Header * @section header style * @tip Set the background color and border for your email's header area. * @theme header */ #templateHeader{ /*@editable*/ background-color:#FFFFFF; /*@editable*/ border-bottom:0; }
/** * @tab Header * @section header text * @tip Set the styling for your email's header text. Choose a size and color that is easy to read. */ .headerContent{ /*@editable*/ color:#202020; /*@editable*/ font-family:Arial; /*@editable*/ font-size:34px; /*@editable*/ font-weight:bold; /*@editable*/ line-height:100%; /*@editable*/ padding:0; /*@editable*/ text-align:center; /*@editable*/ vertical-align:middle; }
/** * @tab Header * @section header link * @tip Set the styling for your email's header links. Choose a color that helps them stand out from your text. */ .headerContent a:link, .headerContent a:visited, /* Yahoo! Mail Override */ .headerContent a .yshortcuts /* Yahoo! Mail Override */{ /*@editable*/ color:#336699; /*@editable*/ font-weight:normal; /*@editable*/ text-decoration:underline; }
#headerImage{ height:auto; max-width:600px !important; }
/* /\/\/\/\/\/\/\/\/\/\ STANDARD STYLING: MAIN BODY /\/\/\/\/\/\/\/\/\/\ */
/** * @tab Body * @section body style * @tip Set the background color for your email's body area. */ #templateContainer, .bodyContent{ /*@editable*/ background-color:#FFFFFF; }
/** * @tab Body * @section body text * @tip Set the styling for your email's main content text. Choose a size and color that is easy to read. * @theme main */ .bodyContent div{ /*@editable*/ color:#505050; /*@editable*/ font-family:Arial; /*@editable*/ font-size:14px; /*@editable*/ line-height:150%; /*@editable*/ text-align:left; }
/** * @tab Body * @section body link * @tip Set the styling for your email's main content links. Choose a color that helps them stand out from your text. */ .bodyContent div a:link, .bodyContent div a:visited, /* Yahoo! Mail Override */ .bodyContent div a .yshortcuts /* Yahoo! Mail Override */{ /*@editable*/ color:#336699; /*@editable*/ font-weight:normal; /*@editable*/ text-decoration:underline; }
/** * @tab Body * @section button style * @tip Set the styling for your email's button. Choose a style that draws attention. */ .templateButton{ -moz-border-radius: 3px; -webkit-border-radius: 3px; /*@editable*/ background-color: #0072C6; /*@editable*/ border: 0; border-collapse: separate !important; border-radius: 3px; }
/** * @tab Body * @section button style * @tip Set the styling for your email's button. Choose a style that draws attention. */ .templateButton, .templateButton a:link, .templateButton a:visited, /* Yahoo! Mail Override */ .templateButton a .yshortcuts /* Yahoo! Mail Override */{ /*@editable*/ color:#FFFFFF; /*@editable*/ font-family:Arial; /*@editable*/ font-size:15px; /*@editable*/ font-weight:bold; /*@editable*/ letter-spacing:-.5px; /*@editable*/ line-height:100%; text-align:center; text-decoration:none; }
.bodyContent img{ display:inline; height:auto; }
/* /\/\/\/\/\/\/\/\/\/\ STANDARD STYLING: FOOTER /\/\/\/\/\/\/\/\/\/\ */
/** * @tab Footer * @section footer style * @tip Set the background color and top border for your email's footer area. * @theme footer */ #templateFooter{ /*@editable*/ background-color:#FFFFFF; /*@editable*/ border-top:0; }
/** * @tab Footer * @section footer text * @tip Set the styling for your email's footer text. Choose a size and color that is easy to read. * @theme footer */ .footerContent div{ /*@editable*/ color:#707070; /*@editable*/ font-family:Arial; /*@editable*/ font-size:12px; /*@editable*/ line-height:125%; /*@editable*/ text-align:center; }
/** * @tab Footer * @section footer link * @tip Set the styling for your email's footer links. Choose a color that helps them stand out from your text. */ .footerContent div a:link, .footerContent div a:visited, /* Yahoo! Mail Override */ .footerContent div a .yshortcuts /* Yahoo! Mail Override */{ /*@editable*/ color:#336699; /*@editable*/ font-weight:normal; /*@editable*/ text-decoration:underline; }
.footerContent img{ display:inline; }
/** * @tab Footer * @section utility bar style * @tip Set the background color and border for your email's footer utility bar. * @theme footer */ #utility{ /*@editable*/ background-color:#FFFFFF; /*@editable*/ border:0; }
/** * @tab Footer * @section utility bar style * @tip Set the background color and border for your email's footer utility bar. */ #utility div{ /*@editable*/ text-align:center; }
#monkeyRewards img{ max-width:190px; } #social { /*@editable*/ background-color:#FAFAFA; /*@editable*/ border:0; } </style> </head> <body leftmargin="0" marginwidth="0" topmargin="0" marginheight="0" offset="0"> <center> <table border="0" cellpadding="0" cellspacing="0" height="100%" width="100%" id="backgroundTable"> <tr> <td align="center" valign="top" style="padding-top:20px;"> <table border="0" cellpadding="0" cellspacing="0" width="600" id="templateContainer"> <tr> <td align="center" valign="top"> <!-- // Begin Template Header \\ --> <table border="0" cellpadding="0" cellspacing="0" width="600" id="templateHeader"> <tr> <td class="headerContent" bgcolor="#0072C6" ><br /> <h3 class="h3" style="text-align:center">Caro(a) <strong>%usuario%</strong>,</h3><br /> </td> </tr> </table> <!-- // End Template Header \\ --> </td> </tr> <tr> <td align="center" valign="top"> <!-- // Begin Template Body \\ --> <table border="0" cellpadding="0" cellspacing="0" width="600" id="templateBody"> <tr> <td valign="top"> <!-- // Begin Module: Standard Content \\ --> <table border="0" cellpadding="20" cellspacing="0" width="100%"> <tr> <td valign="top" class="bodyContent"> <div mc:edit="std_content00"> <p>Seu chamado foi aberto com sucesso no sistema de atendimento.<br /> O número do chamado é <b>%numero%</b><br /> Data da abertura : <b>%dataabertura%</b><br /> </p> <table border="0" cellpadding="10" cellspacing="0" width="100%"> <tr> <td width="540" valign="middle" id="social"><div class="h4" style="text-align:center; font-size:18px">Descrição do chamado (%numero%)</div></td> </tr> </table> <br /> %descricao% </div><hr /> </td> </tr> <tr> <td align="center" valign="top" style="padding-top:0;"> <table border="0" cellpadding="15" cellspacing="0" class="templateButton"> <tr> <td valign="middle" class="templateButtonContent"> <div mc:edit="std_content01"> <a href="http://192.168.0.33/suporte/ocomon/geral/mostra_consulta.php?numero=%numero%" target="_blank">Visualizar Chamado</a> </div> </td> </tr> </table> </td> </tr> </table> <!-- // End Module: Standard Content \\ --> </td> </tr> </table> <!-- // End Template Body \\ --> </td> </tr> <tr> <td align="center" valign="top"> <!-- // Begin Template Footer \\ --> <table border="0" cellpadding="10" cellspacing="0" width="600" id="templateFooter"> <tr> <td valign="top" class="footerContent"> <!-- // Begin Module: Transactional Footer \\ --> <table border="0" cellpadding="10" cellspacing="0" width="100%"> <tr> <td valign="top"> <div mc:edit="std_footer"><img src="http://i49.tinypic.com/23sb12a.png" style="max-width:101px;" mc:label="image" mc:edit="tiwc200_image00" /></div> </td> </tr> <tr> <td valign="middle" id="utility"> <div mc:edit="std_utility"> <a href="http://www.algarseguranca.com.br" target="_blank">Algar Segurança</a> | <a href="http://192.168.0.33">Intranet</a> | <a href="mailto:ti@algarseguranca.com.br">Contato</a></div> </td> </tr> </table> <!-- // End Module: Transactional Footer \\ --> </td> </tr> </table> <!-- // End Template Footer \\ --> </td> </tr> </table> <br /> </td> </tr> </table> </center> </body> </html> Salve e envie um email. Espero que tenha ajudado.
Última edição por leonardocr em Sex Mar 15, 2013 8:22 am, editado 1 vez(es) | |
| | | FabioRK
Mensagens : 378 Data de inscrição : 14/09/2009 Idade : 44 Localização : Carazinho - RS
| Assunto: Re: [RESOLVIDO]Customização do envio de email Sáb Mar 09, 2013 1:18 am | |
| Muito bacana o layout, parabéns.
| |
| | | leonardocr
Mensagens : 91 Data de inscrição : 30/04/2012 Idade : 32
| Assunto: Re: [RESOLVIDO]Customização do envio de email Sex Mar 15, 2013 8:23 am | |
| - FabioRK escreveu:
- Muito bacana o layout, parabéns.
Fabio teria como me passar seu contato em pm. gostaria de trocar umas ideias com vocÊ. | |
| | | souzadc
Mensagens : 6 Data de inscrição : 02/02/2012
| Assunto: Re: [RESOLVIDO]Customização do envio de email Qui Abr 04, 2013 1:32 am | |
| Cara,
Amigo leonardocr,
Fiz como informou só que não deu certo. Alterei apenas a parte de envio de abertura de chamado para ver se daria certo, contudo continuo recebendo os emails da parte antiga. Poderia dar uma luz?
Obrigado.
Sem mais!!!! ==> | |
| | | vaner
Mensagens : 19 Data de inscrição : 29/10/2011
| Assunto: variáveis? Qui Abr 04, 2013 4:03 pm | |
| Ficou muito bom leonardocr.
Só a variável %dataabertura% que não esta funcionando ah e queria saber qual a variável UNIDADE.
Valeu | |
| | | vaner
Mensagens : 19 Data de inscrição : 29/10/2011
| Assunto: Variável data_abertura. Qui Abr 11, 2013 5:04 pm | |
| Editei o arquivo \ocomon\geral\encerramento
Vá ate a linha 676 insira acima da variável VERSAO,
Coloque:
$VARS['%dataabertura%'] = $rowfull['data_abertura'];
Salve e faça um teste. | |
| | | pcassio23
Mensagens : 9 Data de inscrição : 20/03/2013
| Assunto: Re: [RESOLVIDO]Customização do envio de email Qui Abr 18, 2013 4:33 pm | |
| Vaner,
Eu acrescentei o dataabertura, mas tem um problema. Como formato a data pra ficar no padrão D/M/Y, tentei utilizar date_format($rowfull['data_abertura'],'d/m/y h:i:s'), porém retornou em branco no e-mail que o sistema envia.
Gostaria também de acrescentar um campo informando a prioridade do chamado. | |
| | | leonardocr
Mensagens : 91 Data de inscrição : 30/04/2012 Idade : 32
| Assunto: Re: [RESOLVIDO]Customização do envio de email Qui Abr 18, 2013 4:47 pm | |
| Pessoal entre no arquivo incluir e add perto da linha 921; - Código:
-
$VARS['%dataabertura%'] = formatDate($rowfull['data_abertura']);
| |
| | | vaner
Mensagens : 19 Data de inscrição : 29/10/2011
| Assunto: Re: [RESOLVIDO]Customização do envio de email Sex Abr 19, 2013 11:07 am | |
| leonardocr
Inseri como informado para correção do formato da data como solicitado mais não funcionou.
Eu inseri a variável unidade_cod aparece somente o numero da filial e não o nome.
valeu. | |
| | | Conteúdo patrocinado
| Assunto: Re: [RESOLVIDO]Customização do envio de email | |
| |
| | | | [RESOLVIDO]Customização do envio de email | |
|
Tópicos semelhantes | |
|
| Permissões neste sub-fórum | Não podes responder a tópicos
| |
| |
| |