Email with the full text of a new post - Posted (3352 Views)
Starting Member
ale34
Posts: 13
13
Hi,
my forum members are asking me for having by email the full text of a new post (forum subscription) instead of receiving a message with the link. Is it possible?
Thank you for your help

Alex<
 Sort direction, for dates DESC means newest first  
 Page size 
Posted
Starting Member
ale34
Posts: 13
13
Ooops,
I will chek... Tank you! I edited the link for security resaon if you do not mind....<
Posted
Starting Member
ale34
Posts: 13
13
Ok it is done!
Thank you.. <
Posted
Support Moderator
Shaggy
Posts: 6780
6780
You're welcome smile
<
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.”
Posted
Starting Member
sokkmonkey
Posts: 5
5
okay.. I tried this, the new read message is changed ok but it's still not showing the message body copy-
where did I go wrong? http://www.rattlebrain.com/~sokkmonkey/inc_subscription.txt

Likewise if I was to add the following to strip the HTML and netcode, where would be a good place to stick it?
Function StripCode(ByVal fString)
if fString = "" or IsNull(fString) then
fString = " empty string test"
elseif strAllowForumCode = "1" then
'filter out forumcode
fStringLeft = ""
fFound = False
Do While InStr(fString, "[")
fFound = True
fStringLeft = fStringLeft & " " & Left(fString, InStr(fString, "[")-1)
fString = MID(fString, InStr(fString, "]") + 1)
Loop
StripCode = fStringLeft & fString
If Not fFound Then StripCode = fString
elseif strAllowHTML = "1" then
' filter out html code

fStringLeft = ""
fFound = False
Do While InStr(fString, "<")
fFound = True
fStringLeft = fStringLeft & " " & Left(fString, InStr(fString, "<")-1)
fString = MID(fString, InStr(fString, ">") + 1)
Loop
StripCode = fStringLeft & fString
If Not fFound Then StripCode = fString
end if
if strBadWordFilter = "1" then
fString = ChkBadWords(fString)
end if
StripCode = fString
End Function<
Posted
Starting Member
davidm
Posts: 4
4
I've followed these instructions and have created my email message like this:

strMessage = strMessage & MemberName & " has posted the following to the forum '" & ForumName & "' on the " & strForumTitle & ". " & vbNewLine & vbNewLine

strMessage = strMessage & "The subject was " & TopicName & vbNewLine & vbNewLine

strMessage = strMessage & " and the message reads: " &FormatStr(TopicContent) & ". " & vbNewLine & vbNewLine

The odd thing is despite the vbNewLines, I'm just getting the message all strung together in one line. How can I force a new line between the different blocks to make it all more readable? <
Posted
Advanced Member
Carefree
Posts: 4224
4224
If all you want is to break-up the various replies, that shouldn't be too difficult. The following modification should give you a blank line between replies.
Change this line:
strSubject = strForumTitle & " - Reply to a posting"

to say:
strSubject = "<br><br>" & strForumTitle & " - Reply to a posting"<
Posted
Starting Member
flhtci01
Posts: 6
6
OK, I have no experience at this but am giving it a shot.
I have read this thread and trying to get this to work. The one thing I am trying to change is delete the link to the message and replace it with a message to log onto the forum to reply. (The link doesn't work due to the way the website security is set up.) (Long story)

Anyway I got the following error
Microsoft VBScript compilation error '800a0401'

Expected end of statement

/Members/Patrol_Reps_Forum/patrepbb/inc_subscription.asp, line 189

strMessage = strMessage & "You can view the posting by logging onto the Patrol Reps Forum " vbNewline
--------------------------------------------------------------------------------------------^

Can someone help me?<
Posted
Forum Admin
HuwR
Posts: 20611
20611
you need an & after the string and before the vbNewline, like so

strMessage = strMessage & "You can view the posting by logging onto the Patrol Reps Forum " & vbNewline<
Posted
Starting Member
flhtci01
Posts: 6
6
Thanks for the help on the syntax.
I now seeing the first message of the string in the email but that is all.
Also where is a good place to put the code to strip the html?

I have moved the file to http://www.southernregionnsp.org/inc_subscription.txt
<
You Must enter a message