private void LineNotify(MRegistration param, string message)
        {
            string           token = Environment.GetEnvironmentVariable("MAGNUM_LINE_TOKEN");
            LineNotification line  = new LineNotification();

            line.SetNotificationToken(token);

            string lineMsg = String.Format(
                "\nMagnumWeb Product Verification\nSerial:{0}\nPin:{1}\nMessage:{2}\n",
                param.SerialNumber, param.Pin, message);

            line.Send(lineMsg);
        }
        public virtual bool SendEmail(MContactUs form, string captchaToken)
        {
            bool   result  = false;
            string emailTo = GetEmailTo();

            if (emailTo != null)
            {
                Mail m = new Mail();
                m.From          = "*****@*****.**";
                m.FromName      = form.Name;
                m.To            = emailTo;
                m.Subject       = form.Subject;
                m.IsHtmlContent = true;
                m.Body          = form.Email + ", " + form.Message;
                m.BCC           = "";
                m.CC            = "";

                ISmtpContext smtpContext = GetSmtpContext();
                smtpContext.Send(m);

                Log.Logger.Information("Email sent to [{0}]", emailTo);
                result = true;

                string shortToken = captchaToken.Substring(0, 10);

                LineNotification line  = new LineNotification();
                string           token = Environment.GetEnvironmentVariable("MAGNUM_LINE_TOKEN");
                line.SetNotificationToken(token);
                string lineMsg = String.Format(
                    "\nMagnumWeb ContactUs\nFrom:{0}\nSubject:{1}\nMessage:{2}\nCaptcha:{3}",
                    form.Email, form.Subject, form.Message, shortToken);
                line.Send(lineMsg);
            }
            else
            {
                Log.Logger.Information("Env variable MAGNUM_EMAIL_TO not set!!!");
            }
            return(result);
        }