تقييم الموضوع :
  • 0 أصوات - بمعدل 0
  • 1
  • 2
  • 3
  • 4
  • 5
معرفة مكتبات البريد الإلكتروني التي يمكن استخدامها في السيرفر - Asp
#1
كاتب الموضوع : AhmedEssawy

يقوم هذا الكود بعرض جميع المكتبات التي يمكنك استخدامها للتعامل مع البريد الإلكتروني من خلال ASP ، ويتمد الكود على مجموعة من المكتبات المشهورة التي يقوم باضافتها ضمن مصفوفة theComponents ، ومن ثم يقوم بإنشاء نسخة من كل منهم ، وفي حالة وجود خطأ يتم تداركه والتعرف عليه ، وهو في حالتنا يعني أن المكتبة غير موجودة .

في ختام الأمر يقوم بطباعة كل المكتبات التي لم تحدث أخطاء أثناء تعريفها .

والآن إلى الأمر :



كود :
<% @ Language="VBScript" %>
<% Option Explicit %>
<%
Dim theComponents(18)
theComponents(0) = Array("ABMailer.Mailman", "ABMailer v2.2+")
theComponents(1) = Array("Persits.MailSender", "ASPEMail")
theComponents(2) = Array("SMTPsvg.Mailer", "ASPMail")
theComponents(3) = Array("SMTPsvg.Mailer", "ASPQMail")
theComponents(4) = Array("CDONTS.NewMail", "CDONTS (IIS 3/4/5)")
theComponents(5) = Array("CDONTS.NewMail", "Chili!Mail (Chili!Soft ASP)")
theComponents(6) = Array("CDO.Message", "CDOSYS (IIS 5/5.1/6)")
theComponents(7) = Array("dkQmail.Qmail", "dkQMail")
theComponents(8) = Array("Dundas.Mailer", "Dundas Mail (QuickSend)")
theComponents(9) = Array("Dundas.Mailer", "Dundas Mail (SendMail)")
theComponents(10) = Array("Geocel.Mailer", "GeoCel")
theComponents(11) = Array("iismail.iismail.1", "IISMail")
theComponents(12) = Array("Jmail.smtpmail", "JMail")
theComponents(13) = Array("MDUserCom.MDUser", "MDaemon")
theComponents(14) = Array("ASPMail.ASPMailCtrl.1", "OCXMail")
theComponents(15) = Array("ocxQmail.ocxQmailCtrl.1", "OCXQMail")
theComponents(16) = Array("SoftArtisans.SMTPMail", "SA-Smtp Mail")
theComponents(17) = Array("SmtpMail.SmtpMail.1", "SMTP")
theComponents(18) = Array("VSEmail.SMTPSendMail", "VSEmail")
Function IsObjInstalled(strClassString)
On Error Resume Next

'// Initialize default values
IsObjInstalled = False
Err = 0
'// Testing code
Dim xTestObj
Set xTestObj = Server.CreateObject(strClassString)

If 0 = Err Then IsObjInstalled = True

'// Cleanup
Set xTestObj = Nothing
Err = 0

On Error Goto 0
End Function
Response.Write "<html>" & vbNewLine & _
vbNewLine & _
"<head>" & vbNewLine & _
" <title>E-mail Component Test</title>" & vbNewLine & _
"</head>" & vbNewLine & _
vbNewLine & _
"<body bgColor=doublequotewhitedoublequote text=doublequotemidnightbluedoublequote link=doublequotedarkbluedoublequote aLink=doublequotereddoublequote vLink=doublequotereddoublequote>" & vbNewLine & _
"<font face=doublequoteVerdana, Arial, Helveticadoublequote>" & vbNewLine & _
"<table border=doublequote0doublequote cellspacing=doublequote0doublequote cellpadding=doublequote0doublequote align=doublequotecenterdoublequote>" & vbNewLine & _
" <tr valign=doublequotetopdoublequote>" & vbNewLine & _
" <td bgcolor=doublequoteblackdoublequote>" & vbNewLine & _
" <table border=doublequote0doublequote cellspacing=doublequote1doublequote cellpadding=doublequote4doublequote>" & vbNewLine & _
" <tr valign=doublequotetopdoublequote>" & vbNewLine & _
" <td bgcolor=doublequotemidnightbluedoublequote colspan=doublequote2doublequote align=doublequotecenterdoublequote><font size=doublequote2doublequote color=doublequotemintcreamdoublequote><b>E-mail Component Test</b></font></td>" & vbNewLine & _
" </tr>" & vbNewLine
Dim i
For i = 0 To UBound(theComponents)
Response.Write " <tr>" & vbNewLine & _
" <td bgColor=doublequote#9FAFDFdoublequote align=doublequoterightdoublequote><font size=doublequote2doublequote><strong>" & theComponents(i)(1) & ":&nbsp;</strong></font></td>" & vbNewLine & _
" <td bgColor=doublequote#9FAFDFdoublequote align=doublequotecenterdoublequote><font size=doublequote2doublequote>"

If Not IsObjInstalled(theComponents(i)(0)) Then
Response.Write("not installed")
Else
Response.Write("<strong>installed!</strong>")
End If

Response.Write "</font></td>" & vbNewLine & _
" </tr>" & vbNewline
Next

Response.Write " </table>" & vbNewLine & _
" </td>" & vbNewLine & _
" </tr>" & vbNewLine & _
"</table>" & vbNewLine & _
"</font>" & vbNewLine & _
"</body>" & vbNewLine & _
vbNewLine & _
"</html>" & vbNewLine
%>
}}}
تم الشكر بواسطة:


المواضيع المحتمل أن تكون متشابهة .
الموضوع : الكاتب الردود : المشاهدات : آخر رد
  معرفة مسار البرنامج واسم التطبيق في ASP.net RaggiTech 0 2,180 17-10-12, 10:51 PM
آخر رد: RaggiTech
  معرفة طول الملف Asp RaggiTech 0 2,123 17-10-12, 10:50 PM
آخر رد: RaggiTech
  معرفة ال Ip للمستخدم من خلال Asp RaggiTech 0 2,027 17-10-12, 10:49 PM
آخر رد: RaggiTech
  كيفية معرفة الصفحة السابقة المحدثة Asp RaggiTech 0 1,995 17-10-12, 10:47 PM
آخر رد: RaggiTech
  التأكد من صحة البريد الالكتروني باستخدام Regex RaggiTech 0 1,485 17-10-12, 10:34 PM
آخر رد: RaggiTech

التنقل السريع :


يقوم بقرائة الموضوع: بالاضافة الى ( 1 ) ضيف كريم