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 2 of 2 < 1 2
Topic Options
#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
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."
#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 2 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