BEST /BaliEnterpriseSystems/BaliEnterpriseSystems/BestObjects/BestEMail.cs

Language C# Lines 60
MD5 Hash 9a87c94fb824840b02a1a4e27d52c0f0
Repository https://github.com/sirivedula/BEST.git View Raw File
 1
 2
 3
 4
 5
 6
 7
 8
 9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
using System;
using System.Data;
using System.Configuration;
using System.Linq;
using System.Web;
using System.Web.Security;
using System.Web.UI;
using System.Web.UI.HtmlControls;
using System.Web.UI.WebControls;
using System.Web.UI.WebControls.WebParts;
using System.Xml.Linq;
using System.Net.Mail;

namespace BaliEnterpriseSystems.BestObjects
{
    public class BestEMail
    {
        public BestEMail()
        {

        }

        public void SendEMail()
        {
            MailMessage mail = new MailMessage();
            mail.To.Add(this.ToMail);
            mail.From = new MailAddress(this.FromMail);
            mail.Subject = this.Subject;
            mail.Body = this.Body;
            SmtpClient smtp = new SmtpClient();
            smtp.Host = ConfigurationManager.AppSettings["SMTP"];
            smtp.Send(mail);
        }

        public string ToMail
        {
            get;
            set;
        }

        public string Subject
        {
            get;
            set;
        }

        public string Body
        {
            get;
            set;
        }

        public string FromMail
        {
            get;
            set;
        }
    }
}
Back to Top