Skip to content

Commit

Permalink
- Permitir alterar o ContentType
Browse files Browse the repository at this point in the history
  • Loading branch information
PlimSistemas committed Sep 30, 2020
1 parent b1ff933 commit ab32977
Show file tree
Hide file tree
Showing 2 changed files with 8 additions and 0 deletions.
1 change: 1 addition & 0 deletions src/Mail4Delphi.Intf.pas
Original file line number Diff line number Diff line change
Expand Up @@ -20,6 +20,7 @@ interface
function AddAttachment(const AFile: string): IMail;
function Auth(const AValue: Boolean): IMail;
function SSL(const AValue: Boolean): IMail;
function ContentType(const AValue: string): IMail;
function Clear: IMail;
function SendMail: Boolean;
function SetUpEmail: Boolean;
Expand Down
7 changes: 7 additions & 0 deletions src/Mail4Delphi.pas
Original file line number Diff line number Diff line change
Expand Up @@ -42,6 +42,7 @@ TMail = class(TInterfacedObject, IMail)
function AddAttachment(const AFile: string): IMail;
function Auth(const AValue: Boolean): IMail;
function SSL(const AValue: Boolean): IMail;
function ContentType(const AValue: string): IMail;
function Clear: IMail;
function SendMail: Boolean;
class function New: IMail;
Expand Down Expand Up @@ -162,6 +163,12 @@ function TMail.Clear: IMail;
Result := Self;
end;

function TMail.ContentType(const AValue: string): IMail;
begin
FIdText.ContentType := AValue;
Result := Self;
end;

constructor TMail.Create;
begin
FIdSSLIOHandlerSocket := TIdSSLIOHandlerSocketOpenSSL.Create(nil);
Expand Down

0 comments on commit ab32977

Please sign in to comment.