merhaba öncelikle sunucuda hangi componentlerin yüklü olduğunu kontrol edelim onun için aşağıdaki asp dosyasını ftp nize gönderek kodu çalıştırım ve cdo persits vs hangi mail componentlerin olduğunu görelim.

<%
	' AppelSoft Component Checker
	' Version 1.00
	' (C)2001 Appelsoft (www.appelsoft.com)
	
	' INSTALLATION:
	'  Just put this file on your server, and run it... 
	'  It will then give you a list of installed components on the server.
	
	' SUPPORT:
	'  If you have any problems using this, please contact us at 
	'		support@appelsoft.com
	' If you miss one or more components in the list, please contact us and 
	' let us know. We will then include it in a future update.
	'
	' FREEWARE:
	'  This script is freeware - which means that you are free to use it, as long as 
	'  the copyright information above and on the page is left intact...
	
	Dim comList(47)

	comList(0) = Array( "AB Mailer","ABMailer.Mailman" )
	comList(1) = Array( "ABC Upload","ABCUpload4.XForm" )
	comList(2) = Array( "ActiveFile","ActiveFile.Post" )
	comList(3) = Array( "ActiveX Data Object","ADODB.Connection" )
	comList(4) = Array( "Adiscon SimpleMail","ADISCON.SimpleMail.1" )
	comList(5) = Array( "ASP DNS", "AspDNS.Lookup" )
	comList(6) = Array( "ASP HTTP","AspHTTP.Conn" )
	comList(7) = Array( "ASP Image","AspImage.Image" )
	comList(8) = Array( "ASP Mail","SMTPsvg.Mailer" )
	comList(9) = Array( "ASP NNTP News", "AspNNTP.Conn" )
	comList(10) = Array( "ASP POP 3", "POP3svg.Mailer" )
	comList(11) = Array( "ASP Simple Upload","ASPSimpleUpload.Upload" )
	comList(12) = Array( "ASP Smart Cache","aspSmartCache.SmartCache" )
	comList(13) = Array( "ASP Smart Mail","aspSmartMail.SmartMail" )
	comList(14) = Array( "ASP Smart Upload","aspSmartUpload.SmartUpload" )
	comList(15) = Array( "ASP Tear","SOFTWING.ASPtear" )
	comList(16) = Array( "ASP Thumbnailer","ASPThumbnailer.Thumbnail" )
	comList(17) = Array( "ASP WhoIs","WhoIs2.WhoIs" )
	comList(18) = Array( "ASPSoft NT Object","ASPSoft.NT" )
	comList(19) = Array( "ASPSoft Upload","ASPSoft.Upload" )
	comList(20) = Array( "CDO NTS","CDONTS.NewMail" )
	comList(21) = Array( "Chestysoft Image","csImageFile.Manage" )
	comList(22) = Array( "Chestysoft Upload","csASPUpload.Process" )
	comList(23) = Array( "Dimac JMail","JMail.Message" )
	comList(24) = Array( "Distinct SMTP","DistinctServerSmtp.SmtpCtrl" )
	comList(25) = Array( "Dundas Mailer","Dundas.Mailer" )
	comList(26) = Array( "Dundas Upload","Dundas.Upload.2" )
	comlist(27) = Array( "Dundas PieChartServer", "Dundas.ChartServer.2")
	comlist(28) = Array( "Dundas 2D Chart", "Dundas.ChartServer2D.1")
	comlist(29) = Array( "Dundas 3D Chart", "Dundas.ChartServer")
	comList(30) = Array( "Dynu Encrypt","Dynu.Encrypt" )
	comList(31) = Array( "Dynu HTTP","Dynu.HTTP" )
	comList(32) = Array( "Dynu Mail","Dynu.Email" )
	comList(33) = Array( "Dynu Upload","Dynu.Upload" )
	comList(34) = Array( "Dynu WhoIs","Dynu.Whois" )
	comList(35) = Array( "Easy Mail","EasyMail.SMTP.5" )
	comList(36) = Array( "File System Object","Scripting.FileSystemObject" )
	comList(37) = Array( "Ticluse Teknologi HTTP","InteliSource.Online" )
	comList(38) = Array( "Last Mod","LastMod.FileObj" )
	comList(39) = Array( "Microsoft XML Engine","Microsoft.XMLDOM" )
	comList(40) = Array( "Persits ASP JPEG","Persits.Jpeg" )
	comList(41) = Array( "Persits ASPEmail","Persits.MailSender" )
	comList(42) = Array( "Persits ASPEncrypt","Persits.CryptoManager" )
	comList(43) = Array( "Persits File Upload","Persits.Upload.1" )
	comList(44) = Array( "SMTP Mailer","SmtpMail.SmtpMail.1" )
	comList(45) = Array( "Soft Artisans File Upload","SoftArtisans.FileUp" )
	comList(46) = Array( "Image Size", "ImgSize.Check" )
	comList(47) = Array( "Microsoft XML HTTP", "Microsoft.XMLHTTP" )

	Function TestObject( comIdentity )
		On Error Resume Next
		TestObject = False
		Err.Clear
		Set xTestObj = Server.CreateObject( comIdentity )
		If Err = 0 Then TestObject = True
		Set xTestObj = Nothing
		Err.clear
	End Function

	Public Function CheckCOM()
		OKCount = 0
		strTxt = "<table border=1 bordercolor=black cellspacing=0 cellpadding=0 align=center width=400>"
		For Idx = LBound( comList ) To UBound( comList )
			Provider = Idx
			strTxt = strTxt & "<tr><td width=200>" & comList(Idx)(0) & "</td>"
			'strTxt = strTxt & ""
			If TestObject( comList(Idx)(1) ) Then
				strTxt = strTxt & "<td align=center><font color=red>Available</font></td>"
				OKCount = OKCount + 1
			Else
				strTxt = strTxt & "<td align=center>Not installed</td>"
			End If
			strTxt = strTxt & "</tr>"
		Next
		strTxt = strTxt & "</table><p align=center><b>" & OKCount & "</b> of "
		strTxt = strTxt & UBound( comList ) + 1 & " checked components are available on your server.</p>"
		CheckCOM = strTxt 
	End Function

	Response.Write("<center><a href=http://www.appelsoft.com>Appelsoft PnP Component Checker</a></p>")
	Response.Write( CheckCOM() )
	Response.Write("<p><center>(C) Copyright 2001 Appelsoft. All rights reserved.</center>")

