I recently installed Podge's Gatekeeper mod which seems to be working a treat but I'm now getting complaints that we've lost the ability to email user to user. Oddly, people are still able to register via e-mail validation with no trouble.
The forum's e-mail is set to use CDOSYS and the server is set to the normal outgoing SMTP setting for my hosting service.
<% '################################################################################# '## Snitz Forums 2000 v3.4.06 '################################################################################# '## Copyright (C) 2000-06 Michael Anderson, Pierre Gorissen, '## Huw Reddick and Richard Kinser '## '## This program is free software; you can redistribute it and/or '## modify it under the terms of the GNU General Public License '## as published by the Free Software Foundation; either version 2 '## of the License, or (at your option) any later version. '## '## All copyright notices regarding Snitz Forums 2000 '## must remain intact in the scripts and in the outputted HTML '## The "powered by" text/logo with a link back to '## http://forum.snitz.com in the footer of the pages MUST '## remain visible when the pages are viewed on the internet or intranet. '## '## This program is distributed in the hope that it will be useful, '## but WITHOUT ANY WARRANTY; without even the implied warranty of '## MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the '## GNU General Public License for more details. '## '## You should have received a copy of the GNU General Public License '## along with this program; if not, write to the Free Software '## Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA. '## '## Support can be obtained from our support forums at: '## http://forum.snitz.com '## '## Correspondence and Marketing Questions can be sent to: '## manderson@snitz.com '## '################################################################################# %> <!--#INCLUDE FILE="config.asp" --> <!--#INCLUDE FILE="inc_sha256.asp" --> <!--#INCLUDE FILE="inc_header_short.asp" --> <!--#INCLUDE FILE="inc_func_member.asp" --> <% if Request.QueryString("ID") <> "" and IsNumeric(Request.QueryString("ID")) = True then intMemberID = cLng(Request.QueryString("ID")) else intMemberID = 0 end if
if rs.bof or rs.eof then Response.Write " <p><font face=""" & strDefaultFontFace & """ size=""" & strDefaultFontSize & """ color=""" & strHiLiteFontColor & """>There is no Member with that Member ID</font></p>" & vbNewLine else strRName = ChkString(rs("M_NAME"),"display") strREmail = rs("M_EMAIL") strRReceiveEmail = rs("M_RECEIVE_EMAIL")
rs.close set rs = nothing
if mLev > 2 or strRReceiveEmail = "1" then if lcase(strEmail) = "1" then if Request.QueryString("mode") = "DoIt" then Err_Msg = "" if mLev => 2 then strSql = "SELECT M_NAME, M_USERNAME, M_EMAIL " strSql = strSql & " FROM " & strMemberTablePrefix & "MEMBERS" strSql = strSql & " WHERE MEMBER_ID = " & MemberID
set rs2 = my_conn.Execute (strSql) YName = rs2("M_NAME") YEmail = rs2("M_EMAIL") set rs2 = nothing else YName = Request.Form("YName") YEmail = Request.Form("YEmail") if YName = "" then Err_Msg = Err_Msg & "<li>You must enter your UserName</li>" end if if YEmail = "" then Err_Msg = Err_Msg & "<li>You must give your e-mail address</li>" else if EmailField(YEmail) = 0 then Err_Msg = Err_Msg & "<li>You must enter a valid e-mail address</li>" end if end if end if if Request.Form("Msg") = "" then Err_Msg = Err_Msg & "<li>You must enter a message</li>" end if 'Gatekeeper Mod if strPopMailGatekeeper = "1" then select case len(Request.Form("GateKeeperAnswer")) case "0" Err_Msg = Err_Msg & "<li>You have not entered an answer for the Antispam question. Please use your back button and try again.</li>" case else if (lcase(Request.Form("GateKeeperAnswer")) <> lcase(strGatekeeperAnswer1)) and (lcase(Request.Form("GateKeeperAnswer")) <> lcase(strGatekeeperAnswer2)) then Err_Msg = Err_Msg & "<li>You have entered a wrong answer for the Antispam question. Please use your back button and try again.</li>" end if end select end if 'Gatekeeper Mod '## E-mails Message to the Author of this Reply. if (Err_Msg = "") then strRecipientsName = strRName strRecipients = strREmail strFrom = YEmail strFromName = YName strSubject = "Sent From " & strForumTitle & " by " & YName strMessage = "Hello " & strRName & vbNewline & vbNewline strMessage = strMessage & "You received the following message from: " & YName & " (" & YEmail & ") " & vbNewline & vbNewline strMessage = strMessage & "At: " & strForumURL & vbNewline & vbNewline strMessage = strMessage & Request.Form("Msg") & vbNewline & vbNewline
if strFrom <> "" then strSender = strFrom end if %> <!--#INCLUDE FILE="inc_mail.asp" --> <% Response.Write " <p><font face=""" & strDefaultFontFace & """ size=""" & strHeaderFontSize & """>E-mail has been sent</font></p>" & vbNewLine else Response.Write " <p><font face=""" & strDefaultFontFace & """ size=""" & strHeaderFontSize & """ color=""" & strHiLiteFontColor & """>There Was A Problem With Your E-mail</font></p>" & vbNewLine 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 & _ " <p><font size=""" & strDefaultFontSize & """><a href=""JavaScript:history.go(-1)"">Go Back To Enter Data</a></font></p>" & vbNewLine WriteFooterShort Response.End end if else Err_Msg = "" if trim(strREmail) <> "" then strSql = "SELECT M_NAME, M_USERNAME, M_EMAIL " strSql = strSql & " FROM " & strMemberTablePrefix & "MEMBERS" strSql = strSql & " WHERE MEMBER_ID = " & MemberID
I couldn't see a problem with the code. You should try using authentication if you are using CDOSYS. What could be happening is this;
1. Registration emails are being sent because the From address is a domain on the mail server 2. User to user emails are blocked because the From address is from a domain external to the mail server
If you provide authentication (username and password) by editing the 3 lines in inc_mail.asp (the CDOSYS section) then your mail server may allow all emails to be sent (as you are providing authentication for every email sent regardless of what the from address is).
Search this forums for CDOSYS for lots of posts about how to get authentication working. Basically you need to uncomment three lines and include your username and password in inc_mail.asp
Post the CDOSYS section of inc_mail.asp with your email address and password removed if you cannot get it working.
Clicking on a user's name would normally produce a pop-up where the user can write an e-mail. What I am getting is the pop-up but within it is just a HTTP 500 internal server error.
You should have posted the file as a link to a text file. Like that a lot of work is needed to get it to a format where you can compare it with a regular file.
Took classics advice and turned off friendly msgs and that pointed me to a problem with pop_mail.asp. Looks like I've got into a tangle with my cut/paste technique Problem now solved.