Site Links
Home
Features
Documentation
Pricing & Order
Members Area
Support Options
UBBDev.com
UBBWiki.com
Who's Online
2 registered (SteveS, Jake), 47 Guests and 15 Spiders online.
Key: Admin, Global Mod, Mod
Featured Member
Registered: 06/05/06
Posts: 709
Top Posters (30 Days)
Ruben 51
Gizmo 24
DennyP 24
Dunny 15
SteveS 13
AllenAyres 12
SD 10
dbremer 10
drkknght00 9
doug 8
Latest Photos
OK Corral Shoot Out
Testing
Basildon Train Station
Basildon Town Centre looking from the rounderbout
Basildon Town Square
Page 1 of 2 1 2 >
Topic Options
#227838 - 07/25/09 03:41 PM How do you remove the content from emails?
Baldeagle Offline
journeyman
Registered: 10/12/07
Posts: 77
We're running Ubbthreads 7.5.3. I've tried everything I can think of to get users to stop replying to the emails they get notifying them that they have a private message or a new post in a thread that they are watching. Nothing works.

So I thought I would just remove the content from the email. That way they would still get the notification, with a url link to click on, but they would not see any content. But, I can't seem to figure out how to do that.

The first thing I did was edit the language file mailer.php and removed PMN_CONTENT2_TEXT and PMN_CONTENT2_HTML completely. But I'm still getting the contents of the private message in the email, and the bozos are still replying to the email.

Then I edited mess_reply.php PRIV_BODY so it looks like this
Quote:
You have received a private message at %%BOARD_TITLE%%.

You can reply to this message at the following link:

%%PM_ADDY%%
I also edited sendmessage.php PRIV_BODY as follows
Quote:
You have received a private message at %%BOARD_TITLE%%.

You can reply to this message at the following link:

%%PM_ADDY%%
What do I have to do to stop PM content from showing up in the emails? If I can figure that out, then I'll work on watched topic notifications next.

Here's an example:
Quote:
DO NOT REPLY TO THIS EMAIL. THE SENDER WILL NEVER SEE IT!!!
Hi baldeagle,

a.d.-hawk made a new post at The Stovebolt Forums

You can view the post by clicking this link. The post contents are shown below:

a.d.-hawk: Re: Begun some plans
We plan on being back!! Cant wait!!

This email sent to you because your profile and/or board configuration allows it.
You may change your preferences at any time.
For private messages, the line "The post contents are shown below:" no longer appears, but the content still does. I've searched high and low to figure out where that's coming from but haven't found it.

Oh, and please make this an enhancement request. I'd like to be able to uncheck boxes in the Control Panel that say "Include post contents in email" and "Include private message contents in email".


Edited by Baldeagle (07/25/09 03:55 PM)
_________________________
The Stovebolt Geek
Stovebolt.com
Top
Express Hosting
Express Hosting "We are the official hosting company of UBB.threads. Ask us about our free migration services to migrate your UBB.threads installation."
#227839 - 07/25/09 04:16 PM Re: How do you remove the content from emails? [Re: Baldeagle]
Gizmo Offline

Registered: 06/05/06
Posts: 14995
Loc: Portland, OR; USA
Why not just set the board email to "no-reply@yourdomain.tld" then when they reply to it, it goes no where...
_________________________
Forums: UGN Security & VNC Web Design & Development
UBB.Threads: UBB.Wiki, My UBBSkins, UBB.Sitemaps
Longtime UBB Supporter, UBB Beta Tester & Resident Post-A-Holic.
UBB Modifications, Styling, Coding Services, Disaster Recovery, and more!
Top
#227842 - 07/25/09 04:19 PM Re: How do you remove the content from emails? [Re: Gizmo]
Baldeagle Offline
journeyman
Registered: 10/12/07
Posts: 77
Because I do want to be notified of moderated registrations and requests for changes to display names. Yes, I monitor the board regularly, but the emails do help to keep me from missing member requests.
_________________________
The Stovebolt Geek
Stovebolt.com
Top
#227846 - 07/25/09 04:26 PM Re: How do you remove the content from emails? [Re: Baldeagle]
JAISP Offline
old hand
Registered: 02/10/07
Posts: 1144
Originally Posted By: Baldeagle
and the bozos are still replying to the email.


