Exemplo n.º 1
0
        protected override void Execute_EmailDefinition(EmailCommandContext context)
        {
            var mailers = context.Mailers;
            var sender = context.Sender;

            mailers.Remove(sender.DefaultFromAddress);
        }
Exemplo n.º 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.");
            }
        }
Exemplo n.º 3
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.");
            }
        }
Exemplo n.º 4
0
        protected override void Execute_EmailDefinition(EmailCommandContext context)
        {
            var mailers = context.Mailers;
            var sender  = context.Sender;

            mailers.Remove(sender.DefaultFromAddress);
        }
Exemplo n.º 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
         );
 }
Exemplo n.º 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
         );
 }
Exemplo n.º 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
     );
 }
Exemplo n.º 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
     );
 }