Meteor 1.3 calling server only methods

Hi guys,

With meteor 1.3, what is the best way to structure and call meteor methods which are calling server only function ( like email )?

Do you mean calling server only Method’s from something else running server side? (so nothing on the client is involved at all?) If so don’t use Method’s - just call your code directly on the server (see the Calling section of the Guide for more info).

I am trying to call a meteor method which on the server would send out emails and I am following the meteor guide’s approach for writing the methods.

So, my thinking was, if i import the method and call it, as in the guide, on the server side it should be sending the email, but thats not working and I am not getting any errors or console log on my terminal. I am not sure how to approach this…

Btw, for my app structure I am following the meteor guide and the method is in api folder

Can you share some of your code? In particular how you’re calling the method from the client side, how you’ve defined the method, and how you’re registering the method server side.

You don’t have to import the method call.
Just have your normal method code inside a file in a server only directory.

  blah(): {
     // method here...

This has always worked for me, even up to the latest rc.