In the core API there is a call to
emailService.sendSavedFormEmail(submission, formUrl, submission.contactEmailAddress)
that allows me to send a generic saved form email easily.
Since the Fluent API uses the Emailer Service to send an email, how could I accomplish this in the fluent API?
new Emailer() .setToAddress("firstname.lastname@example.org") .setTxnId(3L) .setSubject("Subject") .setMessage("Hello, John Doe! How are you?") .sendEmail()
Thanks for your response. I know that you can use the Emailer() fluent approach to send an email but the Core 4.3 API had a specific method designated to building a consistent generic saved form email. This method is not available in the Fluent API.
To send an equivalent saved form email by hand would require building a customer template and extra configuration using the fluent approach. Also we would have to make the custom approach reusable anywhere we want to sent a saved form email and make sure to include access to that custom saved form email method.
I think that this seems to be missing functionality that existed in the 4.3 Core API but has not been added to the fluent API.
Could we add a method similar to #sendSavedFormEmail to The Emailer or a similar Class?
Do you mean a similar approach?:Send templated email with Fluent API
In regards to the "Send templated email with Fluent API" question that Jye asksed, I am asking for a "shortcut" method that would do all of the Velocity Template configuration for me so I don't have to repeatedly define it. We had these specialized send methods in the 4.3 core API and it would be nice to also have them for the Fluent API as their need is still valid.