Snitz Forums 2000
Snitz Forums 2000
Home | Profile | Register | Active Topics | Members | Search | FAQ
Username:
Password:
Save Password
Forgot your Password?

 All Forums
 Help Groups for Snitz Forums 2000 Users
 Help: Mail Configuration
 Determine email component(s)
 New Topic  Topic Locked
 Printer Friendly
Next Page
Author Previous Topic Topic Next Topic
Page: of 2

Andy Humm
Average Member

United Kingdom
908 Posts

Posted - 30 May 2008 :  06:32:57  Show Profile
I saw this on a tutorial website - the code will go through your system and determine which email component(s) is/are installed on your system for your use.

<font color="green"><% @ Language="VBScript" %>
<% Option Explicit %>
<%
Dim theComponent(18)
Dim theComponentName(18)
'## the components
theComponent(0) = "ABMailer.Mailman"
theComponent(1) = "Persits.MailSender"
theComponent(2) = "SMTPsvg.Mailer"
theComponent(3) = "SMTPsvg.Mailer"
theComponent(4) = "CDONTS.NewMail"
theComponent(5) = "CDONTS.NewMail"
theComponent(6) = "CDO.Message"
theComponent(7) = "dkQmail.Qmail"
theComponent(8) = "Dundas.Mailer"
theComponent(9) = "Dundas.Mailer"
theComponent(10) = "Geocel.Mailer"
theComponent(11) = "iismail.iismail.1"
theComponent(12) = "Jmail.smtpmail"
theComponent(13) = "MDUserCom.MDUser"
theComponent(14) = "ASPMail.ASPMailCtrl.1"
theComponent(15) = "ocxQmail.ocxQmailCtrl.1"
theComponent(16) = "SoftArtisans.SMTPMail"
theComponent(17) = "SmtpMail.SmtpMail.1"
theComponent(18) = "VSEmail.SMTPSendMail"
'## the name of the components
theComponentName(0) = "ABMailer v2.2+"
theComponentName(1) = "ASPEMail"
theComponentName(2) = "ASPMail"
theComponentName(3) = "ASPQMail"
theComponentName(4) = "CDONTS (IIS 3/4/5)"
theComponentName(5) = "Chili!Mail (Chili!Soft ASP)"
theComponentName(6) = "CDOSYS (IIS 5/5.1/6)"
theComponentName(7) = "dkQMail"
theComponentName(8) = "Dundas Mail (QuickSend)"
theComponentName(9) = "Dundas Mail (SendMail)"
theComponentName(10) = "GeoCel"
theComponentName(11) = "IISMail"
theComponentName(12) = "JMail"
theComponentName(13) = "MDaemon"
theComponentName(14) = "OCXMail"
theComponentName(15) = "OCXQMail"
theComponentName(16) = "SA-Smtp Mail"
theComponentName(17) = "SMTP"
theComponentName(18) = "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=""white"" text=""midnightblue"" link=""darkblue"" aLink=""red"" vLink=""red"">" & vbNewLine & _
"<font face=""Verdana, Arial, Helvetica"">" & vbNewLine & _
"<table border=""0"" cellspacing=""0"" cellpadding=""0"" align=""center"">" & vbNewLine & _
" <tr valign=""top"">" & vbNewLine & _
" <td bgcolor=""black"">" & vbNewLine & _
" <table border=""0"" cellspacing=""1"" cellpadding=""4"">" & vbNewLine & _
" <tr valign=""top"">" & vbNewLine & _
" <td bgcolor=""midnightblue"" colspan=""2"" align=""center""><font size=""2"" color=""mintcream""><b>E-mail Component Test</b></font></td>" & vbNewLine & _
" </tr>" & vbNewLine & _
" <tr valign=""top"">" & vbNewLine & _
" <td bgcolor=""midnightblue"" colspan=""2"" align=""center""><font size=""2"" color=""mintcream"">The following components are currently<br />available choices in the latest<br />release of Snitz Forums 2000</font></td>" & vbNewLine & _
" </tr>" & vbNewLine
Dim i
for i=0 to UBound(theComponent)
Response.Write " <tr>" & vbNewLine & _
" <td bgColor=""#9FAFDF"" align=""right""><font size=""2""><strong>" & theComponentName(i) & ": </strong></font></td>" & vbNewLine & _
" <td bgColor=""#9FAFDF"" align=""center""><font size=""2"">"
if Not IsObjInstalled(theComponent(i)) 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</font id="green">

