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
Previous Page
Author Previous Topic Topic Next Topic
Page: of 2

Podge
Support Moderator

Ireland
3775 Posts

Posted - 03 September 2009 :  05:39:18  Show Profile  Send Podge an ICQ Message  Send Podge a Yahoo! Message
Which database are you using ? SQL Server ?

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

Podge
Support Moderator

Ireland
3775 Posts

Posted - 03 September 2009 :  06:14:38  Show Profile  Send Podge an ICQ Message  Send Podge a Yahoo! Message
That column should be in both MEMBERS and MEMBERS_PENDING

Both columns are smallint NULL DEFAULT 0

Execute sql similar to this (untested)

ALTER TABLE SFForum_MEMBERS ADD M_ALLOWEMAIL smallint NULL DEFAULT 0;
ALTER TABLE SFForum_MEMBERS_PENDING ADD M_ALLOWEMAIL smallint NULL DEFAULT 0;

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 03 September 2009 08:52:21
Go to Top of Page

Art
Starting Member

USA
32 Posts

Posted - 03 September 2009 :  07:59:30  Show Profile  Visit Art's Homepage
Yes, SQLserver 2005 (right now...I fear upgrading to 2008...)
Thanks Podge...I 'll get right on it!

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

Art
Starting Member

USA
32 Posts

Posted - 03 September 2009 :  08:54:59  Show Profile  Visit Art's Homepage
Heh, added those tables, tried a mailing and got:
Microsoft VBScript runtime error '800a005e'

Invalid use of Null: 'cInt'

/forum/pop_mail.asp, line 68



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


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

HuwR
Forum Admin

United Kingdom
20584 Posts

Posted - 03 September 2009 :  08:56:37  Show Profile  Visit HuwR's Homepage
see http://forum.snitz.com/forum/topic.asp?TOPIC_ID=68482 for details on fixing that error
Go to Top of Page

Art
Starting Member

USA
32 Posts

Posted - 03 September 2009 :  10:21:01  Show Profile  Visit Art's Homepage
Wow, lots of code there, and about a dozen different approaches. I used the last version of the fix, and I no longer have any errors. I also don't get the test e-mail

Maybe I can back up a step now and look at something besides forum code.
Here is where I am at:

One, set email server config in forum to use CDOSYS (which the forum says is enabled on the machine).
Two, hard wired the username and password into inc_mail.asp under the case cdosys.
Three, added collums to fix M_AllowEmail issue.
Four, changed intAllowEmail = cInt(rs("M_ALLOWEMAIL")) to:

checkAllowedmail = rs("M_ALLOWEMAIL")
if isnull(checkAllowedmail) then
strSql="UPDATE " &
strMemberTablePrefix & "MEMBERS SET M_ALLOWEMAIL = 0 WHERE MEMBER_ID = " & MemberID
set rsmail = Server.CreateObject("ADODB.Recordset")
rsmail.Open strSql, my_Conn, adOpenForwardOnly, adLockReadOnly, adCmdText
set rsmail=Nothing strSql = "SELECT M_ALLOWEMAIL FROM " & strMemberTablePrefix & "MEMBERS "
strSql = strSql & " WHERE MEMBER_ID = " & MemberID
set rs1 = my_Conn.Execute (strSql) intAllowEmail = cInt(rs1("M_ALLOWEMAIL")) rs1.close
else
intAllowEmail = cInt(rs("M_ALLOWEMAIL"))
end if

Five, checked settings in forum and forum code.
Six, tested e-mail function.
Seven, Punched wall.

Now, I have the default smtp server in IIS disabled. I intend to use the hmail server as it has an MX record and all that, so I want to use it as a remote email server. I found the following code to do that with:

<%
Dim ObjSendMail
Set ObjSendMail = CreateObject("CDO.Message")

'This section provides the configuration information for the remote SMTP server.

ObjSendMail.Configuration.Fields.Item ("http://schemas.microsoft.com/cdo/configuration/sendusing") = 2 'Send the message using the network (SMTP over the network).
ObjSendMail.Configuration.Fields.Item ("http://schemas.microsoft.com/cdo/configuration/smtpserver") ="mail.yoursite.com"
ObjSendMail.Configuration.Fields.Item ("http://schemas.microsoft.com/cdo/configuration/smtpserverport") = 25
ObjSendMail.Configuration.Fields.Item ("http://schemas.microsoft.com/cdo/configuration/smtpusessl") = False 'Use SSL for the connection (True or False)
ObjSendMail.Configuration.Fields.Item ("http://schemas.microsoft.com/cdo/configuration/smtpconnectiontimeout") = 60

' If your server requires outgoing authentication uncomment the lines bleow and use a valid email address and password.
'ObjSendMail.Configuration.Fields.Item ("http://schemas.microsoft.com/cdo/configuration/smtpauthenticate") = 1 'basic (clear-text) authentication
'ObjSendMail.Configuration.Fields.Item ("http://schemas.microsoft.com/cdo/configuration/sendusername") ="somemail@yourserver.com"
'ObjSendMail.Configuration.Fields.Item ("http://schemas.microsoft.com/cdo/configuration/sendpassword") ="yourpassword"

ObjSendMail.Configuration.Fields.Update

'End remote SMTP server configuration section==

ObjSendMail.To = "someone@someone.net"
ObjSendMail.Subject = "this is the subject"
ObjSendMail.From = "someone@someone.net"

