By using this site, you agree to our updated Privacy Policy and our Terms of Use. Manage your Cookies Settings.
446,267 Members | 1,861 Online
Bytes IT Community
+ Ask a Question
Need help? Post your question and get tips & solutions from a community of 446,267 IT Pros & Developers. It's quick & easy.

sending mails from pages

P: 6
hi every one,
plz help me out, i have to send mails from my page.... I have tried a code where mails are going only to gmail users

the code is ...

using System.Web.Mail;

protected void btnSend_Click(object sender, EventArgs e)
MailMessage msg = new MailMessage();
msg.To = txtTo.Text;
msg.From = txtFrom.Text;
msg.Cc = txtcc.Text;
msg.Bcc = txtbcc.Text;
msg.Subject = txtSubject.Text;
msg.Body = txtContent.Value;
lblStatus.Text = "Sending...";
lblStatus.Text = "Email sent (" + txtSubject.Text + ") to " + txtTo.Text;

any thing wrong, plz help me and i also want to put attachment files, try to give code for file attachments in sending mails....

thanking you
Jul 19 '07 #1
Share this Question
Share on Google+
2 Replies

Expert 2.5K+
P: 4,871
Try searching TSDN, there are many posts on sending emails.
Jul 19 '07 #2

Expert 5K+
P: 7,872
We even have an article!
Jul 19 '07 #3

Post your reply

Sign in to post your reply or Sign up for a free account.