HuwR
Forum Admin

United Kingdom
20578 Posts

Posted - 30 May 2008 :  07:39:43  Show Profile  Visit HuwR's Homepage
The Snitz code already has something similar, that is how it knows which components to show in the mail config screen<
Go to Top of Page

Shaggy
Support Moderator

Ireland
6780 Posts

Posted - 03 June 2008 :  07:21:43  Show Profile
There's also a file called testemailcomponent.asp in the tools.zip file that's exactly the same as the one you posted (with 2 additional components).

Perhaps you could e-mail one of the admins and let them know where you found that code as it was written by Richard for Snitz and is therefore subject to the Snitz license but the copyright information has been removed from what you posted.

<

Search is your friend
“I was having a mildly paranoid day, mostly due to the
fact that the mad priest lady from over the river had
taken to nailing weasels to my front door again.”
Go to Top of Page

Art
Starting Member

USA
32 Posts

Posted - 31 August 2009 :  11:04:39  Show Profile  Visit Art's Homepage
Any idea on how a fellow might go about adding a component? I use HmailServer.
I am running WS 2003. I have disabled the smtp server in IIS. I use HmailServer (very easy to configure multiple domain names, and it even works!).
I can do a bit of C++, and some other languages, but I have never really messed with databases and certainly not a lot of .asp.

I found the following code in inc_mail.asp:
case "jmail"
Set objNewMail = Server.CreateObject("Jmail.smtpmail")
objNewMail.ServerAddress = strMailServer
objNewMail.AddRecipient strRecipients
objNewMail.Sender = strSender
objNewMail.Subject = strSubject
objNewMail.body = strMessage
objNewMail.priority = 3
on error resume next '## Ignore Errors
objNewMail.execute
If Err <> 0 Then
Err_Msg = Err_Msg & "<li>Your request was not sent due to the following error: " & Err.Description & "</li>"
End if

This all looks like something that is just adding tables to a database, right? If I am running HmailServer on my machine, and I want to link it up to Snitz, what are the nuts and bolts? I get that Snitz will need to store some stuff in the database to create the email, right? Once it does that, how does it go about getting hold of the mail server? Does it act as a mail program and log into an account? Does it control the e-mail server program directly? Does it just use a single account to send all messages (admin@whatever.org)?
How does the email component and component name work in? are those just database tables that the mail server uses? This is a "case"... so how do you tell Snitz about another e-mail server to get variables for in the first place?

http:\\StarFrontiers.org

Edited by - Art on 31 August 2009 16:08:46
Go to Top of Page

Podge
Support Moderator

Ireland
3775 Posts

Posted - 31 August 2009 :  11:38:12  Show Profile  Send Podge an ICQ Message  Send Podge a Yahoo! Message
HMail is an email server. Email components usually provide a mechanism to connect to email servers.

My advice would be to use CDOSYS even if HMail provides a component for sending email (like Mailenable do). CDOSYS is the only free component that provides support for authentication (username & password). Why would you want to reinvent the wheel ?

Podge.

The Hunger Site - Click to donate free food | My Blog | Snitz 3.4.05 AutoInstall (Beta!)

My Mods: CAPTCHA Mod | GateKeeper Mod
Tutorial: Enable subscriptions on your board

Warning: The post above or below may contain nuts.

Edited by - Podge on 31 August 2009 11:38:39
Go to Top of Page

Podge
Support Moderator

Ireland
3775 Posts

Posted - 31 August 2009 :  12:03:41  Show Profile  Send Podge an ICQ Message  Send Podge a Yahoo! Message
quote:
so how do you tell Snitz about another e-mail server to get variables for in the first place?
You set the i.p. address or domain (e.g. mail.whatever.com) in the admin area of the forum. The email component will usually connect to the mail server via TCP/IP and do what's necessary in order to send the email. Its very similar to how your email client (Thunderbird, Outlook, etc.) would connect to a pop email account.

