|
Joined: Oct 2007
Posts: 362 Likes: 8
Enthusiast
|
Enthusiast
Joined: Oct 2007
Posts: 362 Likes: 8 |
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 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 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: 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".
Last edited by Baldeagle; 07/25/2009 3:55 PM.
|
|
|
|
Joined: Jun 2006
Posts: 16,300 Likes: 116
|
Joined: Jun 2006
Posts: 16,300 Likes: 116 |
Why not just set the board email to "no-reply@yourdomain.tld" then when they reply to it, it goes no where...
|
|
|
|
Joined: Oct 2007
Posts: 362 Likes: 8
Enthusiast
|
Enthusiast
Joined: Oct 2007
Posts: 362 Likes: 8 |
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.
|
|
|
|
Joined: Feb 2007
Posts: 1,294 Likes: 2
Veteran
|
Veteran
Joined: Feb 2007
Posts: 1,294 Likes: 2 |
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. 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.
|
|
|
|
Joined: Oct 2007
Posts: 362 Likes: 8
Enthusiast
|
Enthusiast
Joined: Oct 2007
Posts: 362 Likes: 8 |
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.
Last edited by Baldeagle; 07/25/2009 4:46 PM.
|
|
|
|
Joined: Dec 2003
Posts: 6,563 Likes: 78
|
Joined: Dec 2003
Posts: 6,563 Likes: 78 |
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 There is no such thing as stupid questions. Just stupid answers
|
|
|
|
Joined: Oct 2007
Posts: 362 Likes: 8
Enthusiast
|
Enthusiast
Joined: Oct 2007
Posts: 362 Likes: 8 |
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.
|
|
|
|
Joined: Dec 2003
Posts: 6,563 Likes: 78
|
Joined: Dec 2003
Posts: 6,563 Likes: 78 |
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 There is no such thing as stupid questions. Just stupid answers
|
|
|
|
Joined: Jun 2006
Posts: 9,242 Likes: 1
Former Developer
|
Former Developer
Joined: Jun 2006
Posts: 9,242 Likes: 1 |
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:
function add_post($postername,$subject.....) {
Right after that, add this: 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.
Last edited by Rick; 07/25/2009 5:40 PM.
|
|
|
|
Joined: Feb 2007
Posts: 1,294 Likes: 2
Veteran
|
Veteran
Joined: Feb 2007
Posts: 1,294 Likes: 2 |
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.
|
|
|
|
Joined: Jun 2006
Posts: 16,300 Likes: 116
|
Joined: Jun 2006
Posts: 16,300 Likes: 116 |
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.
|
|
|
|
Joined: Oct 2007
Posts: 362 Likes: 8
Enthusiast
|
Enthusiast
Joined: Oct 2007
Posts: 362 Likes: 8 |
Rick, thanks for the tip. In looking at send_message.inc.php in the scripts directory, I have a question (line 298 and following). // 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. # 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);
Last edited by Baldeagle; 07/25/2009 5:56 PM.
|
|
|
|
Joined: Oct 2007
Posts: 362 Likes: 8
Enthusiast
|
Enthusiast
Joined: Oct 2007
Posts: 362 Likes: 8 |
Gizmo, I get that, but that's not what I want.
|
|
|
|
Joined: Jun 2006
Posts: 9,242 Likes: 1
Former Developer
|
Former Developer
Joined: Jun 2006
Posts: 9,242 Likes: 1 |
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: $mailer->add_post($fromname,$Subject,array(),$Message,$RawBody);
|
|
|
|
Joined: Oct 2007
Posts: 362 Likes: 8
Enthusiast
|
Enthusiast
Joined: Oct 2007
Posts: 362 Likes: 8 |
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.
|
|
|
|
Joined: Oct 2007
Posts: 362 Likes: 8
Enthusiast
|
Enthusiast
Joined: Oct 2007
Posts: 362 Likes: 8 |
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.
|
|
|
|
Bots
by Outdoorking - 04/13/2024 5:08 PM
|
|
|
|
|
4 members (Gizmo, Baldeagle, Ruben, 1 invisible),
779
guests, and
156
robots. |
Key:
Admin,
Global Mod,
Mod
|
|
|
|