web hosting
web site hosting plus
ecommerce hosting
merchant accounts
co-location
xtra features for web hosting
web site pormotion
dial-up access
web hosting reseller opportunities
Register Your
Domain Name
 
Using CDONTS
 
  What is CDONTS?

CDO 1.2 for NTS
CDO version 1.2 for NTS, also known as CDO for NTS, is an SMTP-specific lightweight version of CDO 1.2 for Exchange. This version of CDO was designed to allow server applications to send and receive messages without requiring Exchange server

Copy all the code below and put it into a file named form.asp

****Start here ***************************
<%
If Len(Request.Form("txtEmail")) > 0 then

Dim objMail
Set objMail = Server.CreateObject("CDONTS.NewMail")

objMail.From = "Email@yourdomain.com"
objMail.Subject = "Email attachment demo"
objMail.AttachFile Server.MapPath "/images/name_of_image.gif")
objMail.To = Request.Form("txtEmail")
objMail.Body = "This is a demo on sending an email with an attachment."
objMail.Send

Response.write("<i>Mail was Sent</i><p>")

'You should always do this with CDONTS.
set objMail = nothing


End If
%>

<form method="post" id=form1 name=form1>
<b>Enter your email address:</b><br>
<input type="text" name="txtEmail" value="<%=Request.Form("txtEmail")%>">
<p>
<input type="submit" value="Send me an Email with an Attachment!" id=submit1 name=submit1>
</form>
****End here ***************************
 
 
 
Copyright 2001 GetSite Hosting