Skip to content

Commit

Permalink
Ajustes
Browse files Browse the repository at this point in the history
  • Loading branch information
eugabrielsilva committed Mar 27, 2023
1 parent 898eea1 commit 7dde409
Show file tree
Hide file tree
Showing 3 changed files with 8 additions and 5 deletions.
2 changes: 1 addition & 1 deletion README.md
Original file line number Diff line number Diff line change
Expand Up @@ -11,4 +11,4 @@ Esta simples aplicação web tem como objetivo automatizar um sorteio de Amigo S
Inicialmente, é necessário configurar a conta de e-mail que será usada para disparar os e-mails via SMTP para cada participante. As configurações estão no arquivo `lib/Config.php`. Depois disso a aplicação estará pronta para realizar os sorteios.

### Créditos
Desenvolvido por [Gabriel Silva](https://eugabrielsilva.tk).
Desenvolvido por [Gabriel Silva](https://eugabrielsilva.tk), usando as ferramentas: [Bootstrap](https://getbootstrap.com), [AngularJS](https://angularjs.org) e [PHPMailer](https://github.com/PHPMailer/PHPMailer). Template do e-mail desenvolvido por [Lee Munroe](https://github.com/leemunroe/responsive-html-email-template).
6 changes: 3 additions & 3 deletions lib/email_template.php
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,7 @@
<head>
<meta name="viewport" content="width=device-width, initial-scale=1.0">
<meta http-equiv="Content-Type" content="text/html; charset=UTF-8">
<title>Simple Transactional Email</title>
<title>Sorteio Amigo Secreto | <?=$nome;?></title>
<style>
@media only screen and (max-width: 620px) {
table.body h1 {
Expand Down Expand Up @@ -98,7 +98,7 @@
</style>
</head>
<body style="background-color: #f6f6f6; font-family: sans-serif; -webkit-font-smoothing: antialiased; font-size: 14px; line-height: 1.4; margin: 0; padding: 0; -ms-text-size-adjust: 100%; -webkit-text-size-adjust: 100%;">
<span class="preheader" style="color: transparent; display: none; height: 0; max-height: 0; max-width: 0; opacity: 0; overflow: hidden; mso-hide: all; visibility: hidden; width: 0;">This is preheader text. Some clients will show this text as a preview.</span>
<span class="preheader" style="color: transparent; display: none; height: 0; max-height: 0; max-width: 0; opacity: 0; overflow: hidden; mso-hide: all; visibility: hidden; width: 0;">Sorteio Amigo Secreto | <?=$nome;?></span>
<table role="presentation" border="0" cellpadding="0" cellspacing="0" class="body" style="border-collapse: separate; mso-table-lspace: 0pt; mso-table-rspace: 0pt; background-color: #f6f6f6; width: 100%;" width="100%" bgcolor="#f6f6f6">
<tr>
<td style="font-family: sans-serif; font-size: 14px; vertical-align: top;" valign="top">&nbsp;</td>
Expand All @@ -116,7 +116,7 @@
<td style="font-family: sans-serif; font-size: 14px; vertical-align: top;" valign="top">
<p style="font-family: sans-serif; font-size: 14px; font-weight: normal; margin: 0; margin-bottom: 15px;">Olá, <?=$participante['nome'];?>!</p>
<p style="font-family: sans-serif; font-size: 14px; font-weight: normal; margin: 0; margin-bottom: 15px;">Seu amigo secreto é <strong><?=$participante['amigo']['nome'];?></strong>.</p>
<p style="font-family: sans-serif; font-size: 14px; font-weight: normal; margin: 0; margin-bottom: 15px;">Escolha um presente legal e esperamos que tenha uma boa festa!</p>
<p style="font-family: sans-serif; font-size: 14px; font-weight: normal; margin: 0; margin-bottom: 15px;">Escolha um presente legal e esperamos que tenham uma boa festa!</p>
</td>
</tr>
</table>
Expand Down
5 changes: 4 additions & 1 deletion sortear.php
Original file line number Diff line number Diff line change
Expand Up @@ -67,7 +67,10 @@
$mail->Port = SMTP_PORT;
$mail->setFrom(SMTP_USER, 'Amigo Secreto');
$mail->isHTML();
$mail->Subject = 'Amigo Secreto | ' . $nome;
$mail->Subject = 'Sorteio Amigo Secreto | ' . $nome;

// Altera fuso horário para gerar a data correta
date_default_timezone_set('America/Sao_Paulo');

// Envia e-mails
foreach ($participantes as $participante) {
Expand Down

0 comments on commit 7dde409

Please sign in to comment.