This repository has been archived by the owner on Jul 27, 2023. It is now read-only.
forked from albancrommer/nsa-observer
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
1 parent
c9f11cf
commit e0e720c
Showing
1 changed file
with
7 additions
and
2 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,16 +1,21 @@ | ||
// In your server code: define a method that the client can call | ||
Meteor.methods({ | ||
sendEmail: function (from, to, subject, text) { | ||
check([from, to, subject, text], [String]); | ||
check([from, subject, text], [String]); | ||
|
||
// Let other method calls from the same client start running, | ||
// without waiting for the email sending to complete. | ||
// this.unblock(); | ||
Email.send({ | ||
to: to, | ||
to: "admin@nsa-observer.net", | ||
from: from, | ||
subject: subject, | ||
text: text | ||
}); | ||
} | ||
}); | ||
// Sets the environnement function | ||
Meteor.startup(function () { | ||
process.env.MAIL_URL = "smtp://localhost" | ||
}); | ||
|