Reading SMTP server name/IP from Mail plugin

Hi everybody,

Is there a way other than searching into the servoy.properties file to get the SMTP server name/IP given to the standard mail plugin provided in Servoy and that you configure in the administration page?
The plugin doesn’t seem to provide a function returning it :(

Cheers.

Why do you need it at runtime?
You are the one configuring it in the server admin pages anyway, so you should know already, or am I missing something?

Once the solution in production, the SMTP setting still can be changed (new server, server name changed, etc…). And changing the setting can be done by any Admin, not necessary people who installed Servoy and the solution.

So I need to be able to read this setting “dynamically”.

You need to read so you can override it or so you can show it to the user ?
If you don’t want any admin to change it then why not manage it yourself in the database. You can simply override any mail server setting by passing the server, user and password settings in the mail plugin.

Hope this helps.

No, in fact, I have developed a plugin to be able to manage the contacts in the Exchange Server and I would like to avoid the admins to enter the server settings a second time into my solution.

Right now there is no way to read the settings with the mail plugin. So as far as I can see you have 2 options:

  1. write a patch for the mail plugin with this functionality. The source is available.
  2. don’t manage the mailserver settings in the Servoy-Admin pages but do it all inside the database.

ROCLASI:
Right now there is no way to read the settings with the mail plugin. So as far as I can see you have 2 options:

  1. write a patch for the mail plugin with this functionality. The source is available.
  2. don’t manage the mailserver settings in the Servoy-Admin pages but do it all inside the database.

Ok, so I think I’ll just add a setting in my solution, as it should be set/reset very rarely and only by admins.

Thanks for your help. :D