Here is a sample code on how you can send emails using Microsoft CDOSYS using a remote server.
<%
dim htmlMess
htmlMess=""
htmlMess=htmlMess & " "
htmlMess=htmlMess & "
htmlMess=htmlMess & " "
htmlMess=htmlMess & " "
htmlMess=htmlMess & " &Request("email")"
htmlMess=htmlMess & " "
htmlMess=htmlMess & " "
Set emailMess=CreateObject("CDO.Message")
emailMess.Subject="This is a test email sent using CDOSYS"
emailMess.From="fromemail@yourdomain.com"
emailMess.To="toemail@somedomain.com"
emailMess.Cc="cc@somedomain.com"
emailMess.Bcc="bcc@somedomain.com"
emailMess.AddAttachment "D:\att.rar"
emailMess.HTMLBody=htmlMess
emailMess.Configuration.Fields.Item _
("http://schemas.microsoft.com/cdo/configuration/sendusing")=2
'Name or IP of remote SMTP server
emailMess.Configuration.Fields.Item _
("http://schemas.microsoft.com/cdo/configuration/smtpserver")="smtp.yourdomain.com"
'Server port
emailMess.Configuration.Fields.Item _
("http://schemas.microsoft.com/cdo/configuration/smtpserverport")=25
emailMess.Configuration.Fields.Update
emailMess.Send
set emailMess=nothing
%>
Another fact that i would like to mention is that,you necessarily don't have to write code for sending email as your hosting provider is supposed to take care of sending emails.Do talk to your hosting provider about email component as they are supposed to provide you with this facility.