Where could I trap a member login ? - Posted (4069 Views)
Starting Member
Pertinax4
Posts: 10
10
My mailserver advises me several times a week:
This message was created automatically by mail delivery software.
A message that you sent could not be delivered to one or more of its
recipients. This is a permanent error. The following address(es) failed:

email address

Other details are
SMTP error from remote mail server after RCPT
550 Unrouteable address

I've tried sending an ordinary email to the failed address, but it fails with the same problem. I don't know why a message is being sent to the member, how could I find out ?
It's possible that the member is asking for a password reminder, but due to his mailserver he'll never get the message. So I thought, if he tries to login, I could display a message asking him to contact me, but I don't know what code to put in or where to put it.
Is there a mod that serves this purpose, please ?

 Sort direction, for dates DESC means newest first  
 Page size 
Posted
Forum Admin
HuwR
Posts: 20611
20611
this could be related to the other isssue you have and it may be trying to sent a subscription email, Why don't you just make a post on your forum asking them to contact you, would be a lot simpler than editing the code?
Posted
Advanced Member
Carefree
Posts: 4224
4224
Your culprit is probably in one of two locations (pending member table or subscription table). I wrote this for you, it's untested. If the EMail exists, it'll be listed. If you have PMs installed, you'll be able to send a PM from the report. Otherwise, if the member is still pending; you'll be able to delete him/her.
Code:

