I'm developing a web app with a customer liaison section.
Each user can have multiple email addresses, each with different server settings and credentials.
The email addresses and credentials are stored in a separate table and are linked to the user by their user ID.
When a user composes an email, they can select their desired "from" address from a dropdown list populated with their available email addresses.
Upon sending the email, the app will need to automatically load the corresponding server details for the selected address and send the message.
I've learned that multiple server settings can be configured using the onApplicationInit event, but, if I am correct, this runs when the form is loaded.
I did a test, and that seems correct.
My question is: Can I create a function that selects the appropriate server details based on the email domain of the selected "from" address, to set the globalsettings for the mailserver?
Or am I stuck with the applicationInit?
Thank you for reading,
Mike