Closed
Description
New Feature / Enhancement Checklist
- I am not disclosing a vulnerability.I am not just asking a question.I have searched through existing issues.
Current Limitation
I currently use a Mailgun emailAdapter on my Parse Servers. Yet in my cloud code whenever I want to send email, I have to call:
const api_key = "";
const domain = "";
const mailgun = require("mailgun-js")({
apiKey: api_key,
domain: domain
});
const data = {
from: "",
to: obj.get("email"),
subject: "",
text: ",
html: summary
};
mailgun.messages().send(data, function(error, body) {});
I could be doing this wrong, idk.
Feature / Enhancement Description
It would be nice to have:
Parse.Cloud.sendEmail(data)
and it inherit the sendEmail function from the emailAdapter. It would also support newer developers as they don't have to read their mail providers docs to learn how to send email, as the adapter handles it for them. If no email adapter is specified, throw an error.
Metadata
Metadata
Assignees
Type
Projects
Milestone
Relationships
Development
No branches or pull requests
Activity
mman commentedon Dec 24, 2020
You can already do this easily like this:
mtrezza commentedon Dec 24, 2020
Thanks for suggesting.
It may be just a simple PR, but it could be a nice convenience method to simply call
Parse.Cloud.sendMail({...})
instead of having to reference the mail adapter manually, saving one or two lines of code and reducing complexity for the developer.dblythy commentedon Dec 24, 2020
PR already on the way if you’re keen to review my code again @mtrezza ;)
mtrezza commentedon Dec 30, 2020
Closed by #7096.