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

email sending with asp.net/vb.net 2.0

P: n/a
Hi all ,

I have notify.aspx page. On this page i have 10 textboxes with some
values coming from database.and i have also placed two buttons namely
send and save . when i click on send button, the mail is going to
target emailid(To).
but all the contents means textboxes values are not going with this
mail.
Only the parameters i have defiend in send method that parameters only
appears.
But i want all the 10 textboxes values to be sent to the email id that
means the web page(notify.aspx) control contents(textbox values).

this is my code which i have wrriten, please help me to solve the
problem or correct the code please.

Protected Sub btnSend_Click(ByVal sender As Object, ByVal e As
EventArgs)

Dim Mailmsg As New System.Net.Mail.MailMessage()

Dim MailServerName As String = "12.96.164.83"
Dim mSmtpClient As New Net.Mail.SmtpClient
mSmtpClient.Host = MailServerName
mSmtpClient.Port = 25
Mailmsg.IsBodyHtml = True

Try
mSmtpClient.Send("dh*********@OptimalSol.com",
"dh*********@OptimalSol.com", "Hi test mail", "Hello buddy")
Catch objException As Exception

End Try
End Sub
Thanks in advance
Dhananjay
Feb 22 '08 #1
Share this Question
Share on Google+
1 Reply


P: n/a

I have downloadable code for email sending at:
http://sholliday.spaces.live.com/Blog/cns!A68482B9628A842A!138.entry

Download the code, change a few settings (smtp server really)..and it should
work.

You can either use the library as is, or pull out what you need.

Code is easily translatable. Its more important to figure out which
properties to set.

Good luck.


"Dhananjay" <dh**********@yahoo.co.inwrote in message
news:1a**********************************@s37g2000 prg.googlegroups.com...
Hi all ,

I have notify.aspx page. On this page i have 10 textboxes with some
values coming from database.and i have also placed two buttons namely
send and save . when i click on send button, the mail is going to
target emailid(To).
but all the contents means textboxes values are not going with this
mail.
Only the parameters i have defiend in send method that parameters only
appears.
But i want all the 10 textboxes values to be sent to the email id that
means the web page(notify.aspx) control contents(textbox values).

this is my code which i have wrriten, please help me to solve the
problem or correct the code please.

Protected Sub btnSend_Click(ByVal sender As Object, ByVal e As
EventArgs)

Dim Mailmsg As New System.Net.Mail.MailMessage()

Dim MailServerName As String = "12.96.164.83"
Dim mSmtpClient As New Net.Mail.SmtpClient
mSmtpClient.Host = MailServerName
mSmtpClient.Port = 25
Mailmsg.IsBodyHtml = True

Try
mSmtpClient.Send("dh*********@OptimalSol.com",
"dh*********@OptimalSol.com", "Hi test mail", "Hello buddy")
Catch objException As Exception

End Try
End Sub
Thanks in advance
Dhananjay

Feb 22 '08 #2

This discussion thread is closed

Replies have been disabled for this discussion.