Morpheusweb.it - Risorse per webmaster: script, ASP.NET, C#, Visual Basic .Net, tutorial, asp, javascript, css, php, html, java, ADO, VBScript, forms, frames, Active Server Pages, Dynamic HTML, database, gratis per webmaster e webdesigner

Send mail from a Form

A simple form to send emails.


<html>
<body>
<%
If request("Button")="Invia" then
Set objMail = Server.CreateObject("CDONTS.NewMail")
objMail.From=request("Address")
messageBody="Hello" & request("Nome") & " " & request("Cognome") & " thanks for the mail "
objMail.Body=messageBody
objMail.To="ADRESSEE"
objMail.Subject="OBJECT"
objMail.Send
set objMail = nothing
response.write "E-mail has been sent"
else
%>
<form action="FormMail.asp" method="POST" name="CDOEMAIL">
Nome: <input type="text" size="20" name="Nome"><br>
Cognome:<input type="text" size="20" name="Cognome"><br>
E-mail: <input type="text" size="20" name="Address"><br>
<input type="submit" name="Button" value="Invia">
</form>
<%
End if
%>
</body>
</html>

Download code...


Print this page


 

Inizio pagina

risorse per webmaster

asp


asp, scripts, tutorials,