TECHNOLOGIES
FORUMS
JOBS
BOOKS
EVENTS
INTERVIEWS
Live
MORE
LEARN
Training
CAREER
MEMBERS
VIDEOS
NEWS
BLOGS
Sign Up
Login
No unread comment.
View All Comments
No unread message.
View All Messages
No unread notification.
View All Notifications
Answers
Post
An Article
A Blog
A News
A Video
An EBook
An Interview Question
Ask Question
Forums
Monthly Leaders
Forum guidelines
ashish gupta
NA
3
0
mail
May 25 2010 10:13 AM
protected
void
MailSend()
{
ar = (
ArrayList
)Session[
"Detail"
];
//ar = (string[])Session["User_Info"];
string
To_email = ar[4].ToString().Trim();
MailMessage
Mail =
new
MailMessage
();
MailAddress
ma =
new
MailAddress
(
ConfigurationManager
.AppSettings[
"AdminId"
],
ConfigurationManager
.AppSettings[
"Name"
]);
Mail.From = ma;
Mail.To.Add(To_email);
Mail.IsBodyHtml =
true
;
Mail.Subject =
"Subject"
;
//string bdy = "Dear " +ar[1].ToString()+ "<br>" + "Thanks for registration on Universal Export mart your password is " +ar[5].ToString() + " " + "we will give you a confirmation mail after that you can sell your items on our site<br>" + "Support Team " + "<br>" + "Universal Export mart";
string
bdy =
"Dear "
+ ar[1].ToString() +
"<br>"
+
"Thanks for registration on Universal Export mart your password is "
+ ar[5].ToString() +
" "
+
"we will give you a confirmation mail after that you can sell your items on our site<br>"
;
Mail.Body = bdy;
SmtpClient
smtpMailObj =
new
SmtpClient
();
//eg:localhost, 192.168.0.x, replace with your server name
smtpMailObj.Port = 465;
smtpMailObj.Host =
ConfigurationManager
.AppSettings[
"Host"
];
smtpMailObj.Credentials =
new
System.Net.
NetworkCredential
(
ConfigurationManager
.AppSettings[
"AdminId"
],
ConfigurationManager
.AppSettings[
"Password"
]);
smtpMailObj.Send(Mail);
lblError.Text =
"Mail sent successfully"
;
Reply
Answers (
1
)
Compile .net application from another .net application
Upload an image on the server