Comment notification hack

I find it irritating that each time I reply to someone’s comment on this site I receive an email notifying me that I’ve posted a comment. I like getting the notifications when someone else comments, just not when I comment.

So I opened up the MT source code and fixed it. Now when I add a comment, I don’t get the email.

Open lib/MT/App/Comments.pm and find the line that says MT::Mail->send(\%head, <<BODY);. (It’s line 123 in MT 2.21) Change it to read MT::Mail->send(\%head, <<BODY) unless $author->email eq $comment->email;

Now the author of a post won’t receive a comment notification if the commenter’s email is the same as the author’s.

asb
October 24, 2004 8:51 PM

Has anything been done to fix this for MT 3x? I’m getting sooooo tired of getting my own comments.

I’d really appreciate an answer and I’d more appreciate a posted fix!

Thanks.

heather
January 30, 2005 6:05 PM

i don’t know how dirty it is, but i changed lines 471 and 472 in lib/MT/App/Comments.pm (MT-3.15) from:

    MT::Mail->send(\%head, $body) 
        or return $app->handle_error(MT::Mail->errstr());

to

   MT::Mail->send(\%head, $body) unless $author->email eq $comment->email;
       # or return $app->handle_error(MT::Mail->errstr());

to get rid of the annoying self-comments.

i’m sure you could just use a filter in your email app, too.

Kristina
March 23, 2005 10:10 PM

Heather’s mod worked for me. thanks heather and adam!

Jennifer
April 22, 2005 1:05 AM

FYI, if you would like to do this in MT v.3.1x and have MT-Blacklist installed, the file to modify is called Submission.pm, located in your plugins folder: plugins/Blacklist/lib/Blacklist/App/Submission.pm

Around line 797 (almost the very bottom of the file) you can use Heather’s mod above.

Seems to work for me. Hope someone else finds this useful!

eli
January 13, 2006 8:46 AM

FYI, its lines 578-579 in MT 3.2

These are the last 15 comments. Read all 17 comments here.

This discussion has been closed.

Lijit Search

Best Of

  • Comment Spam Manifesto Spammers are hereby put on notice. Your comments are not welcome. If the purpose behind your comment is to advertise yourself, your Web site, or a product that you are affiliated with, that comment is spam and will not be tolerated. We will hit you where it hurts by attacking your source of income.
  • Customer reference questions. Sample questions to ask customer references when choosing a software vendor.
  • Movie marketing on a budget Mark Cuban's looking for more cost effective ways to market movies.
  • Rounded corners in CSS There lots of ways to create rounded corners with CSS, but they always require lots of complex HTML and CSS. This is simpler.
  • Debunking predictions Read/Write Web's authors have some goofy predictions.
  • More of the best »

Recently Read

Get More

Subscribe | Archives

Recently

Unfriendly returns (Dec 27)
Toys R Us blocks returns. You can bet I'll do all my shopping at a store with a friendlier return policy in the future.
The ongoing Comcast saga (Dec 27)
Using Twitter as a customer service tool.
Comcast and Vonage, Part 2 (Dec 26)
A Comcast tech blew their credibility.
How to make friends and influence music fans (Dec 25)
Apparently some of these labels have all the customers they need.
Comcast and Vonage (Dec 24)
I hate Comcast.
Traditions (Dec 22)
What are your family Christmas traditions?
Charlie Brown Agency (Dec 17)
Brilliant Charlie Brown Christmas and ad agency mashup.

Subscribe to this site's feed.

Elsewhere

Feed Crier
Get alerted by IM when your favorite web sites and feeds are updated.
SacStarts
The Sacramento technology startup community.
Pinewood Freak
Pinewood Derby tips and tricks
Del.icio.us
My tagstream at del.icio.us.
Waddlespot
My son's Club Penguin community. News, blogs, tips, and tricks.

Contact

Adam Kalsey

Mobile: 916.600.2497

Email: adam AT kalsey.com

AIM or Skype: akalsey

Resume

PGP Key

©1999-2009 Adam Kalsey.
Content management by Movable Type.