Send Email from new plugin


#1

Hi guys,

I’ve built customized new plugin in imports/plugins/custom/myplugin.
I built customized component but can’t call /server/api functions.

How can I use /server/api functions?

Thanks,


#2

You can’t call server code from client-side code (I am assuming it’s client-side since you said “component”). You will have to use Meteor methods to do that. Generally we wouldn’t expose something like sending an email to a client-side method since of the possibility of exploit.