Right now, the accounts-password package only support sending verification email over SMTP, via Accounts.sendVerificationEmail() using the Email.send() method.
I could not find any way/hacks to customize the behaviour of Accounts.sendVerificationEmail() , to send the mail with Mailgun API for example.
I have two question :
Is customizing the way accounts-password sends mails even on the roadmap ? If not, I would like to propose the idea and fork the official repo.
How do you propose features for meteor official core packages ?
Since the accounts packages use that email package.
You could do that by downloading it in your packages folder and using a local copy. Another way could be to override the Email object but that does not seem like an easy job because the function is private.
I don’t think customizing Accounts.sendVerificationEmail is the way to go. Email.send already allows you to specify your own MAIL_URL, which can also be used to send emails through Mailgun. See this Meteor Chef article for more information.
In general, the best way to propose a feature is to either discuss your use case and proposal first on the forum (if it is more open ended) or open an issue on GitHub if you have a specific feature request in mind.
funny hack, but we wanted to send our verification emails using a handlebars template in Mandrill, so we set use Mandrill’s SMPT for our all emails, then we send the verification email’s subject to “killme” then made a rule in Mandrill to reject any email with subject “killme”. Then we just pass the activationUrl to our custom Mandrill template.