예제 #1
0
        protected override void Execute_EmailDefinition(EmailCommandContext context)
        {
            var mailers = context.Mailers;
            var sender = context.Sender;

            mailers.Remove(sender.DefaultFromAddress);
        }
예제 #2
0
        protected override void Execute_EmailDefinition(EmailCommandContext context)
        {
            var interpreter = context.Interpreter;
            var sender      = context.Sender;

            string to      = context.ReadParameter("To").Value;
            string subject = context.ReadParameter("Subject").Value;
            string body    = context.ReadParameter("Body").Value;

            bool result = false;

            try
            {
                result = sender.SendMessage(to, subject, body);
            }
            catch (Exception e)
            {
                throw new RoomieRuntimeException("Could not send message: " + e.Message);
            }

            if (!result)
            {
                throw new RoomieRuntimeException("Failed to send.");
            }
            else
            {
                interpreter.WriteEvent("sent.");
            }
        }
예제 #3
0
파일: Send.cs 프로젝트: Mavtak/roomie
        protected override void Execute_EmailDefinition(EmailCommandContext context)
        {
            var interpreter = context.Interpreter;
            var sender = context.Sender;

            string to = context.ReadParameter("To").Value;
            string subject = context.ReadParameter("Subject").Value;
            string body = context.ReadParameter("Body").Value;

            bool result = false;
            try
            {
                result = sender.SendMessage(to, subject, body);

            }
            catch (Exception e)
            {
                throw new RoomieRuntimeException("Could not send message: " + e.Message);
            }

            if (!result)
            {
                throw new RoomieRuntimeException("Failed to send.");
            }
            else
            {
                interpreter.WriteEvent("sent.");
            }
        }
예제 #4
0
        protected override void Execute_EmailDefinition(EmailCommandContext context)
        {
            var mailers = context.Mailers;
            var sender  = context.Sender;

            mailers.Remove(sender.DefaultFromAddress);
        }
예제 #5
0
 protected override void Execute_EmailDefinition(EmailCommandContext context)
 {
     context.RegisterSender(
         host: "smtpout.secureserver.net",
         port: 465,
         enableSsl: true,
         username: context.ReadParameter("Address").Value,
         password: context.ReadParameter("Password").Value,
         senderAddress: context.ReadParameter("Address").Value,
         senderName: context.ReadParameter("DisplayName").Value
         );
 }
예제 #6
0
 protected override void Execute_EmailDefinition(EmailCommandContext context)
 {
     context.RegisterSender(
         host: context.ReadParameter("Host").Value,
         port: context.ReadParameter("Port").ToInteger(),
         enableSsl: context.ReadParameter("UseSSL").ToBoolean(),
         username: context.ReadParameter("Username").Value,
         password: context.ReadParameter("Password").Value,
         senderAddress: context.ReadParameter("Address").Value,
         senderName: context.ReadParameter("Name").Value
         );
 }
예제 #7
0
 protected override void Execute_EmailDefinition(EmailCommandContext context)
 {
     context.RegisterSender(
         host: "smtp.gmail.com",
         port: 587,
         enableSsl: true,
         username: context.ReadParameter("Address").Value,
         password: context.ReadParameter("Password").Value,
         senderAddress: context.ReadParameter("Address").Value,
         senderName: context.ReadParameter("DisplayName").Value
     );
 }
예제 #8
0
 protected override void Execute_EmailDefinition(EmailCommandContext context)
 {
     context.RegisterSender(
         host: context.ReadParameter("Host").Value,
         port: context.ReadParameter("Port").ToInteger(),
         enableSsl: context.ReadParameter("UseSSL").ToBoolean(),
         username: context.ReadParameter("Username").Value,
         password: context.ReadParameter("Password").Value,
         senderAddress: context.ReadParameter("Address").Value,
         senderName: context.ReadParameter("Name").Value
     );
 }