What you are trying to do is un-necessary and at such a low level that you do not need to go there (or even know about for that matter).

If you set up an email account on your mail server for your forum to use and configure the mail server correctly you can then set the email settings in the admin area without the need for code changes (or creating a new email component). The only time you may need to make some code changes to inc_mail.asp is if you need to supply your mail server with a username and password everytime an email is sent (desirable from a security point of view).

Podge.

The Hunger Site - Click to donate free food | My Blog | Snitz 3.4.05 AutoInstall (Beta!)

My Mods: CAPTCHA Mod | GateKeeper Mod
Tutorial: Enable subscriptions on your board

Warning: The post above or below may contain nuts.

Edited by - Podge on 31 August 2009 12:05:12
Go to Top of Page

Art
Starting Member

USA
32 Posts

Posted - 31 August 2009 :  12:29:06  Show Profile  Visit Art's Homepage
EDIT:
Took too long to reply, and got your next post late. Basically, you are saying that I can edit inc_mail.asp (is that the right one) to provide CDOsys with the right password etc, and then I am good to go. I assume that I need to edit this little bit here to be able to enter a username and password, as well as domain name
case "cdosys"
Set iConf = Server.CreateObject ("CDO.Configuration")
Set Flds = iConf.Fields

'Set and update fields properties
Flds("http://schemas.microsoft.com/cdo/configuration/sendusing") = 2 'cdoSendUsingPort
Flds("http://schemas.microsoft.com/cdo/configuration/smtpserver") = strMailServer
'Flds("http://schemas.microsoft.com/cdo/configuration/smtpauthenticate") = cdoBasic
'Flds("http://schemas.microsoft.com/cdo/configuration/sendusername") = "username"
'Flds("http://schemas.microsoft.com/cdo/configuration/sendpassword") = "password"
Flds.Update

Set objNewMail = Server.CreateObject("CDO.Message")
Set objNewMail.Configuration = iConf

'Format and send message
Err.Clear

objNewMail.To = strRecipients
objNewMail.From = strSender
objNewMail.Subject = strSubject
objNewMail.TextBody = strMessage
On Error Resume Next
objNewMail.Send
If Err <> 0 Then
Err_Msg = Err_Msg & "<li>Your request was not sent due to the following error: " & Err.Description & "</li>"
End if

Original Post
Got several domain names linked to this h-mail server...lots of addresses, forwarding rules etc. I have found that I can't turn on IIS smtp and h-mail at the same time. I am serching for the very definition of "email component" as well as many other little bits of information here on my first dive into this world. What I hear you saying is that CDOSYS, which I understand (I think) is a server extension (or part of .asp?) If I start down the road in this direction, are we saying that
A. HmailServer will stay in place and CDOSYS will act as some sort of interface???
or
B. CDOSYS works with an IIS default smtp server?
or
C. None of the above.

I am BTW, quite fond of examining just how wheels are built. I notice that from the array that this wheel has been re-invented some 20 times. I figure it might be just a bit of cookbook engineering at this point, rather than a re-invention. In any case, I will first go down the path you suggest, and look into what the heck CDOSYS is, and attempt to find documentation that isn't pure poo, as 99.9999% of any Microsoft documentation is. That is the reason for the huge IIS learning curve. The documentation was written in the most uselessly incomprehensible manner it possibly could be. That was the reason for Hmail in the first place.

http:\\StarFrontiers.org

Edited by - Art on 31 August 2009 16:09:22
Go to Top of Page

Podge
Support Moderator

Ireland
3775 Posts

Posted - 31 August 2009 :  13:16:13  Show Profile  Send Podge an ICQ Message  Send Podge a Yahoo! Message
quote:
HmailServer will stay in place and CDOSYS will act as some sort of interface
Correct.

All you need to send an email is an account on the HMail server setup under any domain. It doesn't really matter which domain is used. The username you will need will usually be the email address for the account you set up. In the admin area under Email Server Config enter the mail server domain name or i.p. address or 127.0.0.1 if the HMail server is on the same machine as the webserver. Hard code in the username and password into inc_mail.asp while uncommenting those three lines (remove the apostrophe at the beginning of the line).

If you get any errors, post them here.

