title: Delphi - Is there any way to edit the format and layout of a SMTP email?
body: <p>I'm creating a database system which sends emails out via the webmail on the hosting website 'one.com'.</p>
  
  <p>With some help from this website and others, I managed to put together this email procedure. However, I do not know how to format the text within this email so that it's font, font size and color etc can be customized.</p>
  
  <p>Is there a way to do this with the current code? If not, is there a way to add html edits to the email body. I've tried to add html tags to the message text, but they are not recognized as html tags. Is this due to the way the email is sent through delphi, or the way one.com works?</p>
  
  <pre><code>procedure SendExpiringEmail(MemName: string; ExpDate: string; MemEmail: string);
      var
        IdSMTP: TIdSMTP;
        IdMessage: TIdMessage;
        IdEmailAddressItem: TIdEmailAddressItem;
        SSLHandler: TIdSSLIOHandlerSocketOpenSSL;
        EETextFile: TextFile;
        fileline: string;    
      begin
            IdSMTP := TIdSMTP.Create(nil);
            try
              IdSMTP.Host := 'send.one.com';
              IdSMTP.Port := 465;
              SSLHandler := TIdSSLIOHandlerSocketOpenSSL.Create(nil);
              idsmtp.IOHandler :=  SSLHandler;
              IdSMTP.UseTLS := utUseImplicitTLS;
              IdSMTP.AuthType := satDefault;
              IdSMTP.Username := 'USERNAME';
              IdSMTP.Password := 'PASSWORD';
              IdSMTP.Connect;
              AssignFile(EETextFile, 'C:\MHExpEmailBody.txt');
              Reset(EETextFile);
              if IdSMTP.Authenticate then
              begin
                IdMessage := TIdMessage.Create(nil);
                try
                  IdMessage.From.Name := 'NAME';
                  IdMessage.From.Address := 'ADDRESS';
                  IdMessage.Subject := 'It looks like your membership is about to expire!';
                  IdMessage.Body.Add(+MemName);
                  IdMessage.Body.Add('');
                  while not EOF(EETextFile) do
                    begin
                      ReadLn(EETextFile, fileline);
                      IdMessage.Body.Add(fileline)
                    end;
                  IdMessage.Body.Add('');
                  IdMessage.Body.Add('We look forward to seeing you. Take Care!');
                  IdEmailAddressItem := IdMessage.Recipients.Add;
                  IdEmailAddressItem.Address := MemEmail;
                  IdSMTP.Send(IdMessage);
                finally
                  IdMessage.Free;
                end;
              end;
              IdSMTP.Disconnect;
              Close(EETextFile);
            finally
              IdSMTP.Free;
            end;
          end;
  </code></pre>
  
  <p>Any understanding to how things work would be greatly appreciated, as i'm still learning. Thanks.<br>
  I just need to be able to edit the format of the message and maybe add pictures if possible. </p>
  
  <p>Edit: I'd just like to add that i'd prefer it if third party open source components were not offered as I find them tricky to implement.  </p>