email sending with asp.net/vb.net 2.0

Collapse
This topic is closed.
X
X
 
  • Time
  • Show
Clear All
new posts
  • Dhananjay

    email sending with asp.net/vb.net 2.0

    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.asp x) control contents(textbo x 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(B yVal 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.SmtpCl ient
    mSmtpClient.Hos t = MailServerName
    mSmtpClient.Por t = 25
    Mailmsg.IsBodyH tml = True

    Try
    mSmtpClient.Sen d("dhananjay.k@ OptimalSol.com" ,
    "dhananjay.k@Op timalSol.com", "Hi test mail", "Hello buddy")
    Catch objException As Exception

    End Try
    End Sub


    Thanks in advance
    Dhananjay
  • sloan

    #2
    Re: email sending with asp.net/vb.net 2.0


    I have downloadable code for email sending at:
    http://sholliday.space s.live.com/Blog/cns!A68482B9628 A842A!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" <dhananjay_3k@y ahoo.co.inwrote in message
    news:1a8aef6e-577d-4383-ab4b-f56365e19b8d@s3 7g2000prg.googl egroups.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.asp x) control contents(textbo x 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(B yVal 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.SmtpCl ient
    mSmtpClient.Hos t = MailServerName
    mSmtpClient.Por t = 25
    Mailmsg.IsBodyH tml = True
    >
    Try
    mSmtpClient.Sen d("dhananjay.k@ OptimalSol.com" ,
    "dhananjay.k@Op timalSol.com", "Hi test mail", "Hello buddy")
    Catch objException As Exception
    >
    End Try
    End Sub
    >
    >
    Thanks in advance
    Dhananjay

    Comment

    Working...