Podge.

The Hunger Site - Click to donate free food | My Blog | Snitz 3.4.05 AutoInstall (Beta!)

My Mods: CAPTCHA Mod | GateKeeper Mod
Tutorial: Enable subscriptions on your board

Warning: The post above or below may contain nuts.
Go to Top of Page

Art
Starting Member

USA
32 Posts

Posted - 31 August 2009 :  15:57:03  Show Profile  Visit Art's Homepage
After these modifications (I obscured the actual password):
case "cdosys"
Set iConf = Server.CreateObject ("CDO.Configuration")
Set Flds = iConf.Fields

'Set and update fields properties
Flds("http://schemas.microsoft.com/cdo/configuration/sendusing") = 2 'cdoSendUsingPort
Flds("http://schemas.microsoft.com/cdo/configuration/smtpserver") = strMailServer
Flds("http://schemas.microsoft.com/cdo/configuration/smtpauthenticate") = cdoBasic
Flds("http://schemas.microsoft.com/cdo/configuration/sendusername") = "Administrator@starfrontiers.org"
Flds("http://schemas.microsoft.com/cdo/configuration/sendpassword") = "*********"
Flds.Update

Set objNewMail = Server.CreateObject("CDO.Message")
Set objNewMail.Configuration = iConf

'Format and send message
Err.Clear

objNewMail.To = strRecipients
objNewMail.From = strSender
objNewMail.Subject = strSubject
objNewMail.TextBody = strMessage
On Error Resume Next
objNewMail.Send
If Err <> 0 Then
Err_Msg = Err_Msg & "<li>Your request was not sent due to the following error: " & Err.Description & "</li>"
End if


I tried to send myself a test e-mail and got the following error:
Microsoft OLE DB Provider for ODBC Drivers error '80040e14' 

[Microsoft][ODBC SQL Server Driver][SQL Server]Invalid column name 'M_ALLOWEMAIL'.

/forum/pop_mail.asp, line 64


