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