Dave Burke : Freelance .NET Web Developer specializing in Online Communities

Smarter HTML Formatted New Comment emails to .Text admin

I decided on initially putting my .Text Comment Notifier function online with a manual, one-click URL process for sending out the notification to a post's Comment Subscribers.  I'd get the new comment email as usual, and within that email would be a URL I'd click on to send a copy of the comment to subscribers, in other words.  When (if) activity and/or subscriber numbers merit a change in architecture, I'll change it to something more efficient and more automated.

So first step is to replace the rather stark new comment function in .Text with a more sophisticated, HTMLFormat new comment email.  This was quite simple to put in place and looks like the image at bottom, with a similar graphical style as my dbvt.com web site.

I simply replaced the email block in Dottext.Framework.Entries.InsertComment() to call my own email method.

if(!Security.IsAdmin)
{
 try
 {
  DBVT.Email.SendCommentToAdmin(entry, entryID);
 }
 catch{}
}

I wanted to use the same .Text Email Providers so I added another method definition to the IMailProvider Interface


bool Send(string to, string from, string subject, string message);  // .Text interface method definition
bool Send(string to, string from, string subject, string message, bool blnHtmlFormat);  // Added

Now with a Smarter HTML Formatted New Comment notification to Admin, there are a number of administrative functions that can be added.  More on that next.

 

Comments (1) | Post RSS RSS comment feed

Posted on 9/18/2004 10:30:00 PM by Dave Burke
Categories:
Tags:

Related posts

Comments (1) -


Powered by BlogEngine.NET 2.0.0.36
Theme by Dave Burke