Firefox PHP

Module: Group Auto-Email

Posted by Joe Curia 
Re: Module: Group Auto-Email
December 17, 2008 12:02PM
Joe,

Yes, I uploaded the newest version. When I came to this thread to post, I saw there was a new version and figured I would give it a try before bugging you again.

When I turned SMTP on, by still not working, I meant that nothing changed. It did send via SMTP, but only I received the e-mail.

However, investigating further, I think this might be a spam problem. Because my Phorum is for a local club, I know the 6 people that are members of the specific group which should receive e-mails. 3 use our local ISP e-mail, 3 use Gmail. With SMTP turned on, after posting a message that generated an e-mail, I received a bunch of Message Delivery System failure notices back to my e-mail. They indicated that the ISP's e-mail server blocked the message as spam. I think checked a test user with Gmail account that was not receiving the messages and found a message in Gmail's spam folder. I requested my server's IP to be removed from the ISP's spam list, and Gmail's issue can be avoided by creating a filter I guess. Kind of strange though because MY Gmail account does NOT mark the messages as spam.

When I turned SMTP back off, I do not receive the Message Delivery System failure notices. Does this have something to do with PHPmail not indicating a failure like SMTP does?

Thanks!
Re: Module: Group Auto-Email
December 17, 2008 10:44PM
Quote
itasor
However, investigating further, I think this might be a spam problem. Because my Phorum is for a local club, I know the 6 people that are members of the specific group which should receive e-mails. 3 use our local ISP e-mail, 3 use Gmail. With SMTP turned on, after posting a message that generated an e-mail, I received a bunch of Message Delivery System failure notices back to my e-mail. They indicated that the ISP's e-mail server blocked the message as spam. I think checked a test user with Gmail account that was not receiving the messages and found a message in Gmail's spam folder. I requested my server's IP to be removed from the ISP's spam list, and Gmail's issue can be avoided by creating a filter I guess. Kind of strange though because MY Gmail account does NOT mark the messages as spam.

I would guess that either the forum admin email is your gmail account and thus ranked hammier or you get a lot of emails from your site and thus your site as a whole is less spammy to Gmail.

Quote

When I turned SMTP back off, I do not receive the Message Delivery System failure notices. Does this have something to do with PHPmail not indicating a failure like SMTP does?

Correct, I would guess that your php mail function does not have the ability to send smtp errors back to the sender. From the standpoint of any php code, the only return we get from the server is true, the message has been accepted for delivery, or false, there is an error in the message data. With the SMTP module, the script supporting it is a full fledged mailer with the ability to generate those remote server SMTP errors.

In my experience as a system admin, you also have the many variables of how each email server is setup. One may return errors while another might simply swallow your emails whole and never let you know they failed to reach the recipients. Others flag every little error, often meaning nothing more than a delay yet causing your users to panic thinking their crucial chain email forward didn't make it to the hundreds of recipients when one received a 451 error and won't go through till your server resends. But I digress :-)


Joe Curia (aka Azumandias)
Modules: l0Admin Mass Email00000000l000000Automatic Time Zones000ll.l00000Enhanced Custom Profiles0.00Google Calendar0000l.l000000Post Previews
000000000Admin Security Suite000000000000Check Modules for Upgrades0000External Authentication000000Group Auto-Email00000.00000Private Message Alerts
000000000Attachment Download Counter0000Custom Attachment Icons000ll.ll00Favorite Forums000000.00000Highlighted Search Terms0000Self-Delete Posts Option
000000000Attachment Watermarks0l00000000Custom Language Database00l.l.0Forum Lockdown00000.00000Ignore Forums0000000000000Threaded Tree View
000000000Automatic Message Pruning00.llll.00Easy Color Scheme Manager0l.l00Forum Subscriptions0000lll000Moderated User Group
Templates:lGeneric Integration000000000 0000Simple Rounded000000 00000000Tabbed Emerald
Group Auto-Email - change default status
January 20, 2009 01:21PM
Hello,

I installed this mod but I would like to change the default status of sending e-mail to off and allow users to change it to on if they wish. Any idea where in the code to change that?

Thanks,

Ashley Horn
Re: Group Auto-Email - change default status
January 20, 2009 02:19PM
Quote
wahorn
I installed this mod but I would like to change the default status of sending e-mail to off and allow users to change it to on if they wish. Any idea where in the code to change that?

This is possible but would require some hacking on your part.

