Welcome PM for new registrations - Posted (3450 Views)
Junior Member
endomorph
Posts: 128
128
I have seen requests before for this but not sure if anyone did anything, so I did.
This MOD will send a PM to all new registrations - A "Welcome to our site" kind of message.
In register.asp, look for the following code -

if strEmail = "1" and strEmailVal = "1" then
'Do Nothing
else
Call DoCount
end if

regHomepage = ""

Immediately above this, insert the following code -

'<!-- Send Welcome PM Message -->

' First lets get the members ID
strSql = "SELECT " & strMemberTablePrefix & "MEMBERS.M_EMAIL "
strSql = strSql & ", " & strMemberTablePrefix & "MEMBERS.MEMBER_ID "
strSql = strSql & " FROM " & strMemberTablePrefix & "MEMBERS"
strSql = strSql & " WHERE " & strMemberTablePrefix & "MEMBERS.M_EMAIL like '" & chkString(Request.Form("Email"),"SQLString") & "'"
set rs = my_Conn.Execute (strSql)

' This is the string for your welcome PM subject
welcomepmsubject = "Welcome to ...."

' This is the string for your welcome PM message
welcomepmmessage = "Welcome to ...."

' Do not change these
strpmtoid = rs("MEMBER_ID")
strpmrid = "1"
TF = "0"

strSql = "INSERT INTO " & strTablePrefix & "PM ("
strSql = strSql & " M_SUBJECT"
strSql = strSql & ", M_MESSAGE"
strSql = strSql & ", M_TO"
strSql = strSql & ", M_FROM"
strSql = strSql & ", M_SENT"
strSql = strSql & ", M_MAIL"
strSql = strSql & ", M_READ"
strSql = strSql & ", M_OUTBOX"
strSql = strSql & ") VALUES ("
strSql = strSql & " '" & welcomepmsubject & "'"
strSql = strSql & ", '" & welcomepmmessage & "'"
strSql = strSql & ", " & strpmtoid
strSql = strSql & ", " & strpmrid
strSql = strSql & ", '" & DateToStr(strForumTimeAdjust) & "'"
strSql = strSql & ", " & TF
strSql = strSql & ", " & "0"
strSql = strSql & ", '" & 0 & "')"


my_Conn.Execute (strSql),,adCmdText + adExecuteNoRecords
set rs = nothing
'<!-- Send Welcome PM -->

Thats it ! Easy



<
Need help with your Snitz ? Most Snitz & ASP custom coding undertaken. Email for info | Search Engine Optimisation
 Sort direction, for dates DESC means newest first  
 Page size 
Posted
Posted
Senior Member
leatherlips
Posts: 1838
1838
MarkJH, there is another thread with a possible fix for you here: http://forum.snitz.com/forum/topic.asp?TOPIC_ID=67019<
Posted
Average Member
cripto9t
Posts: 881
881
Originally posted by leatherlips
Does this mod require that email is enabled?
From what I could tell looking at the file last night, it depends on where you place the code. Actually to be a complete working mod it needs to be in at least 2 places in the file, maybe more. One could probably write a sub and call it when the conditions are right.<
    _-/Cripto9t\-_
You Must enter a message