Hi

 

With the attached code I previously send emails, but the client now want
to send it in HTML format, if I already build up the html document, how
do I change this code to send this as an HTML format, and not only as an
attachment (like Outlook can do it currently?

 

with IdMsgSend do

    begin

       Body.Assign(reMessage.Lines);

       From.Text := edtFrom.Text;

       ReplyTo.EMailAddresses := edtFrom.Text;

       Recipients.EMailAddresses := lstATo; { To: header }

 

       Subject := edtSubject.Text; { Subject: header }

       Priority := TIdMessagePriority(cboPriority.ItemIndex); { Message
Priority }

       CCList.EMailAddresses := lstACC; {CC}

       BccList.EMailAddresses := lstABCC; {BBC}

       ReceiptRecipient.Text := '';

    end;

 

 

try

     SMTP.AuthenticationType := atLogin; {Simple Login}

     SMTP.Username := EmailHandler.ACCOUNT;

     SMTP.Password := EmailHandler.E_PASSWORD;

 

     {General setup}

     SMTP.Host := EmailHandler.SMTPServer;

     SMTP.Port := StrToInt(EmailHandler.PORT);

 

     {now we send the message}

     SMTP.Connect;

 

     if SMTP.Connected then

     begin

       try

         SMTP.Send(IdMsgSend);

       finally

         SMTP.Disconnect;

       end;

     end;

 

   except

     on E:Exception do

     begin

       ShowMessage('Unable to send emails, please check your email
setup');

     end;

   end;

 

 

Do anybody have perhaps any suggestions for me in this regard? Or are
there any articles, or components that I can use in this regard?

 

Thank you

Johan Fourie


NOTICE: Please note that this eMail, and the contents thereof, is subject to 
the standard arivia.kom email disclaimer which may be found at:  
http://www.arivia.co.za/internet/disclaimer.htm.  If you cannot access the 
disclaimer through the URL attached, and you wish to receive a copy thereof, 
please send an eMail to [EMAIL PROTECTED] or call (011) 233-0800. You will 
receive the disclaimer by return email or fax.



_______________________________________________
Delphi mailing list -> [email protected]
http://www.elists.org/mailman/listinfo/delphi

Reply via email to