Using AddEmail in Delphi projects

<< Click to Display Table of Contents >>

Navigation:  Samples and Tutorials > Delphi >

Using AddEmail in Delphi projects

 

To use AddEmail in your Delphi project perform the following steps:

 

1. Import AddEmail ActiveX control.

 

If you have Delphi 2005 or later: In Delphi main menu, select File -> New -> Package - Delphi Win32. Save the package as AddEmail_Package using File -> Save As menu. From Delphi main menu select Component -> Import Component. Select 'Import ActiveX Control' and click Next. Find and select AddEmail 4.0 Type Library, then click Add button. Click Next, make sure Palette Page is set to ActiveX and click Next. Select 'Add unit to AddEmail_Package project' and click Finish. In the Project Manager pane, right-click on AddEmail_Package and select Install. Delphi should display a message confirming that the package is installed. After that AddEmail will be installed to the ActiveX tab of Components palette.

 

If you have older version of Delphi: In Delphi main menu, select Components -> Import ActiveX Control. Find and select AddEmail 4.0 Type Library, then click Install button. AddEmail ActiveX will be installed to the ActiveX tab of Components palette.

 

2. Place SmtpMail object of AddEmail control on the form: Select ActiveX tab of Components palette, click SmtpMail and drag a rectangle on the form. AddEmail control is not visible on runtime, so you can place it anywhere on the form.

 

3. To process events from SmtpMail object, create event handlers: Click SmtpMail on the form and select Events tab in the Object Inspector window. You will see 2 events OnProgress and OnStatusChange. Double-click dropdown box next to event name to create event handler.

 

Please refer to the Reference section of this manual for detailed description of AddEmail objects, methods and properties. Included Delphi samples provide code snapshots for common operations such as sending text e-mails, sending HTML e-mails, adding attachments to e-mails and processing events.