%>
Eğer cdons mail componenti kullanarak bu işi yapmak istiyorsanız daha öncede kodaman.org ta şu makalemde yazdığım aşağıdaki kod örneğini kendinize uyarlayarak kullanabilirsiniz.

	

<%
sendUrl="http://schemas.microsoft.com/cdo/configuration/sendusing"
smtpUrl="http://schemas.microsoft.com/cdo/configuration/smtpserver"
Set objConfig=CreateObject("CDO.Configuration")
objConfig.Fields.Item(sendUrl)=2
objConfig.Fields.Item(smtpUrl)="relay-hosting.secureserver.net"
objConfig.Fields.Update
Set objMail=CreateObject("CDO.Message")
Set objMail.Configuration=objConfig
objMail.From="...........@domain.com" ' GÖNDEREN MAIL ADRESI
objMail.To="............@domain.com" ' GİDECEK OLAN MAIL ADRESI
objMail.Subject="konu"
'objMail.AddAttachment "ataçlanacak dosya"
Govde = "gonderilecek mesaj"
objMail.HTMLBody=Govde
objMail.Send
%>
eğer persits asp mail kullanarak bunu yapmak istiyorsanız şu kod size yardımcı olacaktır.

<%
    ' change to address of your own SMTP server
    strHost = "localhost"

    If Request("Send") <> "" Then
       
        Set Mail = Server.CreateObject("Persits.MailSender")
        ' enter valid SMTP host
        Mail.Host = strHost

        Mail.From = Request("From") ' From address
        Mail.FromName = Request("FromName") ' optional
        Mail.AddAddress Request("To")
       
        ' message subject
        Mail.Subject = Request("Subject")
        ' message body
        Mail.Body = Request("Body")

        strErr = ""
        bSuccess = False
        On Error Resume Next ' catch errors
        Mail.Send    ' send message
        If Err <> 0 Then ' error occurred
            strErr = Err.Description
        else
            bSuccess = True
        End If
    End If
%>

<HTML>
<HEAD>
<TITLE>Örnek Mail Bileşeni</TITLE>
</HEAD>
<BODY BGCOLOR="#FFFFFF">

<H2>AspEmail: mail.asp</h2>

<% If strErr <> "" Then %>
<h3><FONT COLOR="#FF0000">Hata Oluştu: <I><% = strErr %></I></FONT></h3>
<% End If %>

<% If bSuccess Then %>
<h3><FONT COLOR="#00A000">Mesaj <% = Request("To") %>. Adresine Başarı ile Gönderildi</FONT></h3>
<% End If %>

<FORM METHOD="POST" ACTION="mail.asp">

<TABLE CELLSPACING=0 CELLPADDING=2 BGCOLOR="#E0E0E0">
    <TR>
        <TD>Host:</TD>
        <TD><B><% = strHost %></B></TD>
    </TR>
    <TR>
        <TD>Gönderen Mail:</TD>
        <TD><INPUT TYPE="TEXT" NAME="From"></TD>
    </TR>
    <TR>
        <TD>Gönderen Adı:</TD>
        <TD><INPUT TYPE="TEXT" NAME="FromName"></TD>
    </TR>
    <TR>
        <TD>Alıcı Mail:</TD>
        <TD><INPUT TYPE="TEXT" NAME="To"></TD>
    </TR>
    <TR>
        <TD>Başlık:</TD>
        <TD><INPUT TYPE="TEXT" NAME="Subject"></TD>
    </TR>
    <TR>
        <TD>Mesaj:</TD>
        <TD><TEXTAREA NAME="Body"></TEXTAREA></TD>
    </TR>
    <TR>
        <TD COLSPAN=2><INPUT TYPE="SUBMIT" NAME="Send" VALUE="Gönder"></TD>
    </TR>

</TABLE>

</FORM>

</BODY>
</HTML>
umarım yardımcı olabilmişimdir kolay gelsin.