HackerOne users: Testing against this community violates our program's Terms of Service and will result in your bounty being denied.
Please upgrade here. These earlier versions are no longer being updated and have security issues.

[GitHub Bug #1758] Email notifications not being sent. (NOW with solution!)

whu606whu606 I'm not a SuperHero; I just like wearing tights... MVP
edited December 2013 in Vanilla 2.0 - 2.8

Vanilla version 2.1b1

Users aren't getting emails when selected in Notification preferences, neither old or new users.

Popup notifications work as expected: on when selected, off when unselected.

There is no issue with emails being sent per se.

Emails are being sent out, as I received a confirmation email when I created a test user account.

In config:

$Configuration['Preferences']['Email']['ConversationMessage'] = '0';

This is how I want it, as I want all options unselected for new users.

In Preferences in GDN_User:

a:1:{s:25:"Email.ConversationMessage";s:1:"1";}

There's nothing in the error logs to suggest that emails are not being sent.

I've gone through threads on here, but nothing seems to answer the issue.

Anyone got any ideas?

I'm more stumped than Stumpy McStump, the stumpiest man in Stumpville.

Comments

  • peregrineperegrine MVP
    edited December 2013

    I tested in Vanilla 3 with these preferences...

    a:10:{s:16:"PreviewThemeName";s:0:"";
    s:18:"PreviewThemeFolder";s:0:"";
    s:17:"Popup.WallComment";s:1:"1";
    s:21:"Popup.ActivityComment";s:1:"1";
    s:25:"Email.ConversationMessage";s:1:"1";
    s:25:"Popup.ConversationMessage";b:0;
    s:21:"Email.BookmarkComment";s:1:"1";
    s:23:"Popup.DiscussionComment";s:1:"1";
    s:21:"Popup.BookmarkComment";s:1:"1";
    s:13:"Popup.Mention";s:1:"1";}
    

    sent a message to to admin using pm

    a mail message was sent out
    
        Date: Sat, 28 Dec 2013 09:38:47 +0000
        Return-Path: [email protected]
        To: admin <[email protected]>
        From: vanilla3 <[email protected]>
        Subject: [vanilla3] peregrine sent you a message.
        Message-ID: <[email protected]>
        X-Priority: 3
        X-Mailer: PHPMailer 5.1 (phpmailer.sourceforge.net)
        MIME-Version: 1.0
        Content-Transfer-Encoding: quoted-printable
        Content-Type: text/plain; charset="utf-8"
    
        peregrine sent you a message.=0A=0Atest=0A=0A---=0AFollow the link below to=
         check it out:=0Ahttp://localhost:80/vanilla3/messages/2#3=0A=0AHave a grea=
        t day!
    

    not sure what you are asking.

    In config:
    
        $Configuration['Preferences']['Email']['ConversationMessage'] = '0';
    
    This is how I want it, as I want all options unselected for new users.
    
    In Preferences in GDN_User:
    
        a:1:{s:25:"Email.ConversationMessage";s:1:"1";}
    

    if you want all users to receive notification of pm Messages via email in config.php

    $Configuration['Preferences']['Email']['ConversationMessage'] = '1';

    I may not provide the completed solution you might desire, but I do try to provide honest suggestions to help you solve your issue.

  • whu606whu606 I'm not a SuperHero; I just like wearing tights... MVP

    @peregrine

    Thank for responding.

    What I want is the emails that are supposed to go out when a user has email notification checked to, in fact, go out!

    Are you suggesting that I need to have the email configuration in config set to 1 to achieve this?

    If that is the case, then it means that any new user will have that setting, which I can live with, but would rather avoid.

  • peregrineperegrine MVP
    edited December 2013

    the config settings effect the defaults for new users
    that is, what checkboxes they will see when they click edit preferences.

    actually if you want all new users to never get e-mails, until they change the preferences.

    //  no e-mails for any new user
    $Configuration['Preferences']['Email']['ConversationMessage']   = '0';
    $Configuration['Preferences']['Email']['BookmarkComment']       = '0';
    $Configuration['Preferences']['Email']['WallComment']           = '0';
    $Configuration['Preferences']['Email']['ActivityComment']       = '0';
    $Configuration['Preferences']['Email']['Mention']               = '0';
    $Configuration['Preferences']['Email']['DiscussionComment']     = '0';
    
    
    // get popups for everything
    $Configuration['Preferences']['Popup']['ConversationMessage']   = '1';
    $Configuration['Preferences']['Popup']['BookmarkComment']       = '1';
    $Configuration['Preferences']['Popup']['WallComment']           = '1';
    $Configuration['Preferences']['Popup']['ActivityComment']       = '1';
    $Configuration['Preferences']['Popup']['DiscussionComment']     = '1';
    //$Configuration['Preferences']['Popup']['DiscussionMention']     = '1';
    $Configuration['Preferences']['Popup']['Mention']               = '1';
    

    As far as changing preferences for a specific user.

    re: previous message..
    I just went into admin user and changed the preferences for admin to get email from if a user sent a personal message. I logged in as peregrine on my localhost and sent a pm to admin.
    the admin user received an e-mail

    The same would be true for any user.

    Point being, I don't experience a bug.

    all "old users" - need to set their setting to what they want.

    as far as receiving mail on their end they have to make sure no e-mail is being blocked or being sent to spam folder.

    do you have an smtp user set up in config?

    I may not provide the completed solution you might desire, but I do try to provide honest suggestions to help you solve your issue.

  • are these set up correctly - you may need to fill in host user and password

    $Configuration['Garden']['Email']['UseSmtp']                    = TRUE;
    $Configuration['Garden']['Email']['SmtpHost']                   = '';
    $Configuration['Garden']['Email']['SmtpUser']                   = '';
    $Configuration['Garden']['Email']['SmtpPassword']               = '';
    $Configuration['Garden']['Email']['SmtpPort']                   = '25';
    $Configuration['Garden']['Email']['SmtpSecurity']               = ''; // ssl/tls
    

    I may not provide the completed solution you might desire, but I do try to provide honest suggestions to help you solve your issue.

  • whu606whu606 I'm not a SuperHero; I just like wearing tights... MVP

    @peregrine

    My email setup is fine.

    That's why I said that the test user got the confirmation email.

    What they don't get is the notification email, and that is what is stumping me.

    If there were NO emails, fair enough; but one without the other?

  • peregrineperegrine MVP
    edited December 2013

    gotya

    set your preferences for a testuser1

    Notify me of private messages. e-mail checked.

    login as testuser2

    send testuser1 a pm from testuser2

    see if they get a notification e-mail.

    'ConversationMessage' refers to pm's not comments as I'm sure you know.

    see if testuser1 gets an e-mail

    might be some things filed on github regarding

    https://github.com/vanillaforums/Garden/issues/1758

    I may not provide the completed solution you might desire, but I do try to provide honest suggestions to help you solve your issue.

  • whu606whu606 I'm not a SuperHero; I just like wearing tights... MVP

    @peregrine

    Those are the steps I took before posting this as a problem!

    Test user got the email confirmation on joining, but after logging in as them, and setting their preferences for Conversation emails, then sending them a PM from my account, zip.

    Hence the stumped!

    UnderDog
  • @whu606 said:
    peregrine

    Those are the steps I took before posting this as a problem!

    Test user got the email confirmation on joining, but after logging in as them, and setting their preferences for Conversation emails, then sending them a PM from my account, zip.

    Hence the stumped!

    well, now its clear :) what you did.

    I found the same issue - the first message sent via pm to a user doesn't get notification.

    • the second message in the same pm there is a notification

    same as the github issue I pointed out.

    I may not provide the completed solution you might desire, but I do try to provide honest suggestions to help you solve your issue.

    UnderDog
  • peregrineperegrine MVP
    edited December 2013

    I suppose a possible change might be - you could also change line 449 in

    applications/conversations/models/class.conversationmodel.php

     $ActivityModel->Queue($Activity);
    to
    
     $ActivityModel->Queue($Activity, 'ConversationMessage');
    

    seemed to work for me.

    I may not provide the completed solution you might desire, but I do try to provide honest suggestions to help you solve your issue.

    UnderDogwhu606Shadowdare
  • whu606whu606 I'm not a SuperHero; I just like wearing tights... MVP

    @Peregrine

    Thanks very much for that.

    I didn't check out the GitHub link last night (half a shandy too many...)

    I'll have a go now and report back!

    UnderDog
  • whu606whu606 I'm not a SuperHero; I just like wearing tights... MVP

    @Peregrine

    Thank you so much for helping out again (again!)

    That did the trick perfectly.

    UnderDogShadowdareperegrine
Sign In or Register to comment.