mailing concepts
-
Two namespaces: 1) System.Web.Mail 2) System.Net.Mail
Vasudevan Deepak Kumar Personal Homepage
Tech Gossips
A pessimist sees only the dark side of the clouds, and mopes; a philosopher sees both sides, and shrugs; an optimist doesn't see the clouds at all - he's walking on them. --Leonard Louis Levinson -
dim MyMsg as new MailMessage() MyMsg.From = new MailAddress("myadmin@domainname.com", "My Admin") MyMsg.To.Add(new MailAddress("a.sehajpal@gmail.com")) MyMsg.Bcc.Add(new MailAddress("ashish_sehajpal@yahoo.com")) MyMsg.Subject = "My Reports" MyMsg.Attachments.Add(new Attachment(Server.MapPath("folder/sendReport.doc"))) MyMsg.IsBodyHtml = true MyMsg.Body = "<html><body>Find The Attached Reports</body></html>" try SmtpClient client = new SmtpClient() client.Host = "mail.domainname.com" client.Send(MyMsg) catch ex as exception ' do something useful here end try :-D
Ashish Sehajpal
-
dim MyMsg as new MailMessage() MyMsg.From = new MailAddress("myadmin@domainname.com", "My Admin") MyMsg.To.Add(new MailAddress("a.sehajpal@gmail.com")) MyMsg.Bcc.Add(new MailAddress("ashish_sehajpal@yahoo.com")) MyMsg.Subject = "My Reports" MyMsg.Attachments.Add(new Attachment(Server.MapPath("folder/sendReport.doc"))) MyMsg.IsBodyHtml = true MyMsg.Body = "<html><body>Find The Attached Reports</body></html>" try SmtpClient client = new SmtpClient() client.Host = "mail.domainname.com" client.Send(MyMsg) catch ex as exception ' do something useful here end try :-D
Ashish Sehajpal
You went ahead and spoilt a developer from doing his homework.
Vasudevan Deepak Kumar Personal Homepage
Tech Gossips
A pessimist sees only the dark side of the clouds, and mopes; a philosopher sees both sides, and shrugs; an optimist doesn't see the clouds at all - he's walking on them. --Leonard Louis Levinson -
You went ahead and spoilt a developer from doing his homework.
Vasudevan Deepak Kumar Personal Homepage
Tech Gossips
A pessimist sees only the dark side of the clouds, and mopes; a philosopher sees both sides, and shrugs; an optimist doesn't see the clouds at all - he's walking on them. --Leonard Louis Levinsonthen what is problem in ur stomach?
Ashish Sehajpal
-
then what is problem in ur stomach?
Ashish Sehajpal
-
what was that?:confused:
Ashish Sehajpal