The code for which is indicated here:
if strLogonForMail = "1" and mlev = 0 then
Err_Msg = "<li>You must be logged on to send a message</li>"
Response.Write " <table>" & vbNewLine & _
" <tr>" & vbNewLine & _
" <td><font face=""" & strDefaultFontFace & """ size=""" & strDefaultFontSize & """ color=""" & strHiLiteFontColor & """><ul>" & Err_Msg & "</ul></font></td>" & vbNewLine & _
" </tr>" & vbNewLine & _
" </table>" & vbNewLine
WriteFooterShort
Response.End
end if

if Request.QueryString("ID") <> "" and IsNumeric(Request.QueryString("ID")) = True then
intMemberID = cLng(Request.QueryString("ID"))
else
intMemberID = 0
end if

if Request.QueryString("mode") = "DoIt" then
Err_Msg = ""

strSql = "SELECT M_NAME, M_POSTS, M_ALLOWEMAIL FROM " & strMemberTablePrefix & "MEMBERS M"
strSql = strSql & " WHERE M.MEMBER_ID = " & MemberID

Line 64 set rs = my_Conn.Execute (strSql)

If Not rs.EOF then
intMPosts = cLng(rs("M_POSTS"))
intAllowEmail = cInt(rs("M_ALLOWEMAIL"))

If intMPosts < intMaxPostsToEMail and intAllowEmail <> "1" Then
Err_Msg = "<li>" & strNoMaxPostsToEMail & "</li>"
strSpammerName = RS("M_NAME")
rs.Close

strSql = "SELECT M.M_NAME FROM " & strMemberTablePrefix & "MEMBERS M"
strSql = strSql & " WHERE M.MEMBER_ID = " & intMemberID

set rs = my_Conn.Execute (strSql)

If rs.bof or rs.eof Then
strDestName = ""
Else
strDestname = rs("M_NAME")
End If
rs.close


This forum has been tinkered with. I believe that there was an attempt to put in the Gatekeeper mod and another anti-spam mod sometime in the past. I believe Gatekeeper is broken. I don't know how to go about editing the database tables to kinda restore the database to a baseline configuration and start over, and this forum is about 9 years old with about 18 years worth of content (Data was re-configured to make the database content long long ago for forum continuity). The Active Users is in force (I installed). I don't think this code for pop_mail.asp was ever modified though.

http:\\StarFrontiers.org

Edited by - Art on 31 August 2009 16:15:01
Go to Top of Page

Art
Starting Member

USA
32 Posts

Posted - 31 August 2009 :  16:16:34  Show Profile  Visit Art's Homepage
BTW...Thank you much Podge. I appreciate you trying to protect me from myself

http:\\StarFrontiers.org
Go to Top of Page

Podge
Support Moderator

Ireland
3775 Posts

Posted - 31 August 2009 :  20:36:35  Show Profile  Send Podge an ICQ Message  Send Podge a Yahoo! Message
Have you tried running setup.asp ?

Podge.

The Hunger Site - Click to donate free food | My Blog | Snitz 3.4.05 AutoInstall (Beta!)

My Mods: CAPTCHA Mod | GateKeeper Mod
Tutorial: Enable subscriptions on your board

Warning: The post above or below may contain nuts.
Go to Top of Page

Art
Starting Member

USA
32 Posts

Posted - 31 August 2009 :  21:37:03  Show Profile  Visit Art's Homepage
Yeah, I get the "shouldn't be needed" messages. I think I should investigate what tabels SHOULD be in the database, vs which ones are actually there.
It's a real pain not knowing enough to fix this issue when I have lots of other requests on my plate. I don't mind learning how to troubleshoot .asp code...but like []not right now[/i] I am thinking! Any suggestions on what I could post logs of or anything that might get to the bottom of this? Of course, I guess I could post a remote desktop login...heheheheheh.

http:\\StarFrontiers.org
Go to Top of Page

Podge
Support Moderator

Ireland
3775 Posts

Posted - 01 September 2009 :  09:39:45  Show Profile  Send Podge an ICQ Message  Send Podge a Yahoo! Message
First of all, backup your database.

Go here, login as admin and it should create any missing tables - http://starfrontiers.org/forum/setup.asp?RC=3

Podge.

The Hunger Site - Click to donate free food | My Blog | Snitz 3.4.05 AutoInstall (Beta!)

My Mods: CAPTCHA Mod | GateKeeper Mod
Tutorial: Enable subscriptions on your board

Warning: The post above or below may contain nuts.
Go to Top of Page

Art
Starting Member

USA
32 Posts

Posted - 01 September 2009 :  10:38:40  Show Profile  Visit Art's Homepage
Ran it, didn't give any indication that it created any new tables. zip.
Next choice??

http:\\StarFrontiers.org
Go to Top of Page

Podge
Support Moderator

Ireland
3775 Posts

Posted - 01 September 2009 :  12:05:51  Show Profile  Send Podge an ICQ Message  Send Podge a Yahoo! Message
Do you still get this error ?
quote:
Microsoft OLE DB Provider for ODBC Drivers error '80040e14'

[Microsoft][ODBC SQL Server Driver][SQL Server]Invalid column name 'M_ALLOWEMAIL'.

/forum/pop_mail.asp, line 64


Have you checked that the M_ALLOWEMAIL column exists in the SFFForum_Members table ?

Podge.

The Hunger Site - Click to donate free food | My Blog | Snitz 3.4.05 AutoInstall (Beta!)

My Mods: CAPTCHA Mod | GateKeeper Mod
Tutorial: Enable subscriptions on your board

Warning: The post above or below may contain nuts.
Go to Top of Page

Art
Starting Member

USA
32 Posts

Posted - 01 September 2009 :  13:02:23  Show Profile  Visit Art's Homepage
There is no M_allowemail collumn under the Members table. Should I create it? If so, what would the data type be, and should I allow null values? I had no idea what table that column should be in, much less if it was ok to just create it.

http:\\StarFrontiers.org

Edited by - Art on 01 September 2009 13:05:28
Go to Top of Page
Page: of 2 Previous Topic Topic Next Topic  
Next Page
 New Topic  Topic Locked
 Printer Friendly
Jump To:
Snitz Forums 2000 © 2000-2021 Snitz™ Communications Go To Top Of Page
This page was generated in 0.21 seconds. Powered By: Snitz Forums 2000 Version 3.4.07