Tags:
create new tag
view all tags

Question

I'm in the midst of implementing web notify function on my twiki sites.

I've worked my way around crontab (I'm pretty pleased at that I have to say). So the server end seems OK - I think! Maybe famous last words.

But the email that is being sent out carries the pattern skin formatting with it in the body of the email. This wouldn't be a problem except that the webleftbar sits over the top of the web changes listing making it impossible to read. This happens on both the twikis.

There is an attachment to the email which is a repetition of the body of the email. The attachment doesn't include the webleftbar.

Any suggestions to clear the webleftbar out of the email body?

This is a similar but slightly different question to ChangeFormatOfEmailMessage - maybe there is however a single solution.

Environment

TWiki version: TWikiRelease02Sep2004
TWiki plugins: DefaultPlugin, EmptyPlugin, InterwikiPlugin
Server OS: Linux
Web server: Apache
Perl version: 5.005
Client OS:  
Web Browser: Firefox, IE
Categories: Skin

-- SueLocke - 07 Apr 2005

Answer

I've just noticed the topic HowToAvoidSkinInWebChangesEMail which raised the exact same problem has been closed unanswered. Is this one perhaps for the "there isn't an answer" basket?

-- SueLocke - 07 Apr 2005

Ok. I'm working hard to sort this out in light of other support requests on this same topic. I've been checking through the mailnotify template and wonder if this might be the source of the problem:

Content-Type: text/html; charset=%CHARSET%; name="%WEB%Changes.html"
Content-Transfer-Encoding: 7bit
Content-Disposition: inline; filename="%WEB%Changes.html"
Content-Base: "%SCRIPTURL%/view%SCRIPTSUFFIX%/%WEB%/%HOMETOPIC%"

That is the use of inline as the content-disposition value. I know little about this other than as a normal email user and now with a few bits and pieces of info from the web about this. Could this value be changed? Could this be part of the solution?

-- SueLocke - 08 Apr 2005

TWiki does not (yet?) support a configurable skin for the e-mail notification. If you want to hack your TWiki installation replace the skin setting in twiki/bin/mailnotify. Change this:

    my $skin = TWiki::Prefs::getPreferencesValue( "SKIN" );
to this:
    my $skin = "print";   # or whatever skin you prefer

Be warned, this is not tested.

Alternatively, if you want to get just plain text e-mail notification you can try to replace twiki/templates/mailnotify.tmpl with this:

From: %WIKIWEBMASTERNAME% <%WIKIWEBMASTER%>
To: %EMAILTO%
Subject: %WIKITOOLNAME%.%WEB% - Automated notification of topic changes
Content-Type: text/plain; charset=%CHARSET%
Content-Transfer-Encoding: 7bit

This is an automated email from %WIKITOOLNAME%.

New or changed topics in %WIKITOOLNAME%.%WEB%, since %LASTDATE%:
%TOPICLIST%

Review recent changes in:
  %SCRIPTURL%/view%SCRIPTSUFFIX%/%WEB%/WebChanges

Subscribe / Unsubscribe in:
  %SCRIPTURL%/view%SCRIPTSUFFIX%/%WEB%/%NOTIFYTOPIC%

I have not tested this out either.

-- PeterThoeny - 08 Apr 2005

ChangeFormatOfEmailMessage reports the same issue. See my note on why we should fix this issue.

-- PeterThoeny - 08 Apr 2005

Thanks Peter. Your second hack suggestion for mailnotify works to create a completely plain email. I've tested it on a normal cron job execution and the resulting email is readable and contains all the information it needs to.

Thanks for your help.

-- SueLocke - 08 Apr 2005

Is there any way to change the e-mail notification format in one of the webs versus the entire Twiki site? We are just one web, and I administer the web belonging to our specific project, so I don't think I have access to mailnotify.tmpl. Or would this have to be done by the system administrator who manages the Twiki site universally for all webs?

Thanks fo

-- JenniferWalch - 13 Feb 2009

There is a template path, you should be able to create a special e-mail template for just one web. Read docs at TWikiTemplates.

-- PeterThoeny - 13 Feb 2009

Edit | Attach | Watch | Print version | History: r8 < r7 < r6 < r5 < r4 | Backlinks | Raw View | Raw edit | More topic actions
Topic revision: r8 - 2009-02-13 - PeterThoeny
 
  • Learn about TWiki  
  • Download TWiki
This site is powered by the TWiki collaboration platform Powered by Perl Hosted by OICcam.com Ideas, requests, problems regarding TWiki? Send feedback. Ask community in the support forum.
Copyright © 1999-2026 by the contributing authors. All material on this collaboration platform is the property of the contributing authors.