Edit the group_autoemail.php file changing:
Language: PHP
foreach($mail_users as $user_id => $user_info) { if ($debug_i == 1) { if (function_exists(';event_logging_writelog';)) { $testuser = implode(",",$user_info); event_logging_writelog(array( "message" => "First user:\n\n".$user_id." = ".$testuser )); } } if ((empty($user_info["phorum_mod_group_autoemail_user_unsubscribe_setting"]) || (!empty($user_info["phorum_mod_group_autoemail_user_unsubscribe_setting"]) && $user_info["phorum_mod_group_autoemail_user_unsubscribe_setting"] != "off") || $PHORUM["phorum_mod_group_autoemail"]["allow_user_unsubscribe"] != 1)
to:
Language: PHP
foreach($mail_users as $user_id => $user_info) { if ($debug_i == 1) { if (function_exists(';event_logging_writelog';)) { $testuser = implode(",",$user_info); event_logging_writelog(array( "message" => "First user:\n\n".$user_id." = ".$testuser )); } } if ((empty($user_info["phorum_mod_group_autoemail_user_unsubscribe_setting"]) || (!empty($user_info["phorum_mod_group_autoemail_user_unsubscribe_setting"]) && $user_info["phorum_mod_group_autoemail_user_unsubscribe_setting"] != "on") || $PHORUM["phorum_mod_group_autoemail"]["allow_user_unsubscribe"] != 1)

and:
Language: PHP
if ($user_unsubscribe == 1) { $currval = isset($profile["phorum_mod_group_autoemail_user_unsubscribe_setting"]); ?> <dt>Enable automatic group emails:</dt> <dd><select name="phorum_mod_group_autoemail_user_unsubscribe_setting"> <option value="on"<?php if ($PHORUM["DATA"]["PROFILE"]["phorum_mod_group_autoemail_user_unsubscribe_setting"] == "on") { ?> selected="selected"<?php } ?> >On</option> <option value="off"<?php if ($PHORUM["DATA"]["PROFILE"]["phorum_mod_group_autoemail_user_unsubscribe_setting"] == "off") { ?> selected="selected"<?php } ?> >Off</option></select></dd> <?php }
to:
Language: PHP
if ($user_unsubscribe == 1) { $currval = isset($profile["phorum_mod_group_autoemail_user_unsubscribe_setting"]); ?> <dt>Enable automatic group emails:</dt> <dd><select name="phorum_mod_group_autoemail_user_unsubscribe_setting"> <option value="off"<?php if ($PHORUM["DATA"]["PROFILE"]["phorum_mod_group_autoemail_user_unsubscribe_setting"] == "off") { ?> selected="selected"<?php } ?> >Off</option> <option value="on"<?php if ($PHORUM["DATA"]["PROFILE"]["phorum_mod_group_autoemail_user_unsubscribe_setting"] == "on") { ?> selected="selected"<?php } ?> >On</option></select></dd> <?php }


Joe Curia (aka Azumandias)
Modules: l0Admin Mass Email00000000l000000Automatic Time Zones000ll.l00000Enhanced Custom Profiles0.00Google Calendar0000l.l000000Post Previews
000000000Admin Security Suite000000000000Check Modules for Upgrades0000External Authentication000000Group Auto-Email00000.00000Private Message Alerts
000000000Attachment Download Counter0000Custom Attachment Icons000ll.ll00Favorite Forums000000.00000Highlighted Search Terms0000Self-Delete Posts Option
000000000Attachment Watermarks0l00000000Custom Language Database00l.l.0Forum Lockdown00000.00000Ignore Forums0000000000000Threaded Tree View
000000000Automatic Message Pruning00.llll.00Easy Color Scheme Manager0l.l00Forum Subscriptions0000lll000Moderated User Group
Templates:lGeneric Integration000000000 0000Simple Rounded000000 00000000Tabbed Emerald
Re: Group Auto-Email - change default status
January 20, 2009 02:48PM
Thanks. I swapped out the code above and it has the desired results. However, when I turn on Group Auto-email for a user they do not receive an e-mail. I tried this using the built in mail function as well as using smtp for mail. Any ideas?

Ashley
Re: Group Auto-Email - change default status
January 20, 2009 03:19PM
  • Did the module send out emails before the changes?
  • Did you enable emails from that user's control center?
  • Is that user a member if a group with read access to the forum in which you posted the test message?
    • Please note that a user who is also an admin may look like they belong to a group, but until they are actually added, they will not receive emails
  • Did you check that user's email spam box to be sure the test message was not flagged as spam?


Joe Curia (aka Azumandias)
Modules: l0Admin Mass Email00000000l000000Automatic Time Zones000ll.l00000Enhanced Custom Profiles0.00Google Calendar0000l.l000000Post Previews
000000000Admin Security Suite000000000000Check Modules for Upgrades0000External Authentication000000Group Auto-Email00000.00000Private Message Alerts
000000000Attachment Download Counter0000Custom Attachment Icons000ll.ll00Favorite Forums000000.00000Highlighted Search Terms0000Self-Delete Posts Option
000000000Attachment Watermarks0l00000000Custom Language Database00l.l.0Forum Lockdown00000.00000Ignore Forums0000000000000Threaded Tree View
000000000Automatic Message Pruning00.llll.00Easy Color Scheme Manager0l.l00Forum Subscriptions0000lll000Moderated User Group
Templates:lGeneric Integration000000000 0000Simple Rounded000000 00000000Tabbed Emerald
Re: Group Auto-Email - change default status
January 20, 2009 04:03PM
Quote
Joe Curia
  • Did the module send out emails before the changes? No
  • Did you enable emails from that user's control center? Yes
  • Is that user a member if a group with read access to the forum in which you posted the test message? Yes, they have read access (Do they need to be in a group though?)
    • Please note that a user who is also an admin may look like they belong to a group, but until they are actually added, they will not receive emails
    Not an admin
  • Did you check that user's email spam box to be sure the test message was not flagged as spam? Yes, never left our server
Re: Group Auto-Email - change default status
January 20, 2009 04:10PM
Quote
wahorn
  • Is that user a member if a group with read access to the forum in which you posted the test message? Yes, they have read access (Do they need to be in a group though?)

Yes, that is the group part of Group Auto-Email. This module will only send to users that belong to a group and only when a message is posted in a forum belonging to a group. For example, members of the Green Team group will receive emails posted to the Green Team forum because the Green Team group is given read access to that forum.


Joe Curia (aka Azumandias)
Modules: l0Admin Mass Email00000000l000000Automatic Time Zones000ll.l00000Enhanced Custom Profiles0.00Google Calendar0000l.l000000Post Previews
000000000Admin Security Suite000000000000Check Modules for Upgrades0000External Authentication000000Group Auto-Email00000.00000Private Message Alerts
000000000Attachment Download Counter0000Custom Attachment Icons000ll.ll00Favorite Forums000000.00000Highlighted Search Terms0000Self-Delete Posts Option
000000000Attachment Watermarks0l00000000Custom Language Database00l.l.0Forum Lockdown00000.00000Ignore Forums0000000000000Threaded Tree View
000000000Automatic Message Pruning00.llll.00Easy Color Scheme Manager0l.l00Forum Subscriptions0000lll000Moderated User Group
Templates:lGeneric Integration000000000 0000Simple Rounded000000 00000000Tabbed Emerald
Re: Group Auto-Email - change default status
January 20, 2009 04:27PM
OK, in that case I have it set up correctly (I think). I have a single forum with a single group that has read access to that forum. I have a user that is an approved member of the group. The user has Group Auto-Email turned on but they do not receive any e-mail when a posting is made. I must be missing something.

Ashley
Re: Group Auto-Email - change default status
January 21, 2009 10:35AM
Could you please enable the Event Logging module and put the Group Auto-Email module into debug mode (click on the settings for the module, then add &debug=1 to the address bar, ie. http://www.yourphorum.com/admin.php?module=modsettings&mod=group_autoemail&debug=1). This will raise a number of events which may shed some light on the problem. Make another test post and let me know which events are raised. It would probably help to clear the event log before posting so that only current events are displayed.

Thanks for your patience as we debug this issue.


Joe Curia (aka Azumandias)
Modules: l0Admin Mass Email00000000l000000Automatic Time Zones000ll.l00000Enhanced Custom Profiles0.00Google Calendar0000l.l000000Post Previews
000000000Admin Security Suite000000000000Check Modules for Upgrades0000External Authentication000000Group Auto-Email00000.00000Private Message Alerts
000000000Attachment Download Counter0000Custom Attachment Icons000ll.ll00Favorite Forums000000.00000Highlighted Search Terms0000Self-Delete Posts Option
000000000Attachment Watermarks0l00000000Custom Language Database00l.l.0Forum Lockdown00000.00000Ignore Forums0000000000000Threaded Tree View
000000000Automatic Message Pruning00.llll.00Easy Color Scheme Manager0l.l00Forum Subscriptions0000lll000Moderated User Group
Templates:lGeneric Integration000000000 0000Simple Rounded000000 00000000Tabbed Emerald
Sorry, only registered users may post in this forum.

Click here to login