tips:autosubscribemailinglist
Differences
This shows you the differences between two versions of the page.
Both sides previous revisionPrevious revisionNext revision | Previous revision | ||
tips:autosubscribemailinglist [2008-10-17 13:59] – lifeisfoo | tips:autosubscribemailinglist [2011-06-28 22:29] (current) – old revision restored lupo49 | ||
---|---|---|---|
Line 1: | Line 1: | ||
+ | ====== Auto subscribe your user to a mailing list ====== | ||
+ | To subscribe all your dokuwiki user to a mailing list, avoiding spambot, you can edit inc/ | ||
+ | Edit the end of updateprofile() function: | ||
+ | < | ||
+ | if (!count($changes)) { | ||
+ | msg($lang[' | ||
+ | return false; | ||
+ | } | ||
+ | |||
+ | if ($conf[' | ||
+ | if (!$auth-> | ||
+ | msg($lang[' | ||
+ | return false; | ||
+ | } | ||
+ | } | ||
+ | |||
+ | return $auth-> | ||
+ | } | ||
+ | ... | ||
+ | </ | ||
+ | |||
+ | adding only a call to php mail function: | ||
+ | |||
+ | < | ||
+ | if (!count($changes)) { | ||
+ | msg($lang[' | ||
+ | return false; | ||
+ | } | ||
+ | |||
+ | if ($conf[' | ||
+ | if (!$auth-> | ||
+ | msg($lang[' | ||
+ | return false; | ||
+ | } | ||
+ | } | ||
+ | / | ||
+ | if(mail(" | ||
+ | msg(" | ||
+ | } | ||
+ | /*******/ | ||
+ | |||
+ | return $auth-> | ||
+ | } | ||
+ | ... | ||
+ | </ | ||
+ | |||
+ | Now, every time a user after registration update his password (or other stuff in his profile), he will subscribe you mailing list.\\ | ||
+ | If you mailing list daemon accept subscription only by admin, well you can use : | ||
+ | < | ||
+ | \\ | ||
+ | By the way, your server need to have installed a mail daemon. \\ | ||
+ | Tested on dokuwiki 2008-05-05.\\ | ||
+ | |||
+ | If you have a problem, ask me at < |