'Here is a sample of one of our forms. There is more involved, but this is the meat of it <% On Error Resume Next Dim errorLev errorLev = "0" Dim fname, email, comments, subject 'Get the Form Data If Request.Form.Count=0 Then errorLev="1" Else email = Request.Form("email") fname = Request.Form("name") comments = Request.Form("comments") End If 'Add Our Data subject = "Comment Submission website" 'Make the E-Mail Dim mainString: mainString = "From: "&fname&vbCrLf&"E-Mail Address: "&email&vbCrLf&vbCrLf&"Comments: "&comments 'Send the E-Mail If errorLev = "0" Then Dim mailObj Set mailObj = Server.CreateObject("Persits.MailSender") mailObj.Host = "servernamehere" mailObj.AddAddress "email@example.com" mailObj.From = email mailObj.FromName = fname mailObj.Subject = subject mailObj.Body = mainString mailObj.IsHTML = False mailObj.Username = "user" mailObj.Password = "password" mailObj.Send If Err <> 0 Then errorLev = "2" End If End If
Gain unlimited access to on-demand training courses with an Experts Exchange subscription.Get Access
When asked, what has been your best career decision?
Deciding to stick with EE.
Being involved with EE helped me to grow personally and professionally.