' we are sending a text email.. simply switch the comments around to send an html email instead
'ObjSendMail.HTMLBody = "this is the body"
ObjSendMail.TextBody = "this is the body"

ObjSendMail.Send

Set ObjSendMail = Nothing
%>

Is this code roughly equivalent to that in Snitz, yes? So I should be good to go...... but I am not. Owie
BUT WAIT! This has code for OUTGOING AUTHENTICATION which my server requires...It is the same as for incoming, but it requires it.
I shall try that code! The cdosys code in Snitz apparently assumes that if you are running IIS, then you are using the (horrible) default SMTP server, or a local server of some kind that doesn't require authentication. About right
EDIT
No, i am an idiot....Snitz ONLY has code for outgoing. Adding cdo config fields does nothing, as the SEND fields are already there.
Anyway, I altered the fields in inc_mail.asp to read:

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") = mail.starfrontiers.org
Flds("http://schemas.microsoft.com/cdo/configuration/smtpauthenticate") = cdoBasic
Flds("http://schemas.microsoft.com/cdo/configuration/smtpserverport") = 25
Flds("http://schemas.microsoft.com/cdo/configuration/sendusername") = "Art@starfrontiers.org"
Flds("http://schemas.microsoft.com/cdo/configuration/sendpassword") = "********"

This resulted in broken code for whatever reason (where do I find a good troubleshooting .asp editor?) and I had to replace inc_mail.asp with an earlier version.
Gosh.....

http:\\StarFrontiers.org

Edited by - Art on 03 September 2009 10:59:09
Go to Top of Page

Art
Starting Member

USA
32 Posts

Posted - 03 September 2009 :  11:49:01  Show Profile  Visit Art's Homepage
OK...I tried modifying my profile, and I got an error in POP_Profile calling for an non-existent Spam_Mail table.
I commented out all of this:

'Else
'Comment out down to the next comment to let it take me@example.com and/or .ex as well
'strsql = "SELECT SPAM_SERVER FROM " & strTablePrefix & "SPAM_MAIL WHERE SPAM_SERVER = '" & chkString(Request.Form("Email"),"sqlstring") & "'"
'set rsSpam = my_Conn.Execute (strsql)

'If Not rsSpam.EOF Then
' Err_Msg = Err_Msg & "<li>You cannot register with '" & chkString(Request.Form("Email"),"sqlstring") & "'.</li>"
'End If

'Dim strMailTLD : strMailTLD = LCase(Mid(Request.Form("Email"),InStrRev(Request.Form("Email"),".")))

'strsql = "SELECT SPAM_SERVER FROM " & strTablePrefix & "SPAM_MAIL WHERE SPAM_SERVER = '" & strMailTLD & "'"
'set rsSpam = my_Conn.Execute (strsql)

'If Not rsSpam.EOF Then
' Err_Msg = Err_Msg & "<li>You cannot register with a '" & strMailTLD & "' email address.</li>"
'End If
'Comment out up to the previous comment to let it take me@example.com and/or .ex as well

'strMailDomain = LCase(Mid(Request.Form("Email"),InStrRev(Request.Form("Email"),"@")))

'strsql = "SELECT SPAM_SERVER FROM " & strTablePrefix & "SPAM_MAIL WHERE SPAM_SERVER = '" & strMailDomain & "'"
'set rsSpam = my_Conn.Execute (strsql)

'If Not rsSpam.EOF Then
' Err_Msg = Err_Msg & "<li>You cannot register with an '" & strMailDomain & "' email address.</li>"
'End If

'rsSpam.close
'Set rsSpam = Nothing

That helped. Then I got a problem when I changed my e-mail adress in my user profile (to help troubleshooting). It SENT the e-mail to me indicating that my profile had changed, and sent a validation code! The e-mail worked! But when I clicked on it, it gave me a validation error! Argh! So I turned off email validation, which forced me to not have any control over who registers, but now e-mail, profile editing, and registration works.

I have an established database here. I would like to keep it while solving these problems. I suppose I could create a forum version that has Active Users on it, and hopefully gatekeeper (no luck with that mod in the past) as well as a few other nice mods (If I find a few days of spare time in the next few years). I could then look at how the database those mods create looks, then modify my database tables to fit manually, and then see how it all comes out. I'll just need a few months of spare time or so.
Thanks for your help guys. Too bad I have to trade one feature for another. I just wish Snitz had a few more features without having to tinker so much to add them. Not that I don't appreciate the developers that created the base forum as well as the mods.
-Frustrated and Gripey. I'll get over it. Thanks Guys.

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

Podge
Support Moderator

Ireland
3775 Posts

Posted - 03 September 2009 :  13:07:41  Show Profile  Send Podge an ICQ Message  Send Podge a Yahoo! Message
Edit: saw that email is now working.

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 03 September 2009 13:09:19
Go to Top of Page

Art
Starting Member

USA
32 Posts

Posted - 04 September 2009 :  00:42:32  Show Profile  Visit Art's Homepage
Thank you much for the help Podge and Friends. I'm gonna do some more game coding before I play with this again....

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

Podge
Support Moderator

Ireland
3775 Posts

Posted - 04 September 2009 :  06:43:42  Show Profile  Send Podge an ICQ Message  Send Podge a Yahoo! Message
You're welcome. I'm gonna update Gatekeeper for 3.4.07 soon. There are a few changes to the instructions but its mostly the same.

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
Page: of 2 Previous Topic Topic Next Topic  
Previous 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.12 seconds. Powered By: Snitz Forums 2000 Version 3.4.07