create new tag
, view all tags

MailPageAddOnDev Discussion: Page for developer collaboration, enhancement requests, patches and improved versions on MailPageAddOn contributed by the TWikiCommunity.
• Please let us know what you think of this extension.
• For support, check the existing questions, or ask a new support question in the Support web!
• Please report bugs below

Development discussion for MailPageAddOn

After some effort, I was able to contact the author of the Mailpage script which I used as the foundation for this Add-on. He was very friendly and indicated we were welcome to incorporate it into TWiki. Perhaps someone with more coding knowledge could look at this and see a way to integrate it into TWiki more eloquently.

-- LynnwoodBrown - 01 Feb 2005

Thanks Lynnwood for making this Add-on available to the community. There is a lot of momentum going on with the TWikiExtensions.

-- PeterThoeny - 02 Feb 2005

what do you think of this? If you like it let me know and I will upload my changes sometime.

-- TravisBarker - 23 Apr 2005

Sure, it'd be better without an external script. Is yours a plugin or should it be in the core?

-- MartinCleaver - 24 Apr 2005

A better name for this addon would be SendAFriendAddOn.

-- ArthurClemens - 24 Apr 2005

I don't think it belongs in the core 1. we didn't write it and I'm not certain about the license. 2. sendmail is not (or shouldn't be) depended upon for core code functionality imho. btw this includes WebNotify too. Per topic notification and other related features are packaged as plugins already, infact maybe we should take a look at refactoring all of that into one solid MailUtilitiesPlugin or something...


-- TravisBarker - 25 Apr 2005

btw i tried to get the thing to read from the TWiki style.css but it was not recognized as proper css for whatever reason and w3c totally rejected it. So I just copied the "important" bits direct into the mailnotify code.

-- TravisBarker - 25 Apr 2005

Updated this addon for 4.0.2 (See Bugs:Item2062), users running 4.0.1 and earlier should use / continue to use MailPageAddOn.zip, v1.00.

-- SteffenPoulsen - 08 Apr 2006

Thank you for updating and cleaning this up, Steffan!

-- LynnwoodBrown - 09 Apr 2006

The zip file for this addon is missing the templates folder and the template files. Can you please include them and upload the files again?

-- SriramAcharya - 02 Aug 2006

Thanks, you're right about that. New version uploaded.

-- SteffenPoulsen - 02 Aug 2006

The MailPageAddOn topic displayed r1, but the .txt,v file has 8 revisions. I did a save without change, which fixed the topic to r9. This is another example of BuildContrib issue, tracked in Bugs:Item2683.

-- PeterThoeny - 03 Aug 2006

How can I modify this plugin to work with the Net::SMTP module?

-- AlokNarula - 07 Aug 2006

Lynnwood, I added a SHORTDESCRIPTION to the "Add-On Info" section so that this add-on is represented properly in the AddOnPackage topic and query topics. Please feel free to take this into the next release.

-- PeterThoeny - 07 Oct 2006

I have a problem using this plugin in a vew where viewing a topic requires login (this is because that web contains company confidential information). Instead of mailing the page, I get mailed a login-in page. Obviously, the script accesses the page as a user different from the user actually sending the page.

Does anybody know which user that is? If it's not a guest user, I might add it to the authorized users list as a possible workaround (but I'd prefer it if someone gave me pointers on what to change in order for the script to use the logged in user's credentials).

-- MatijaGrabnar - 05 Feb 2007

I am using cygwin on windows. So any idea of how to use Net::SMTP or ssmtp instead of sendmail

-- AmitvikramMuttigi - 26 Apr 2007

FYI. This addon requires CPAN:LWP::UserAgent, but it's not listed in the CPAN dependencies.

-- DustinGooding - 07 May 2007

fixed and uploaded; see Bugs:Item4039

-- WillNorris - 08 May 2007

Few ideas:

  1. would be nice to have possibility to set automatically values for mail form fields,
  2. would be nice to be possible setting "recipientmail" field as a TWikiGroup e.g. recipientmail="Main.TestGroup"

The first "wish" I could solve with the following.

In mailpage.pattern.tmpl (for pattern skin):

<     <td><input type="text" name="sendername" value="" /></td>
<     <td><input type="text" name="senderemail" value="" /></td>
>     <td><input type="text" name="sendername" value="%WIKINAME%" /></td>
>     <td><input type="text" name="senderemail" value="%USERINFO{format="$emails"}%" /></td>
<     <td><input type="text" name="recipient" /></td>
<     <td><input type="text" name="recipientemail" /></td>
>     <td><input type="text" name="recipient" value="%URLPARAM{"recipient"}%" /></td>
>     <td><input type="text" name="recipientemail" value="%URLPARAM{"recipientmail"}%" /></td>
And then an example "Send this page to a friend" button is:
<form action="/twiki/bin/oops/%WEB%/%TOPIC%" method="post">
<input type="hidden" name="template" value="mailpage" />
<input type="hidden" name="recipient" value="my recipients" />
<input type="hidden" name="recipientmail" value="a@one.ue b@two.ue" />
<input type="submit" value="Send page to friend(s)" />

For the second ("recipientmail"), the solution would be to set up a TWiki variable for e.g. web. But anyway it would be much more comfortable to use TWikiGroups.

BTW did I mention that I really like the idea of this AddOn? wink

-- JacekZapotoczny - 23 Jul 2007

I get a 500 Server Error. Here is the Error Log: "syntax error at /home/content/m/y/a/myaccunt/html/twiki/bin/mailpage/mailpage.cgi line 48, near "if (lc $FORM{'action'} eq "send" Execution of /home/content/m/y/a/myaccount/html/tutorwiki/bin/mailpage/mailpage.cgi aborted due to compilation errors. [Mon Dec 10 23:02:47 2007] [error] [client] Premature end of script headers: /var/chroot/home/content/m/y/a/myaccoun/html/twiki/bin/mailpage/mailpage.cgi"

*I changed the path from my actual username.

Im hosted by godaddy.

Any ideas?

-- JoelWalkley - 11 Dec 2007

Edit | Attach | Watch | Print version | History: r19 < r18 < r17 < r16 < r15 | Backlinks | Raw View | Raw edit | More topic actions
Topic revision: r19 - 2007-12-11 - JoelWalkley
  • 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-2018 by the contributing authors. All material on this collaboration platform is the property of the contributing authors.