Guest User

Untitled

a guest
Jan 17th, 2018
342
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 1.94 KB | None | 0 0
  1. import { Meteor } from 'meteor/meteor';
  2.  
  3. if (Meteor.isServer){
  4. Meteor.startup(() => {
  5. process.env.MAIL_URL="smtp://mygmailaddress%40gmail.com:mypassword@smtp.gmail.com:465/";
  6. });
  7.  
  8. Email.send({
  9. to: "sendeto@yahoo.com",
  10. from: "sendfrom@gmail.com",
  11. subject: "Example Email",
  12. text: "The contents of our email in plain text.",
  13. });
  14.  
  15. }
  16.  
  17. W20170420-14:49:33.820(1)? (STDERR) js-bson: Failed to load c++ bson extension, using pure JS version
  18. I20170420-14:49:34.997(1)? ====== BEGIN MAIL #0 ======
  19. I20170420-14:49:34.998(1)? (Mail not sent; to enable sending, set the MAIL_URL environment variable.)
  20. I20170420-14:49:35.019(1)? Content-Type: text/plain
  21. I20170420-14:49:35.021(1)? From: kehindeadeoya@gmail.com
  22. I20170420-14:49:35.023(1)? To: ken4ward@yahoo.com
  23. I20170420-14:49:35.026(1)? Subject: Example Email
  24. I20170420-14:49:35.027(1)? Message-ID: <6b59f210-f727-aff3-2695-335a774e936a@gmail.com>
  25. I20170420-14:49:35.028(1)? Content-Transfer-Encoding: 7bit
  26. I20170420-14:49:35.031(1)? Date: Thu, 20 Apr 2017 13:49:35 +0000
  27. I20170420-14:49:35.032(1)? MIME-Version: 1.0
  28. I20170420-14:49:35.034(1)?
  29. I20170420-14:49:35.050(1)? The contents of our email in plain text.
  30. I20170420-14:49:35.052(1)? ====== END MAIL #0 ======
  31.  
  32. import { Meteor } from 'meteor/meteor';
  33.  
  34. Meteor.startup(function () {
  35. if(Meteor.isServer) {
  36. process.env.MAIL_URL="smtp://mygmailaddress%40gmail.com:mypassword@smtp.gmail.com:465/";
  37.  
  38. Email.send({
  39. to: to,
  40. from: "sendfrom@gmail.com",
  41. subject: "Example Email",
  42. text: "The contents of our email in plain text.",
  43. });
  44. });
  45. }
  46.  
  47. import { Meteor } from 'meteor/meteor';
  48.  
  49. if (Meteor.isServer){
  50. Meteor.startup(() => {
  51. process.env.MAIL_URL="smtp://mygmailaddress%40gmail.com:mypassword@smtp.gmail.com:465/";
  52. Email.send({
  53. to: "sendeto@yahoo.com",
  54. from: "sendfrom@gmail.com",
  55. subject: "Example Email",
  56. text: "The contents of our email in plain text.",
  57. });
  58. });
  59. }
  60.  
  61. export MAIL_URL="smtp://yourGmailAddress:yourPassword@smtp.gmail.com:587"
Add Comment
Please, Sign In to add comment