G
Guest
Issue is that I really do not know diddly. Copying and trying to learn as
much as I can about VB and ASP2.0. Now the question I have is I created an
E-Mail form the sendmail properties in the VB side are
Imports System.Net.Mail
Partial Class _Default
Inherits System.Web.UI.Page
Protected Sub Wizard1_FinishButtonClick(ByVal sender As Object, ByVal e
As System.Web.UI.WebControls.WizardNavigationEventArgs) Handles
Wizard1.FinishButtonClick
SendMail(TXTEMail.Text, TXTComments.Text)
End Sub
Private Sub SendMail(ByVal from As String, ByVal body As String)
Dim mailServerName As String = "My.Mail.Server"
Dim message As MailMessage = New MailMessage(from, "(e-mail address removed)",
"Sent from E-Form", body)
Dim mailClient As SmtpClient = New SmtpClient
mailClient.Host = mailServerName
mailclient.Send(message)
message.Dispose()
End Sub
The problem is I have four items that I want sent to me but right now all I
can get are the two listed in SendMail(TXTEMail.Text, TXTComments.Text) I
also want my Subject and Name boxes sent as well. If i add them to the
SendMail(TXTEMail.Text, TXTComments.Text) I get an error. What am I doing
wrong and do i have this all wrong? Help in coding would be appreciated and
where it goes.
Thanks in advance
much as I can about VB and ASP2.0. Now the question I have is I created an
E-Mail form the sendmail properties in the VB side are
Imports System.Net.Mail
Partial Class _Default
Inherits System.Web.UI.Page
Protected Sub Wizard1_FinishButtonClick(ByVal sender As Object, ByVal e
As System.Web.UI.WebControls.WizardNavigationEventArgs) Handles
Wizard1.FinishButtonClick
SendMail(TXTEMail.Text, TXTComments.Text)
End Sub
Private Sub SendMail(ByVal from As String, ByVal body As String)
Dim mailServerName As String = "My.Mail.Server"
Dim message As MailMessage = New MailMessage(from, "(e-mail address removed)",
"Sent from E-Form", body)
Dim mailClient As SmtpClient = New SmtpClient
mailClient.Host = mailServerName
mailclient.Send(message)
message.Dispose()
End Sub
The problem is I have four items that I want sent to me but right now all I
can get are the two listed in SendMail(TXTEMail.Text, TXTComments.Text) I
also want my Subject and Name boxes sent as well. If i add them to the
SendMail(TXTEMail.Text, TXTComments.Text) I get an error. What am I doing
wrong and do i have this all wrong? Help in coding would be appreciated and
where it goes.
Thanks in advance