About the author
More coding again today.
Today, I wrote a demo that demonstrates how to send email using hMailServer.After importing the TLB (hMailServer.tlb) from C:\Program Files\hMailServer\Bin and adding the created unit to a new VCL project, and to a new form, I dropped a button on the new form, double clicked on the button, and wrote the following code for the button click's event.
procedure TForm1.Button1Click(Sender: TObject);var LMessage: TMessage; LBody: string;begin LMessage := TMessage.Create(nil); try LMessage.From := 'Me <myemailaddress@mydomain.com>'; LMessage.Subject := 'Hi!!'; LMessage.AddRecipient('A Recipient', 'someone@somewhere.com'); LBody := Format('This is the contents of the demo email for hMailServer project. - %s', [ FormatDateTime('dd mmm yyyy - hh:nn:ss', Now)]); LMessage.Body := LBody; LMessage.Save; finally LMessage.Free; end;end;
Learn why the map is cool in Go!
A method to design records so that they're allocated on a specific byte boundary, such as 16 bytes, 512 bytes, 4096 bytes, etc.
Learn the command line used to compile System.pas in Delphi
How to free more space on your home drive by redirecting the location for SDKs in RAD Studio