What is the easiest way to send emails to all users of a cloudron instance?
andres.moya last edited by andres.moya
I need to be able to send (ocassionally) special announcements to all users of a cloudron instance. Not to the email that automatically is created in the instance domain, but the personal address they give when they register.
Is there any easy way of doing this? Could I create a cloudron mailing list where all users are automatically added? Or could I install Mailtrain, for example, and syncronize the contacts in it with the instance user list?
As a heads up, Cloudron does not automatically create emails for a user anymore (long removed many releases ago).
To answer your original question, I guess the easiest way for the moment is get the email list via the API. I don't know if it help but in next release 7.1, there will be a way to export users/mailboxes in csv/json format.
For the API:
curl https://my.domain.com/api/v1/users?access_token=xxxwill give the json of user listing.
With poor man's shell scripting:
curl -s https://my.domain.com/api/v1/users?access_token=xx | sed -ne 's/.*"email": "\(.*\)",/\1/p'
andres.moya last edited by