I have totally cut out the PM email notification all together just for this very reason. It appears that people just don't care to understand, learn, or read anything other then what is easier for them to get through life on the most simple of basis.

Originally Posted By: Gizmo
Why not just set the board email to "no-reply@yourdomain.tld" then when they reply to it, it goes no where...


That can work sometimes. If you use your domain name and it is a bad address the server administrator gets it in most cases. If it is a totally bad email and domain and the IP is legit then the server administrator STILL gets it on a bounce back some where either being YOU or their ISP.

Now I know you have stated, or some one has, that certain things can make the host angry and could cause their account to be suspended. You would think that for the sake of a few lines of code and a little entry in a database some where that the suggestion by Baldeagle could be incorporated into the product.

I personally think that sending the entire contents of the PM in email is totally useless. But of course most people don't understand what that flashing envelope is for either until someone takes them by the hand and points it out too.
Top
#227853 - 07/25/09 04:42 PM Re: How do you remove the content from emails? [Re: JAISP]
Baldeagle Offline
journeyman
Registered: 10/12/07
Posts: 77
Well, in defense of our members, our board is focused on antique Chevy and GMC trucks. So many of our members are older guys who've been mechanics, body men, painters or other tradesmen all of their lives. Computers are new to them and not the easiest thing for them to understand. I understand why they reply to the emails, but I think if the content wasn't in the email they'd be less likely to reply to the email and more likely to read it a second or third time and finally figure out that they need to click on the link.

I don't think removing the content will entirely solve the problem. I just think it's the next logical step in my campaign to reduce my workload.

Oh, and I am the server administrator, so I would have to deal with all the bounces, which would increase my workload, not decrease it. Since I'm doing this for free, for friends, I'm not interested in doing more work.


Edited by Baldeagle (07/25/09 04:46 PM)
_________________________
The Stovebolt Geek
Stovebolt.com
Top
#227856 - 07/25/09 04:46 PM Re: How do you remove the content from emails? [Re: Baldeagle]
Ruben Online   hyper

Registered: 12/20/03
Posts: 4424
Loc: Lutz,FL
This is not a fix suggestion but a feature suggestion.
Maybe we should have the option to set a different return email address for each function. Instead of one global email address for everything.
_________________________
Blue Man Group
Top
#227857 - 07/25/09 04:51 PM Re: How do you remove the content from emails? [Re: Ruben]
Baldeagle Offline
journeyman
Registered: 10/12/07
Posts: 77
Or the option to disable content insertion into emails....using a bogus address isn't an option - I would get the bounces and it irritates other domains. Using a special address (other than my own) simply means I have another mail box to check *or* I have to periodically clean it out.

I'm not trying to piss our members off. I'm just trying to help them do the right thing - reply to a pm with a pm, reply to a Watched Topic email by going to the topic and responding there.

For now I'm perfectly happy editing the files myself, if someone who knows the code will tell me where to look - or even what to look for. I can use grep just fine. I've searched for BODY, PRIV_BODY, RAW_BODY and other combinations of the above without success. All they do is lead me to the very same language files I've already edited.
_________________________
The Stovebolt Geek
Stovebolt.com
Top
#227859 - 07/25/09 04:57 PM Re: How do you remove the content from emails? [Re: Baldeagle]
Ruben Online   hyper

Registered: 12/20/03
Posts: 4424
Loc: Lutz,FL
Yea I know. One thing I have found casually looking in the past is several of the fields in the language files are shared in the different emails that are sent.
The script that sends them uses a different combination of the same language fields depending on what is sent.

