I have run into a few issues , and here is what I have so far, edited a bit for context
.Item(cdoSendUsingMethod) = 1
.Item(cdoSMTPServer) = "ipgoeshere"
.Item(cdoSMTPServerPort) = 25
.Item(cdoSMTPConnectionTimeout) = 10
.Item(cdoSMTPAuthenticate) = cdoBasic
Body = "<table border=""0"" width=""414"" id=""UserInfo"">" & vbCrLf
Body = Body _
Set objMessage = Server.CreateObject("CDO.Message")
Set objMessage.Configuration = objConfig
.To = "email@example.com"
.From = "firstname.lastname@example.org"
.Subject = Heading
.HTMLBody = Body
<input type='button' name='BuyNow' value='Submit' onClick=<%=mailit("Yes")%>>
My problem comes in that On form load (server side ASP page) it hits both mailit("Yes") and mailit("No"), and the onclick does nothing, as I get an email for both of them regardless of whether they are commented out or not.
I want it to do mailit("No") on page load, and mailit("Yes") on button click.
Ideally; i would like a msg box popup verification on button click after it sends the email; but a simple redirect would do; but I need to get them to send the email at the correct times first. Any help would be greatly appreciated.
Thanks in advance