<%
'#################################################################################
'## Snitz Forums 2000 v3.4.07
'#################################################################################
'## Copyright (C) 2000-12 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
'##
'#################################################################################
'##
'## admin_email_locator.asp
'##
'#################################################################################
%>
<!--#INCLUDE FILE="config.asp"-->
<!--#INCLUDE FILE="inc_sha256.asp"-->
<!--#INCLUDE FILE="inc_header.asp" -->
<%
If Session(strCookieURL & "Approval") <> "15916941253" Then
scriptname = split(request.servervariables("SCRIPT_NAME"),"/")
Response.Redirect "admin_login.asp?target=" & scriptname(ubound(scriptname))
End If
If Request.QueryString("mode")="delete" Then
strSql = "DELETE FROM " & strMemberTablePrefix & "MEMBERS WHERE M_EMAIL='" & Request.QueryString("EMail") & "'"
my_Conn.Execute(strSql)
strSql = "DELETE FROM " & strMemberTablePrefix & "MEMBERS_PENDING WHERE M_EMAIL='" & Request.QueryString("EMail") & "'"
my_Conn.Execute(strSql)
End If
Response.Write " <table border=""0"" width=""100%"">" & vbNewLine & _
" <tr>" & vbNewLine & _
" <td width=""33%"" align=""left"" nowrap><font face=""" & strDefaultFontFace & """ size=""" & strDefaultFontSize & """>" & vbNewLine & _
" " & getCurrentIcon(strIconFolderOpen,"","align=""absmiddle""") & " <a href=""default.asp"">All Forums</a><br />" & vbNewLine & _
" " & getCurrentIcon(strIconBar,"","") & getCurrentIcon(strIconFolderOpen,"","") & " <a href=""admin_home.asp"">Admin Section</a><br />" & vbNewLine & _
" " & getCurrentIcon(strIconBlank,"","") & getCurrentIcon(strIconBar,"","") & getCurrentIcon(strIconFolderOpenTopic,"","") & " Deleted EMail Locator<br /></font></td>" & vbNewLine & _
" </tr>" & vbNewLine & _
" </table>" & vbNewLine & _
" <br />" & vbNewLine
If Request.Form("findme")>"" Then
Response.Write "<table align=""center"" width=""100%"" bgColor=""" & strTableBorderColor & """ border=""0"" cellpadding=""0"" cellspacing=""0"">" & vbNewLine & _
" <tr valign=""middle"">" & vbNewLine & _
" <td width=""100%"" bgcolor=""" & strPageBGColor & """>" & vbNewLine & _
" <table width=""100%"" bgColor=""" & strTableBorderColor & """ border=""0"" cellspacing=""1"" cellpadding=""3"">" & vbNewLine & _
" <tr valign=""middle"">" & vbNewLine & _
" <td width=""100%"" align=""center"" bgcolor=""" & strCategoryCellColor & """ colspan=""7"">" & vbNewLine & _
" <font face=""" & strDefaultFontFace & """ size=""" & strCategoryFontSize & """ color=""" & strCategoryFontColor & """><b>Deleted EMail Locator</b>" & vbNewLine & _
" </font>" & vbNewLine & _
" </td>" & vbNewLine & _
" </tr>" & vbNewLine
strSql = "SELECT * FROM " & strMemberTablePrefix & "MEMBERS_PENDING WHERE M_EMAIL LIKE '%" & Request.Form("EMail") & "%'"
Set rsFind=my_Conn.Execute(strSql)
If not rsFind.EOF Then
intID=rsFind("MEMBER_ID")
strLast=rsFind("M_LASTNAME")
strFirst=rsFind("M_FIRSTNAME")
strIP = rsFind("M_IP")
strDate=rsFind("M_DATE")
strUserName=rsFind("M_UserName")
strEMail=rsFind("M_EMAIL")
rsFind.Close
Else
Set rsFind = Nothing
strSql = "SELECT * FROM " & strMemberTablePrefix & "MEMBERS WHERE M_EMAIL LIKE '%" & Request.Form("EMail") & "%'"
Set rsFind=my_Conn.Execute(strSql)
If not rsFind.EOF Then
intID=rsFind("MEMBER_ID")
strLast=rsFind("M_LASTNAME")
strFirst=rsFind("M_FIRSTNAME")
strIP = rsFind("M_IP")
strDate=rsFind("M_DATE")
strUser=rsFind("M_UserName")
strEMail=rsFind("M_EMAIL")
rsFind.Close
End If
Set rsFind = Nothing
End If
If strLast > "" Then
Response.Write " <tr valign=""middle"">" & vbNewLine & _
" <td align=""center"" bgcolor=""" & strHeadCellColor & """>" & vbNewLine & _
" <font face=""" & strDefaultFontFace & """ size=""" & strHeaderFontSize & """ color=""" & strHeadFontColor & """><b>Last Name</b>" & vbNewLine & _
" </font>" & vbNewLine & _
" </td>" & vbNewLine & _
" <td align=""center"" bgcolor=""" & strHeadCellColor & """>" & vbNewLine & _
" <font face=""" & strDefaultFontFace & """ size=""" & strHeaderFontSize & """ color=""" & strHeadFontColor & """><b>First Name</b>" & vbNewLine & _
" </font>" & vbNewLine & _
" </td>" & vbNewLine & _
" <td align=""center"" bgcolor=""" & strHeadCellColor & """>" & vbNewLine & _
" <font face=""" & strDefaultFontFace & """ size=""" & strHeaderFontSize & """ color=""" & strHeadFontColor & """><b>User Name</b>" & vbNewLine & _
" </font>" & vbNewLine & _
" </td>" & vbNewLine & _
" <td align=""center"" bgcolor=""" & strHeadCellColor & """>" & vbNewLine & _
" <font face=""" & strDefaultFontFace & """ size=""" & strHeaderFontSize & """ color=""" & strHeadFontColor & """><b>EMail</b>" & vbNewLine & _
" </font>" & vbNewLine & _
" </td>" & vbNewLine & _
" <td align=""center"" bgcolor=""" & strHeadCellColor & """>" & vbNewLine & _
" <font face=""" & strDefaultFontFace & """ size=""" & strHeaderFontSize & """ color=""" & strHeadFontColor & """><b>IP Address</b>" & vbNewLine & _
" </font>" & vbNewLine & _
" </td>" & vbNewLine & _
" <td align=""center"" bgcolor=""" & strHeadCellColor & """>" & vbNewLine & _
" <font face=""" & strDefaultFontFace & """ size=""" & strHeaderFontSize & """ color=""" & strHeadFontColor & """><b>Last Date</b>" & vbNewLine & _
" </font>" & vbNewLine & _
" </td>" & vbNewLine & _
" <td align=""center"" bgcolor=""" & strHeadCellColor & """>" & vbNewLine & _
" <font face=""" & strDefaultFontFace & """ size=""" & strHeaderFontSize & """ color=""" & strHeadFontColor & """><b>Tools</b>" & vbNewLine & _
" </font>" & vbNewLine & _
" </td>" & vbNewLine & _
" </tr>" & vbNewLine & _
" <tr valign=""middle"">" & vbNewLine & _
" <td align=""center"" bgcolor=""" & strForumCellColor & """>" & vbNewLine & _
" <font face=""" & strDefaultFontFace & """ size=""" & strDefaultFontSize & """ color=""" & strDefaultFontColor & """>" & strLast & vbNewLine & _
" </font>" & vbNewLine & _
" </td>" & vbNewLine & _
" <td align=""center"" bgcolor=""" & strForumCellColor & """>" & vbNewLine & _
" <font face=""" & strDefaultFontFace & """ size=""" & strDefaultFontSize & """ color=""" & strDefaultFontColor & """>" & strFirst & vbNewLine & _
" </font>" & vbNewLine & _
" </td>" & vbNewLine & _
" <td align=""center"" bgcolor=""" & strForumCellColor & """>" & vbNewLine & _
" <font face=""" & strDefaultFontFace & """ size=""" & strDefaultFontSize & """ color=""" & strDefaultFontColor & """>" & strUser & vbNewLine & _
" </font>" & vbNewLine & _
" </td>" & vbNewLine & _
" <td align=""center"" bgcolor=""" & strForumCellColor & """>" & vbNewLine & _
" <font face=""" & strDefaultFontFace & """ size=""" & strDefaultFontSize & """ color=""" & strDefaultFontColor & """>" & strEMail & vbNewLine & _
" </font>" & vbNewLine & _
" </td>" & vbNewLine & _
" <td align=""center"" bgcolor=""" & strForumCellColor & """>" & vbNewLine & _
" <font face=""" & strDefaultFontFace & """ size=""" & strDefaultFontSize & """ color=""" & strDefaultFontColor & """>" & strIP & vbNewLine & _
" </font>" & vbNewLine & _
" </td>" & vbNewLine & _
" <td align=""center"" bgcolor=""" & strForumCellColor & """>" & vbNewLine & _
" <font face=""" & strDefaultFontFace & """ size=""" & strDefaultFontSize & """ color=""" & strDefaultFontColor & """>" & strDate & vbNewLine & _
" </font>" & vbNewLine & _
" </td>" & vbNewLine & _
" <td align=""center"" bgcolor=""" & strForumCellColor & """>" & vbNewLine & _
" <font face=""" & strDefaultFontFace & """ size=""" & strDefaultFontSize & """ color=""" & strDefaultFontColor & """>" & vbNewLine & _
" <a href=""admin_email_locator.asp?mode=delete&EMail=" & strEMail & """" & dWStatus("Delete User") & "><acronym style=""border:none; text-decoration:none"" title=""Delete User""><img src="""& strImageURL &"icon_trashcan.gif"" height=""16"" width=""16"" alt=""Delete User"" style=""text-decoration:none;""></acronym></a>" & vbNewLine
If strDBNTUserName <> "" and Members_MemberPMreceive = "1" and strPMStatus = "1" Then
Response.Write " <a href=""privatesend.asp?method=Topic&mname=" & ChkString(strUser,"display") & """>" & getCurrentIcon(strIconPMPrivatemessage,"Send " & ChkString(strUser,"display") & " a Private Message","align=""absmiddle"" hspace=""0""") & "</a>" & vbNewLine
End If
Response.Write " </font>" & vbNewLine & _
" </td>" & vbNewLine & _
" </tr>" & vbNewLine
Else
Response.Write " <tr valign=""middle"">" & vbNewLine & _
" <td bgcolor=""" & strForumCellColor & """>" & vbNewLine & _
" <font face=""" & strDefaultFontFace & """ size=""" & strDefaultFontSize & """ color=""" & strDefaultFontColor & """>No Records Found<br />"& strSql & vbNewLine & _
" </font>" & vbNewLine & _
" </td>" & vbNewLine & _
" </tr>" & vbNewLine & _
" </table>" & vbNewLine & _
" </td>" & vbNewLine & _
" </tr>" & vbNewLine & _
"</table>" & vbNewLine
End If
WriteFooter
Response.End
Else
Response.Write "<form action=""admin_email_locator.asp"" method=""post"">" & vbNewLine & _
" <input type=""hidden"" name=""findme"" value=""doit"">" & vbNewLine & _
" <table align=""center"" width=""100%"" bgColor=""" & strTableBorderColor & """ border=""0"" cellpadding=""0"" cellspacing=""0"">" & vbNewLine & _
" <tr valign=""middle"">" & vbNewLine & _
" <td width=""100%"" bgcolor=""" & strPageBGColor & """>" & vbNewLine & _
" <table width=""100%"" border=""1"" cellspacing=""1"" cellpadding=""3"">" & vbNewLine & _
" <tr valign=""middle"">" & vbNewLine & _
" <td width=""100%"" align=""center"" align=""center"" bgcolor=""" & strCategoryCellColor & """ colspan=""2"">" & vbNewLine & _
" <font face=""" & strDefaultFontFace & """ size=""" & strCategoryFontSize & """ color=""" & strCategoryFontColor & """><b>Deleted EMail Locator</b>" & vbNewLine & _
" </font>" & vbNewLine & _
" </td>" & vbNewLine & _
" </tr>" & vbNewLine & _
" <tr valign=""middle"">" & vbNewLine & _
" <td width=""50%"" align=""right"" bgcolor=""" & strForumCellColor & """>" & vbNewLine & _
" <font face=""" & strDefaultFontFace & """ size=""" & strDefaultFontSize & """ color=""" & strDefaultFontColor & """>EMail: " & strUser & vbNewLine & _
" </font>" & vbNewLine & _
" </td>" & vbNewLine & _
" <td width=""50%"" align=""left"" bgcolor=""" & strForumCellColor & """>" & vbNewLine & _
" <font face=""" & strDefaultFontFace & """ size=""" & strDefaultFontSize & """ color=""" & strDefaultFontColor & """>" & vbNewLine & _
" <input type=""text"" name=""EMail"" value=""" & Request.Form("EMail") & """ size=""40"" style=""width:50%;"" maxlength=""75"">" & vbNewLine & _
" </font>" & vbNewLine & _
" </td>" & vbNewLine & _
" </tr>" & vbNewLine & _
" </table>" & vbNewLine & _
" </td>" & vbNewLine & _
" </tr>" & vbNewLine & _
" <tr valign=""top"">" & vbNewLine & _
" <td width=""100%"" bgColor=""" & strPageBGColor & """ align=""center"" border=""0"">" & vbNewLine & _
" <input type=""submit"" name=""submit"" value=""Submit"">" & vbNewLine & _
" </td>" & vbNewLine & _
" </tr>" & vbNewLine & _
" </table>" & vbNewLine & _
"</form>" & vbNewLine
End If
WriteFooter
%>
Posted
Starting Member
Pertinax4
Posts: 10
10
Carefree,
Thanks for the code, however I don't think that solves the problem.
I know the member's email address, it's reported in the unrouteable address message from my mail server.
I can't PM him, as the forum uses that email address to send the email, and I can't email him in the ordinary way.
HowR,
I've already made a post on the forum asking him to contact me, but that hasn't worked, he probably hasn't seen it. It's no good subscribing him to it, since he wouldn't received the notification email. I don't know his postal address so I can't mail him.
Posted
Forum Admin
HuwR
Posts: 20611
20611
best bet then is to just stick some code in inc_header (after it has checked who the user is) and maybe redirect them to another page asking them to change there email address.
Off the top of my head not sure where to put the code, but if carefree hasn't got their first I will look it up later today.
Posted
Advanced Member
Carefree
Posts: 4224
4224
Originally posted by Pertinax4 I can't PM him, as the forum uses that email address to send the email....

PM's aren't sent through EMail. If you have the private message mod installed and send it to him, he'll get it when he logs in. Alternatives: include a forced header or default message as HuwR suggested or use the Required Reading mod.
For "default.asp", you could do something like this. Make sure to change the bit on the last line of code to the member's actual email address.
Code:

Look for the following lines (appx 141-142):

'## Forum_SQL - Get all Categories from the DB
strSql = "SELECT CAT_ID, CAT_STATUS, CAT_NAME, CAT_ORDER, CAT_SUBSCRIPTION, CAT_MODERATION " &_

Above them, insert these:

strSql = "SELECT M_EMAIL FROM " & strMemberTablePrefix & "MEMBERS WHERE MEMBER_ID=" & MEMBERID
Set rsMail=my_Conn.Execute(strSql)
If not rsMail.EOF then
strMail = rsMail("M_EMAIL")
rsMail.close
End If
Set rsMail = nothing
If strMail = strChangeMail and Session("intUnread")<>"1" then
Response.Write "<table align=""center"" width=""50%"" border=""1"" bgColor=""" & strTableBorderColor & """>" & vbNewLine & _
" <tr valign=""middle"">" & vbNewLine & _
" <td align=""center"" width=""100%"" bgColor=""" & strForumCellColor & """>" & vbNewLine & _
" <font face=""" & strDefaultFontFace & """ size=""" & strDefaultFontSize & """ color=""" & strDefaultFontColor & """>Your EMail address no longer functions. Please edit it in your profile." & vbNewLine & _
" </font>" & vbNewLine & _
" </td>" & vbNewLine & _
" </tr>" & vbNewLine & _
"</table>" & vbNewLine
Session.intUnread = "1"
WriteFooter
Response.End
End If

Next, look for the following line (appx 44):

Dim UnapprovedFound, UnModeratedPosts

Below it, insert this:

strChangeMail="<insert email address>"
Posted
Starting Member
Pertinax4
Posts: 10
10
Carefree,
Thanks very much for your detailed answer.
I don't have the private message mod installed but I'll look at it. In the user profile, under the user name, I see
E-mail User: Click to send an E-Mail

I thought that was a 'private message'.
Posted
Advanced Member
Carefree
Posts: 4224
4224
You're welcome. Hope you get it resolved.
 
You Must enter a message