Rick is present right now so maybe he can offer a alternative other that a code hack.
_________________________
Blue Man Group
Top
#227862 - 07/25/09 05:09 PM Re: How do you remove the content from emails? [Re: Ruben]
Rick Offline
Post-a-holic
Registered: 06/04/06
Posts: 10164
Loc: Aberdeen, WA
Untested, but the quickest way to get it to stop adding the content of the posts would be to edit libs/mailer.inc.php

About line 153 you'll see this:

Code:
function add_post($postername,$subject.....) {


Right after that, add this:

Code:
return;


That should prevent it from adding the body of the post. However, I think this will prevent it from being added when using the Email Post feature as well. If it does and you want that to work, then you can grep for "add_post" in the scripts directory and comment that line out in all of the scripts except for domailthread.inc.php

Edit: Actually I know it will prevent the mail post from working. There are only a handful of scripts that call the add_post function, so probably best to just grep for it, and then edit those scripts.


Edited by Rick (07/25/09 05:40 PM)
Top
#227864 - 07/25/09 05:13 PM Re: How do you remove the content from emails? [Re: Rick]
JAISP Offline
old hand
Registered: 02/10/07
Posts: 1144
Originally Posted By: Baldeagle
Oh, and I am the server administrator, so I would have to deal with all the bounces, which would increase my workload, not decrease it. Since I'm doing this for free, for friends, I'm not interested in doing more work.


I know exactly how you feel dude. I too am the server admin too so I get all the bounce backs and such as well.
Top
#227869 - 07/25/09 05:33 PM Re: How do you remove the content from emails? [Re: JAISP]
Gizmo Offline

Registered: 06/05/06
Posts: 14995
Loc: Portland, OR; USA
On my server I just have no-reply dumping to a blackhole; so no bounces as it's an actual working address just all mail received is purged.
_________________________
Forums: UGN Security & VNC Web Design & Development
UBB.Threads: UBB.Wiki, My UBBSkins, UBB.Sitemaps
Longtime UBB Supporter, UBB Beta Tester & Resident Post-A-Holic.
UBB Modifications, Styling, Coding Services, Disaster Recovery, and more!
Top
#227874 - 07/25/09 05:56 PM Re: How do you remove the content from emails? [Re: JAISP]
Baldeagle Offline
journeyman
Registered: 10/12/07
Posts: 77
Rick, thanks for the tip. In looking at send_message.inc.php in the scripts directory, I have a question (line 298 and following).
Code:
                // Now lets let them know they got a private message if they chose
                // to be notified
                if ($Notify == "yes") {
                        $mailer = new mailer();
                        $mailer->set_language($Lang);
                        $mailer->set_subject('PMN_SUBJECT', array('BOARD_TITLE' => $config['COMMUNITY_TITLE']));
                        $mailer->set_salute('EMAIL_SALUTE', array('USERNAME' => $Username));
                        $mailer->add_content('PMN_CONTENT', array('BOARD_TITLE' => $config['COMMUNITY_TITLE'], 'FROMNAME' => $fromname));
                        $mailer->add_content('PMN_CONTENT1', array('PM_URL' => make_ubb_url("ubb=viewmessage&message=$message_id&gonew=1" ,"", tr
ue, true)), true);
                        $mailer->add_content('PMN_CONTENT2', array(), true);
                        $mailer->add_post($fromname,$Subject,array(),$Message,$RawBody);
                        $mailer->ubbt_mail($Email);
                }
        }
Where does $RawBody originate from? And why is it added after you've explicitly checked for PMN_CONTENT, PMN_CONTENT1 and PMN_CONTENT2? It seems like you want to separate the actual message from the ability to edit the content, for some reason.

