示例#1
0
        private void EnviarEmail(string assunto, string mensagem, string endereco)
        {
            EMail eMail = new EMail();

            eMail.Client("smtp.gmail.com");

            eMail.Port = 587;

            eMail.FromAddress = "*****@*****.**";
            eMail.Acount      = "*****@*****.**";
            eMail.PassWord    = "******";
            eMail.EnableSsl   = true;

            eMail.Subject = assunto;

            eMail.Body = mensagem.Replace("\\n", Environment.NewLine);
            eMail.AddTo(endereco);
            try
            {
                eMail.Send();

                eMail.ClearTo();
            } catch (Exception ex)
            { }
        }