Your software
My Mautic version is: 4.4.7
My PHP version is: 7.4
My Database type and version is:
Your problem
My problem is:
The solution I want seems quite simple, finding the answer to it seems not so simple.
Background:
We are using ManageEngine ADManager to create user account within our Windows AD environment.
After/while creating the new account, ADManager kicks off a PowerShell script which does some logging and sends 2 emails to the newly created user.
1 email containing the username and 1 email with the password.
What we want:
Create 2 email templates within Mautic, 1 with some text and the {username}, 1 with some text and the {password}.
Instead of making PowerShell send the 2 emails, we want PowerShell to make two API calls to Mautic which sends the “welcome” emails.
- First API call includes the new user email and username and sends this information to the given email
- Second API call includes the new user email and password and sends this information to the given email
I did find this ( How send emails with Mautic with a custom text using API? - Stack Overflow) article (among a few others) on how to use custom inputs for email (such as the username and password).
It would be nice if the emails can be send without the need to create a contact, but if that’s not possible we can create the contact and then delete it.
Also, if it’s not possible to make the API calls with PowerShell, I could use PHP to make the API calls (but preferable with PowerShell).
Does anyone have or know such a solution?
I’ve been searching for a few days but haven’t found how I should do this yet.