public static void Register(string email, string password)
            {
                MailService ms = new MailService(email, "User registration", "Body of message...");
                SmsService  ss = new SmsService("111 111 111", "User succesfully registered...");

                try
                {
                    if (ms.ValidEmail())
                    {
                        ms.SendNotification();
                    }
                    ss.SendNotification();
                }
                catch (Exception e)
                {
                    Console.WriteLine(e.Message);
                    throw;
                }
            }
Beispiel #2
0
        public static void Register(string email, string password)
        {
            try
            {
                MailService ms = new MailService();
                ms.Email      = email;
                ms.EmailTitle = "User registration";
                ms.EmailBody  = "Body of message...";

                SmsService ss = new SmsService();
                ss.Number  = "111 111 111";
                ss.SmsText = "User successfully registered...";

                if (ms.ValidEmail() == true)
                {
                    ms.SendNotification();
                    ss.SendNotification();
                }
            }
            catch (Exception ex)
            {
                throw;
            }
        }