README.md

December 4, 2022 ยท View on GitHub

Send Form By Mail

Description

Sends form results to you via email

More Info

Put mailer.asp in your root, edit the email addresses, and SMTP Server name where defined in the mailer.asp and put this HTML tag in your form:

Code Assumes you are using Bamboo Mail on your server. You can create a custom 'Thank You' page if your message was sent successfully.

Submitted On
ByPortJump Pete
LevelIntermediate
User Rating4.1 (29 globes from 7 users)
CompatibilityASP (Active Server Pages), HTML, VbScript (browser/client side)

Category |Validation/ Processing World |ASP / VbScript Archive File |

Source Code

If you have problems with the code below, check out version 2 -
I updated this code some time ago but it's been greatly overlooked!
http://www.planetsourcecode.com/vb/scripts/ShowCode.asp?txtCodeId=7537&lngWId=4
<!--- mailer.asp --->
<%
For Each x In Request.Form
 message=message & x & ": " & Request.Form(x) & CHR(10)
Next
set smtp = Server.CreateObject("Bamboo.SMTP")
smtp.Server = "mail.YOURSEVER.com"
smtp.Rcpt = "YOU@YOURSERVER.com"
smtp.From = "user@YOURSERVER.com"
smtp.FromName = "user@YOURSERVER.com"
smtp.Subject = "Message Recieved From Web Form"
smtp.Message = message
on error resume next
smtp.Send
if err then
 response.Write err.Description
else
 response.redirect "/thanks.asp"
end if
set smtp = Nothing
%>