Atozed Forums

Full Version: send Email with Indy component
You're currently viewing a stripped down version of our content. View the full version with proper formatting.
Is it possible to send emails from my intraweb webapp ?


i put the Indy components IdSMTP and idmessage on a tiwform.

Since i do it no button works on the form.

Should i put the indy components on the serversession or usersessionunit ?


Michael Pahl

Delphi 10.2 with
IntraWeb Ultimate Edition 14.2.6
Indy 10.6.2.5366


after one day investigation i found my button work if i remove a IWCompTimeEdit component from the form.

Funny  a IWCompTimeEdit has that effect

Sorry for the post
You can put them on the session or a form. The ServerController can work too, but you would need to protect access to it with a critical section our use a queue.
Hi Michael, it is better that each session manages its own Object instances, so for that reason it is better for you to put the components in the UserSession, or a good practice is in another Datamodule, named for example: EMailController, that can be instantiated from the UserSession. This is to keep the UserSession DataModule cleaner, and not to instantiate objects if they will not always be used.