But I can't seem to find where RawBody is initialized. All the hits from grep point to stuff I already know about.
Code:
# grep -r RawBody /usr/local/www/html/ubbthreads/*
/usr/local/www/html/ubbthreads/libs/html.inc.php:	function send_message($Sender="",$To="",$Subject="",$Mess="",$Group="",$RawBody="") {
/usr/local/www/html/ubbthreads/libs/html.inc.php:		if (!$RawBody) $RawBody = $Mess;
/usr/local/www/html/ubbthreads/libs/html.inc.php:			$query_vars = array($message_id,$Sender,$Mess,$date,$RawBody);
/usr/local/www/html/ubbthreads/libs/html.inc.php:				$mailer->add_post($ubbt_lang['UBB_SYSTEM'],$Subject,array(),$Mess,$RawBody);
/usr/local/www/html/ubbthreads/scripts/newreply.inc.php:	list($ResUsername,$Main,$Subject,$Body,$Approved,$ParentUser,$Board,$RawBody,$anon) = $dbh -> fetch_array($sth);
/usr/local/www/html/ubbthreads/scripts/newreply.inc.php:		$QuoteBody = "[quote=$ResUsername]$RawBody [/quote]";
/usr/local/www/html/ubbthreads/scripts/sendmessage.inc.php:	$RawBody    = $Body;
/usr/local/www/html/ubbthreads/scripts/sendmessage.inc.php:	$query_vars = array($message_id,$user['USER_ID'],$Message,$date,$RawBody);
/usr/local/www/html/ubbthreads/scripts/sendmessage.inc.php:			$mailer->add_post($fromname,$Subject,array(),$Message,$RawBody);


Edited by Baldeagle (07/25/09 05:56 PM)
_________________________
The Stovebolt Geek
Stovebolt.com
Top
#227875 - 07/25/09 05:59 PM Re: How do you remove the content from emails? [Re: Baldeagle]
Baldeagle Offline
journeyman
Registered: 10/12/07
Posts: 77
Gizmo, I get that, but that's not what I want.
_________________________
The Stovebolt Geek
Stovebolt.com
Top
#227877 - 07/25/09 06:17 PM Re: How do you remove the content from emails? [Re: Baldeagle]
Rick Offline
Post-a-holic
Registered: 06/04/06
Posts: 10164
Loc: Aberdeen, WA
In sendmessage.inc.php $RawBody is initialized on line 144:

$RawBody = $Body;

The PMN_CONTENT ones are adding different things like who it's from, the url to the post, etc. The call to add_post is where it's actually added to the email on line 308 in that script and you could just comment that out:

Code:
            $mailer->add_post($fromname,$Subject,array(),$Message,$RawBody);
Top
#227882 - 07/25/09 06:55 PM Re: How do you remove the content from emails? [Re: Rick]
Baldeagle Offline
journeyman
Registered: 10/12/07
Posts: 77
If I comment it out, then no message is sent. If I remove $RawBody from that line, that should fix the problem for private messages.

Thanks.
_________________________
The Stovebolt Geek
Stovebolt.com
Top
#227889 - 07/26/09 12:52 PM Re: How do you remove the content from emails? [Re: Baldeagle]
Baldeagle Offline
journeyman
Registered: 10/12/07
Posts: 77
For the record, the right fix was to comment out the entire line, as Rick said. Removing RawBody from the line does not solve the problem.

Thanks for your help, Rick.
_________________________
The Stovebolt Geek
Stovebolt.com
Top
Page 1 of 2 1 2 >



Moderator:  AllenAyres, Harold, Ian, Ron M 
Shout Box

Today's Birthdays
No Birthdays
Recent Topics
Temporary Password email not being received
by
05/24/12 10:02 PM
Ability to "like" individual posts (not Facebook "likes)
by doug
05/23/12 09:03 AM
Island Permissions
by ThreadsUser
05/22/12 03:03 PM
streaming video
by prkrgrp
05/20/12 07:02 PM
New Posts Corrupted? Can someone help?
by PianoWorld
05/19/12 09:41 AM
Forum Stats
10492 Members
36 Forums
33842 Topics
181709 Posts

Max Online: 978 @ 06/24/07 11:19 PM
Random Image