Example #1
0
        private void Send(SendMailModel model)
        {
            var smtp = new Client(_host, _userId, _password, _port, _enableSsl);

            if (smtp != null)
            {
                smtp.Send(
                    model.Name, model.From, model.To,
                    model.Body, model.Body,
                    model.AttachmentFilenames == null ? null : model.AttachmentFilenames.ToArray());

                IDisposable dispose = smtp as IDisposable;

                if (dispose != null)
                {
                    dispose.Dispose();
                }
            }
        }
Example #2
0
 public ClientHelper AddWork(SendMailModel model)
 {
     _sendList.Add(model);
     return(this);
 }