public void Broadcast(string message) { var phoneNums = phoneNumbers.Where(x => !x.Equals(this.smsModel.From)); var sender = new TextMessageSender(); sender.Send(message, phoneNums); }
/// <summary> /// Sends a text or email to the players contact information /// </summary> /// <param name="msg">The message to send.</param> /// <param name="subject">The subject of the message, used when sending emails.</param> public void ReceiveMessage(string msg, string subject) { //Add a footer to the message which includes a link back to the game. msg += "\n\nPlease visit theteam6.com to return to your game."; //If the player has an email send them an email, otherwise, send to their phone number. if (HasEmail()) { EmailSender.Send(Email, subject, msg, false); } else { TextMessageSender.Send(msg, Phone); } }