This repository was archived by the owner on Dec 28, 2023. It is now read-only.
Nova implementação para envio de e-mail#10
Open
imozart wants to merge 4 commits into
Open
Conversation
imozart
commented
Nov 18, 2020
Contributor
- Nova implementação para envio de e-mail com Delphi
- Novo README.md para framework Mail
- Testes unitários para envio de email
Adiciona a interface Mail para envio de emails.
Adiciona MailBase para implementação do envio de email
Adiciona um README.md para o framework Mail a fim de explicar o funcionamento
Framework para envio de email + README.md + testes unitários
andrepg
suggested changes
Nov 18, 2020
| begin | ||
| for i := 0 to Pred(GetCcRecipients.Count) do | ||
| begin | ||
| with AMsg.CCList.Add do |
Member
There was a problem hiding this comment.
Vamos usar o with mesmo? Não vale a pena evitar não?
| body := TIdText.Create(AMsg.MessageParts); | ||
| body.Body.Text := GetMessages.Text; | ||
| body.ContentType := 'text/plain'; | ||
| if IsWithHTML then |
Member
There was a problem hiding this comment.
Talvez trocar a variável por HaveHtmlContent, ou IsHtmlFormat. Ficou meio vago esse nome.
Comment on lines
+177
to
+185
| try | ||
| if IsWithAuthentication then | ||
| begin | ||
| smtp.Authenticate; | ||
| end; | ||
| smtp.Send(msg); | ||
| finally | ||
| smtp.Disconnect; | ||
| end; |
Member
There was a problem hiding this comment.
Acredito que aqui a gente pode mesclar os dois Try..Finally, e eliminar esse interno, levando o SMTP.Disconnect pra dentro do Finally abaixo.
Comment on lines
+37
to
+39
| function IsWithSSL: Boolean; | ||
| function IsWithTLS: Boolean; | ||
| function IsWithAuthentication: Boolean; |
Member
There was a problem hiding this comment.
No caso das variáveis IsWithConfirmation, IsWithAuthentication, IsWithSSL e IsWithTLS acho que podemos tirar o Is, porque fica redundante.
| function GetAttachments: TStringList; | ||
| function GetSubject: string; | ||
| function GetMessages: TStringList; | ||
| function IsWithHTML: Boolean; |
Member
There was a problem hiding this comment.
Talvez trocar a variável por HaveHtmlContent, ou IsHtmlFormat. Ficou meio vago esse nome.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to subscribe to this conversation on GitHub.
Already have an account?
Sign in.
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.