I have a form that users type in information into. It then e-mails the
specified user below. What I am looking for is how can I e-mail a carbon
copy of this same informtaion back to the user at TXTEMail.Text when the user
clicks my SEND button. I removed unnecessarry code.
My thought was to add a new DIM EMAILCC = TXTEMail.Text
then add (from, emailto, ,emailcc, subject,
But that failed with a "Overload resolution failed because no accessible
'New' accept this number of arguments."
So without rewriting my code any help?
PS yes I am new to writing code.
CODE
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.WizardNavigationEventArg s) Handles
Wizard1.FinishButtonClick
SendMail(TXTName.Text + " " + "<" + TXTEMail.Text + ">", TXTBOX1.Text)
End Sub
Private Sub SendMail(ByVal from As String, ByVal subject As String,
ByVal body As String)
Dim mailServerName As String = "name.servername.org"
Dim emailto = "se********@servername.org"
Dim message As MailMessage = New MailMessage(from, emailto, subject,
body)
Dim mailClient As SmtpClient = New SmtpClient
mailClient.Host = mailServerName
mailClient.Send(message)
message.Dispose()
End Sub
End Class