Ejemplo n.º 1
0
 public static void Send(Beacon beacon, User user, User creator, string subject, string text)
 {
     if (creator.ContactBySMS && !string.IsNullOrWhiteSpace(creator.PhoneNumber))
     {
         var twilio = new TwilioHelper();
             twilio.SendSMS(creator.PhoneNumber, text);
     }
     else if (creator.ContactByEmail && !string.IsNullOrWhiteSpace(creator.Email))
     {
         var sendgrid = new SendGridHelper();
             sendgrid.Send(creator.Email, subject, text);
     }
 }
Ejemplo n.º 2
0
        private void sendNewUserMessages(User usr)
        {
            Notifications.TwilioHelper th = new TwilioHelper();
            Notifications.SendGridHelper sh = new SendGridHelper();
            var bm = new BeaconManager();
            var relevantBeacons = bm.GetBeacons(usr.Lat, usr.Long, usr.CategoryInterests, usr.TravelRadius, null , DateTime.Now.AddDays(7));
            var smsText = string.Format("Welcome to Beacon");

            th.SendSMS(usr.PhoneNumber, smsText);
        }