Template.mailer.onCreated(function (){
	
	return Session.set("mailerStatus", "");

	let self = this;
	self.autorun(() => {
		self.subscribe('allUsers');
		self.subscribe('allUserData');
	});


});

Template.mailer.helpers({
	message () {
		
	    return "Tomorrow is THE DAY! Meet you guys at 9AM at checkpoint. Don't miss out.";
	},
	status () {

		return Session.get("mailerStatus");
	}
});

Template.mailer.events({
  	'submit .mailer'(event) {

    	event.preventDefault();
    	Session.set("mailerStatus", "Message sent");
    	const mail = event.target.mail;

    	Meteor.users.find().forEach(function(item){
		    
		    /* Emails */
		    if (item.emails) {

		    	Meteor.call(
				  'sendEmail',
				  item.emails[0].address,
				  'hi@worldcleanupday.com',
				  "World Cleanup Day",
				  mail.value
				);
		    }

		    /* Phones */
		    if (item.phone)
		    	console.log(item.phone.number);
		}) 
	},
});
@@ -659,16 +659,26 @@
 ils) %7B%0A%0A
+%09%09    %09/*%0A
 %09%09    %09M
@@ -821,16 +821,23 @@
 %0A%09%09%09%09);%0A
+%09%09%09%09*/%0A
 %09%09    %7D%0A
@@ -877,24 +877,26 @@
 m.phone)
+ %7B
 %0A%09%09    %09
 console.
@@ -883,24 +883,27 @@
 e) %7B%0A%09%09    %09
+/* 
 console.log(
@@ -921,16 +921,27 @@
 number);
+ */%0A%09%09    %7D
 %0A%09%09%7D) %0A%09

Disable messaging system