Kouras,
Try to check out the code below...
========
<HTML>
<body>
<%
if request("send") <> "" then
dim error
error = "false"
' Validation
if request("strName") = "" then
errorname = "Please enter your name."
error ="true"
end if
if request("strTo") = "" then
erroremail1 = "You didn't enter a valid e-mail address."
error = "true"
end if
if request("strCC") = "" then
erroremail2 = "You didn't enter a valid e-mail address."
error = "true"
end if
if request("message") = "" then
errormessage = "You didn't enter any messages."
error = "true"
end if
end if
if error = "false" then
strName=request("strName")
strTo=request("strTo")
strCc=request("strCc")
Set objMail = Server.CreateObject("CDONT
objMail.Importance = 1
objMail.From = request("strName") & "<" & request("strEmail") & ">"
objMail.To = request("strTo")
objMail.Cc = request("strCc")
objMail.Subject = "A wallpaper for you"
' this is my messages HTML
strMsg = strMsg & "<html>"
strMsg = strMsg & "<head>"
strMsg = strMsg & "<title>"
strMsg = strMsg & "</title>"
strMsg = strMsg & "</head>"
strMsg = strMsg & "<body>"
strMsg = strMsg & "Sometext"
strMsg = strMsg & request("message")
strMsg = strMsg & "</body>"
strMsg = strMsg & "</html>"
' set the format of the email to html, etc
objMail.BodyFormat = 0
objMail.MailFormat = 0
objMail.Body = strMsg
objMail.Send
' destroy the email object
Set objMail = Nothing
%>
<br><center>
<table align="center" width="100%"><tr>
<td width="100%" height="39" align="center"> <font color="#00FF00" face="Verdana, Arial, Helvetica, sans-serif" size="5"><b><i>
Thank you</i></b></font>
<font color="#9966CC" face="Verdana, Arial, Helvetica, sans-serif" size="5"><b><i>
<%=strName%>, </i></b></font>
</td>
</tr>
</table>
</center>
<%end if%>
<center>
<form action="file.asp" method=post>
<table><tr><td>
<font face="Verdana, Arial, Helvetica, sans-serif" color="#FFFF33" size="2">
Your Name:</font><%=errorname%>
</td></tr>
<tr><td>
<font face="Verdana, Arial, Helvetica, sans-serif" color="#FFFF33" size="2">
Recipient Email:</font><%=erroremail
</td></tr>
<tr>
<td> <font face="Verdana, Arial, Helvetica, sans-serif" color="#FFFF33" size="2" >
Recipient2 Email:</font><%=erroremail
<input type="text" size="53" name="strCc" value="<%=request.form("st
</td></tr>
<tr>
<td> <font face="Verdana, Arial, Helvetica, sans-serif" color="#FFFF33" size="2">
Your message:</font><%=errormes
<textarea cols="33" rows="8" name="message"><%=request.
</textarea>
</td></tr>
</table>
<p><input type=submit name=send value=Send >
<input type="Reset" value="Reset"></p>
</form></center>
</body>
</html>
====
HTH...
BTW the point is to low fir such question..
HAppy programming
Main Topics
Browse All Topics





by: bytecraftPosted on 2003-04-08 at 22:23:44ID: 8297268
<HTML> ) = 0 then ) = 0 then
EQUEST_MET HOD") = "GET" then
S.NewMail" )
<body>
<%
dim errors
if request("submit") <> "" then
' Validation
if request("strName") = "" then
errors = errors & "- Please enter your name<BR>"
end if
if request("strTo") = "" or Instr(request("strTo"),"@"
errors = errors & "- Please enter a valid recipient email<BR>"
end if
if request("strCC") = "" or Instr(request("strTo"),"@"
errors = errors & "- Please enter a valid recipient2 email<BR>"
end if
end if
if errors <> "" then
response.write "<font color=red>" & Errors & "</font>"
end if
if request.ServerVariables("R
%>
<center>
<form action="file.asp" method=post>
<table><tr><td>
<font face="Verdana, Arial, Helvetica, sans-serif" color="#FFFF33" size="2">
Your Name:</font><br> <input type="text" size="53" name="strName">
</td></tr>
<tr><td>
<font face="Verdana, Arial, Helvetica, sans-serif" color="#FFFF33" size="2">
Recipient Email:</font><br> <input type="text" size="53" name="strTo">
</td></tr>
<tr><td>
<font face="Verdana, Arial, Helvetica, sans-serif" color="#FFFF33" size="2">
Recipient2 Email:</font><br> <input type="text" size="53" name="strCc">
</td></tr>
<tr><td>
<font face="Verdana, Arial, Helvetica, sans-serif" color="#FFFF33" size="2">
Your message:</font><br>
<textarea cols="33" rows="8" name="message">
</textarea>
</td></tr>
</table>
<p><input type=submit name=send value=Send >
<input type="Reset" value="Reset"></p>
</form></center>
<%
else
if errors = "" then
strName=request("strName")
strTo=request("strTo")
strCc=request("strCc")
Set objMail = Server.CreateObject("CDONT
objMail.Importance = 1
objMail.From = request("strName") & "<" & request("strEmail") & ">"
objMail.To = request("strTo")
objMail.Cc = request("strCc")
objMail.Subject = "A wallpaper for you"
' this is my messages HTML
strMsg = strMsg & "<html>"
strMsg = strMsg & "<head>"
strMsg = strMsg & "<title>"
strMsg = strMsg & "</title>"
strMsg = strMsg & "</head>"
strMsg = strMsg & "<body>"
strMsg = strMsg & "Sometext"
strMsg = strMsg & request("message")
strMsg = strMsg & "</body>"
strMsg = strMsg & "</html>"
' set the format of the email to html, etc
objMail.BodyFormat = 0
objMail.MailFormat = 0
objMail.Body = strMsg
objMail.Send
' destroy the email object
Set objMail = Nothing
end if
%>
<br><center>
<table align="center" width="100%"><tr>
<td width="100%" height="39" align="center"> <font color="#00FF00" face="Verdana, Arial, Helvetica, sans-serif" size="5"><b><i>
Thank you</i></b></font>
<font color="#9966CC" face="Verdana, Arial, Helvetica, sans-serif" size="5"><b><i>
<%=strName%>, </i></b></font>
</td>
</tr>
</table>
</center>
<% end if %>
</body>
</html>