• Debian 11 is approaching its end-of-life (vendor EOL date - August 31, 2026). Plesk Obsidian 18.0.80 will be the last release to support it.
    If you are running Plesk Obsidian on Debian 11, we recommend you upgrade those servers to Debian 12 using our dist-upgrade tool.
  • We plan to deprecate and remove the support for XML RPC protocol versions earlier than 1.6.9.1 in Plesk Obsidian 18.0.82. We strongly recommend that you update all existing integrations using earlier versions of the XML RPC protocol to comply with the version 1.6.9.1 specification.

Question Mailinglist recipients from SQL database

dennis_81

Basic Pleskian
Hello,

I am looking for a way to get the eMail recipients of a mailinglist from a SQL database. I know this possibility e.g. from IceWarp. There I could read out with a SELECT query from a MySQL database, to whom a mailinglist forwards the messages.
Can I implement something like this with Plesk?

Thanks for your answers
 
If I'm not mistaken list of subscribers is not stored in the Plesk database. But you can get this list with the appropriate CLI utility:
Code:
# plesk bin maillist -i maillist -domain distracted-nightingale.128-19-131-120.plesk
Mailing list members:
[email protected]
[email protected]
[email protected]
SUCCESS: operation with mailing list 'maillist' complete.
 
Hello,

thank you, but maybe I didn't explain it correctly:
I do not want to use the Plesk database but an external database. We have a MySQL DB for personnel management. In this database are also the employees with departments and mail addresses. I would like to automatically add all employees who are in department A to the distribution list [email protected].
 
You could do this aslo using the Plesk CLI. To add an email address to an mailinglist to can use:
Bash:
plesk bin maillist --update MailinglistName -members add:[email protected] -domain example.com

You'll have to write a script to export the email addresses from your database and add those email addresses to the mailinglist using the code example above. More information on the Plesk CLI can be found here: maillist: Mailing Lists
 
Thank You @Rasp
How can I make entries here? Is that only possible via the Plesk CLI? Do I have to schedule it via cronjob? Or can I for example also edit this via PHP on a website?
 
@dennis_81
unfortunately there's no ability to do that via API, so adding the script with CLI commands to the cron looks good.
 
Back
Top