This is something I spent the last couple days on but finally got working fully.
Basically the mod now almost completely mimicks Googlegroups or other listserves/mailing lists (what's the correct term?).
I have the entire mod set up properly as a package with settings under Features/Options, so this should be much improved over my last attachment.
Here's a description from the readme for all the new functions I inserted:
This modification sets up your board to basically behave as a list serve or mailing list. The best example to think of is "Google Groups", in that the discussion board still exists while any emails sent to the site are automatically posted or added as replies to existing topics.
Credits for the original mod "Post By Email" go to Matthew Wolf (a.k.a Grudge). The mod I've created based off of the original differs in that it:
- Allows replies to any email (announcements and notifications) by the board.
- Sending emails with new subjects also creates a new topic to a default board of your choosing (under Features/Options).
- New topics started by email are automatically announced (emailed) to members who can see that board, just as a real mailing list would do. If the number of members able to see the board is large, this might cause a lot of server load by announcing to everyone. Then you might want to either pick a different board to start topics (with fewer members able to access) or disable this entirely (again, under Features/Options).
- For all announcements (posted by email or board), members are automatically subscribed so they receive replies through email and can reply back through email.
- Notifications of replies are formatted to look like email replies (with the last 10 posts quoted and indented).
- All posts created through email show the original poster as the sender, rather than the board.
INSTALLING ----
To install this mod, you will need to configure your server to "pipe" email replies to this script.
In cPanel go into Email -> Forwarding and then make the forum's email address forward to "|/home/path/to/SMF/emailpost.php" without quotes.
Where the path is the path to the script (Note that path - not the URL!) If you are not using cPanel you'll
need to set this up manually.
If you have PHP installed in a path other than /usr/bin/php you will need to change the top line of emailpost.php to point to the correct path. Please note that you *may* also need to chmod the script "emailpost.php" to ensure it is executable (usually 755 or 777).
If you have your own theme, make sure to copy these lines into the appropriate language files:
For yourtheme/languages/Post.english.php
// pftq / Mailing List: Shorter, more concise text for emails.
$txt['mailingList_announce'] = "Reply to This Email or View Original Post: ";
$txt['mailingList_announce2'] = "Unsubscribe from emails for this topic: ";
$txt['mailingList_event'] = "Reply to This Email or View Original Event: ";
$txt['notification_reply'] = "Reply to This Email or View Original Topic: ";
$txt['mailingList_disable'] = 'To disable all future announcements, check the notification settings in your profile page.';
For yourtheme/languages/Modifications.english.php
// pftq / Mailing List: Settings
$txt['mailingList_defaultBoard_help'] = "Board for Topics Started by Email";
$txt['mailingList_autoAnnounce_help'] = "Announce Topics Started by Email";
Obviously, this has strayed a lot from the author's original intent as just to receive emails for notifications and PMs, so I am not sure whether this should still be considered an upgrade on the original or a different mod altogether (besides a few pieces in the emailpost.php, everything else was rewritten).
I'm still testing this and trying to see where I may have overdid the email features a bit (as in made it too spammy), but so far it's been working great. I'm currently using it on 3 sites for smaller groups, so load isn't too much of an issue. I'm not sure about larger sites, but I imagine if you can announce to that many members, this shouldn't be too much different. You can always disable the sending out of emails anyways (it's an option).
If you want to help test this (or just go ahead and start using it
), the file is publicly available at
https://www.pftq.com/smf-mailinglist/ . Although it should be fully functional, it may have a few bugs or glitches, so use at your own risk. As usual, suggestions and anyone else helping test this would be great. There were some areas I wasn't too sure on how to best code, so feedback is always welcome.
394 unique view(s)