Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- import { Meteor } from 'meteor/meteor';
- if (Meteor.isServer){
- Meteor.startup(() => {
- process.env.MAIL_URL="smtp://mygmailaddress%40gmail.com:mypassword@smtp.gmail.com:465/";
- });
- Email.send({
- to: "sendeto@yahoo.com",
- from: "sendfrom@gmail.com",
- subject: "Example Email",
- text: "The contents of our email in plain text.",
- });
- }
- W20170420-14:49:33.820(1)? (STDERR) js-bson: Failed to load c++ bson extension, using pure JS version
- I20170420-14:49:34.997(1)? ====== BEGIN MAIL #0 ======
- I20170420-14:49:34.998(1)? (Mail not sent; to enable sending, set the MAIL_URL environment variable.)
- I20170420-14:49:35.019(1)? Content-Type: text/plain
- I20170420-14:49:35.021(1)? From: kehindeadeoya@gmail.com
- I20170420-14:49:35.023(1)? To: ken4ward@yahoo.com
- I20170420-14:49:35.026(1)? Subject: Example Email
- I20170420-14:49:35.027(1)? Message-ID: <6b59f210-f727-aff3-2695-335a774e936a@gmail.com>
- I20170420-14:49:35.028(1)? Content-Transfer-Encoding: 7bit
- I20170420-14:49:35.031(1)? Date: Thu, 20 Apr 2017 13:49:35 +0000
- I20170420-14:49:35.032(1)? MIME-Version: 1.0
- I20170420-14:49:35.034(1)?
- I20170420-14:49:35.050(1)? The contents of our email in plain text.
- I20170420-14:49:35.052(1)? ====== END MAIL #0 ======
- import { Meteor } from 'meteor/meteor';
- Meteor.startup(function () {
- if(Meteor.isServer) {
- process.env.MAIL_URL="smtp://mygmailaddress%40gmail.com:mypassword@smtp.gmail.com:465/";
- Email.send({
- to: to,
- from: "sendfrom@gmail.com",
- subject: "Example Email",
- text: "The contents of our email in plain text.",
- });
- });
- }
- import { Meteor } from 'meteor/meteor';
- if (Meteor.isServer){
- Meteor.startup(() => {
- process.env.MAIL_URL="smtp://mygmailaddress%40gmail.com:mypassword@smtp.gmail.com:465/";
- Email.send({
- to: "sendeto@yahoo.com",
- from: "sendfrom@gmail.com",
- subject: "Example Email",
- text: "The contents of our email in plain text.",
- });
- });
- }
- export MAIL_URL="smtp://yourGmailAddress:yourPassword@smtp.gmail.com:587"
Add Comment
Please, Sign In to add comment