Emails are not sending

Collapse
This topic is closed.
X
X
 
  • Time
  • Show
Clear All
new posts
  • sm4uma
    Member
    • Feb 2018
    • 42

    Emails are not sending

    I have a message board with almost 900 members. Most members are subscribed to the main forum and receive email notifications for new topics that are posted. I am using SendGrid's SMTP relay. When I use the diagnostics feature to send a test email, it works. When I create test threads where only a couple of users will receive the email notification, it works.

    When the email notifications are tested on a live board with most members set to receive an email notification of a new topic, the emails only get sent out to the first couple of users (by userid) and that is all. The rest of the emails do not get sent. I check my counter in SendGrid and it confirms that emails went out only to the first couple of users and that is all. I am a paid SendGrid user with 100k/month limit and I am nowhere close to the limit, so I don't think the problem is with SendGrid.

    My vBulletin settings are as follows:

    Enable email features - Yes
    Email flood check - 0
    Use cron - No
    Email send delay - 0
    Use mailqueue - No
    Number of emails to send per batch - 10
    Bounce email address - Blank
    Enable -f parameter - No
    Use bulk header - No
    Encode as UTF-8 - No
    SMTP email - Yes
    SMTP host - smtp.sendgrid.net
    SMTP port - 587
    SMTP username - apikeys
    SMTP password - *******
    SMTP secure connection - TLS
    Extra headers - Blank

    I am not sure what the problem is, and I am also not sure on where to look or what to enable to figure out what the problem is.
  • sm4uma
    Member
    • Feb 2018
    • 42

    #2
    Bump.

    Comment

    • Wayne Luke
      vBulletin Technical Support Lead
      • Aug 2000
      • 73979

      #3
      What do the Sendgrid Mail logs say for the emails that didn't get sent out?
      Translations provided by Google.

      Wayne Luke
      The Rabid Badger - a vBulletin Cloud demonstration site.
      vBulletin 5 API

      Comment

      • sm4uma
        Member
        • Feb 2018
        • 42

        #4
        Nothing, there is no trace in SendGrid's dashboard/activity log of any of those emails, which leads me to believe something is incorrect with vBulletin.

        Comment

        • sm4uma
          Member
          • Feb 2018
          • 42

          #5
          The delivery rate is 100% but the total amount of emails sent is miniscule.

          Comment

          • Wayne Luke
            vBulletin Technical Support Lead
            • Aug 2000
            • 73979

            #6
            Hmmm.. We use sendgrid for vBulletin Cloud email by default.

            What do you have set for your Dmarc Policy? It should be p=no

            See: https://dmarc.org/overview/

            Also make sure that the webmaster email under Settings -> Options -> Site Name / URL / Contact Details matches the domain of the site.
            Translations provided by Google.

            Wayne Luke
            The Rabid Badger - a vBulletin Cloud demonstration site.
            vBulletin 5 API

            Comment

            • sm4uma
              Member
              • Feb 2018
              • 42

              #7
              The vBulletin URL is http://www.[domain].com and the webmaster email is no-reply@[domain].com.

              I have not set any DMARC policies yet. I was going to do this once I got the emails working correctly. Based on my understanding of DMARK/DKIM/SPF, those settings (or lack thereof) should not be causing my specific issue where the emails are not even getting queued up in SendGrid, especially since some emails do go out. But, do let me know if I am wrong about that.

              What next?

              Comment

              • sm4uma
                Member
                • Feb 2018
                • 42

                #8
                I still need a response to this.

                Comment

                • Wayne Luke
                  vBulletin Technical Support Lead
                  • Aug 2000
                  • 73979

                  #9
                  Don't have any further suggestions without logs from both servers.
                  Translations provided by Google.

                  Wayne Luke
                  The Rabid Badger - a vBulletin Cloud demonstration site.
                  vBulletin 5 API

                  Comment

                  • sm4uma
                    Member
                    • Feb 2018
                    • 42

                    #10
                    If you can explain how to get the proper logs from vBulletin, I could do so.

                    Comment

                    • Wayne Luke
                      vBulletin Technical Support Lead
                      • Aug 2000
                      • 73979

                      #11
                      Your logs would be located at whatever location is specified under Settings -> Options -> Statistics and Logs. The mail log needs to be compared to the log from sendgrid on what is sent.

                      We would also need the PHP Error Log. I have no idea where that is stored on your server.
                      Translations provided by Google.

                      Wayne Luke
                      The Rabid Badger - a vBulletin Cloud demonstration site.
                      vBulletin 5 API

                      Comment

                      • sm4uma
                        Member
                        • Feb 2018
                        • 42

                        #12
                        Settings -> Options -> Statistics and Logs does not exist. I assume you mean to say Settings -> Options -> Error Handling & Logging. I have set these settings to create an email log file and a php log file.

                        I then used a SQL query to change all 900 users' email addresses to my own (I backed up the table before I did this so I could restore it later), so that I could test this issue without annoying any users.

                        I then created a series of test topics. Only the first three users by userid receive emails. This happens every single time and it's always the first three users by userid.

                        The email log file is created to show three successful emails set. This matches exactly what SendGrid reports, three emails sent.

                        The php log does not get created, presumably because there are no php errors.

                        Another issue I noticed as part of this is that I receive a JSON error every time I create a new topic. This occurs every single time, although the topic still gets created. I am attaching a screenshot.

                        Could this JSON error be causing the email problem?

                        How do I fix the JSON error?

                        What next steps should I take to diagnose the email problem?
                        Attached Files
                        Last edited by sm4uma; Mon 4 Jun '18, 9:30am.

                        Comment

                        • Wayne Luke
                          vBulletin Technical Support Lead
                          • Aug 2000
                          • 73979

                          #13
                          What happens if all the email addresses are unique?

                          For the JSON error, we need the output from your browser's Console. This is found in the developer tools and you can usually access that with F12 on a Windows or Linux machine. I don't know what key you would use on a Mac.
                          Translations provided by Google.

                          Wayne Luke
                          The Rabid Badger - a vBulletin Cloud demonstration site.
                          vBulletin 5 API

                          Comment

                          • sm4uma
                            Member
                            • Feb 2018
                            • 42

                            #14
                            I made backups of my FTP server and SQL database, then requested my host to wipe/reset everything (SiteGround). I then installed a fresh 5.4.1 installation, set up the email settings to use SendGrid, created five test users (total six users, five test + one admin), subscribed all of the test users to receive notification emails, and then created a test topic as the admin.

                            Again, I received the exact same JSON error. Again, only three of the five users (the first three by userid) received notification emails. The following is my console log:

                            footer-rollup-541.js:382 Securitytoken updated
                            ckeditor-rollup-541.js:71 vBulletin.contentEntryBox.init start
                            ckeditor-rollup-541.js:71 vBulletin.contentEntryBox.init finish
                            ckeditor-rollup-541.js:2316 Ckeditor: Plugin Loaded: http://www.domain.com/js/ckep...grow/plugin.js
                            ckeditor-rollup-541.js:2316 Ckeditor: Plugin Loaded: http://www.domain.com/js/ckep...able/plugin.js
                            ckeditor-rollup-541.js:2316 Ckeditor: Plugin Loaded: http://www.domain.com/js/ckep...size/plugin.js
                            ckeditor-rollup-541.js:2316 Ckeditor: Plugin Loaded: http://www.domain.com/js/ckep...tils/plugin.js
                            ckeditor-rollup-541.js:2316 Ckeditor: Plugin Loaded: http://www.domain.com/js/ckep...dget/plugin.js
                            ckeditor-rollup-541.js:2316 Ckeditor: Plugin Loaded: http://www.domain.com/js/ckep...age2/plugin.js
                            footer-rollup-541.js:382 Ckeditor: initEditor(vb-cke-instance-1)
                            ckeditor-rollup-541.js:2316 Ckeditor: Initializing editor: vb-cke-instance-1
                            footer-rollup-541.js:382 vBulletin.loadingIndicator.show ajax indicator suppressed
                            jquery.js:8561 [Deprecation] Synchronous XMLHttpRequest on the main thread is deprecated because of its detrimental effects to the end user's experience. For more help, check https://xhr.spec.whatwg.org/.
                            send @ jquery.js:8561
                            footer-rollup-541.js:382 vBulletin.loadingIndicator.hide ajax indicator suppressed
                            footer-rollup-541.js:382 Edit mode: initializeEditor
                            footer-rollup-541.js:2556 Initializing PM Dropdown!
                            footer-rollup-541.js:2556 Idle detection enabled
                            footer-rollup-541.js:2556 PM Chat window not detected, skipping init.
                            file-upload-rollup-541.js:55 Fileupload: vBulletin.upload.initializePhotoUpload
                            file-upload-rollup-541.js:55 Fileupload: vBulletin.upload.initializePhotoUpload finished
                            footer-rollup-541.js:382 vBulletin.loadingIndicator.show Counter: 1 Source: ajaxStart
                            footer-rollup-541.js:382 vBulletin.loadingIndicator.hide Counter: 0 Source: ajaxStop
                            ckeditor-rollup-541.js:56 Tag Editor is already initialized.
                            footer-rollup-541.js:382 vBulletin.loadingIndicator.show ajax indicator suppressed
                            footer-rollup-541.js:382 vBulletin.loadingIndicator.hide ajax indicator suppressed
                            ckeditor-rollup-541.js:2316 Ckeditor: Username autosuggest: init() start
                            ckeditor-rollup-541.js:2316 Ckeditor: Username autosuggest: init() finish
                            ckeditor-rollup-541.js:2316 Ckeditor: Initializing placeholder text
                            ckeditor-rollup-541.js:2316 Ckeditor: Added h3 to ckeditor magicline triggers.
                            ckeditor-rollup-541.js:2316 Ckeditor: Editor initialized: vb-cke-instance-1
                            ckeditor-rollup-541.js:2316 Ckeditor: Added editorId "vb-cke-instance-1" to form
                            ckeditor-rollup-541.js:2316 Ckeditor: Init: verifyEditorCss: checkCss called 1 times
                            ckeditor-rollup-541.js:2316 Ckeditor: Placeholder text: attachBodyEventHandlers
                            footer-rollup-541.js:382 vBulletin.loadingIndicator.show Counter: 1 Source: Unspecified
                            footer-rollup-541.js:382 vBulletin.loadingIndicator.show Counter: 2 Source: ajaxStart
                            footer-rollup-541.js:2556 Polled for header data!1528147022009
                            footer-rollup-541.js:2556 Polled for header data!1528147052009
                            ckeditor-rollup-541.js:2254 Auto-Save: Saving Text
                            /create-content/text/:1 Failed to load resource: the server responded with a status of 504 (Gateway Timeout)
                            ckeditor-rollup-541.js:71 Error when submitting content: parsererror, SyntaxError: Unexpected token G in JSON at position 1
                            error @ ckeditor-rollup-541.js:71
                            footer-rollup-541.js:382 vBulletin.loadingIndicator.hide Counter: 1 Source: ajaxStop
                            ckeditor-rollup-541.js:71 ajaxForm complete (vBulletin.contentEntryBox.initAjaxFormSubmit)
                            footer-rollup-541.js:382 vBulletin.loadingIndicator.hide Counter: 0 Source: Unspecified
                            footer-rollup-541.js:2556 Polled for header data!1528147082011
                            footer-rollup-541.js:382 vBulletin.loadingIndicator.show ajax indicator suppressed
                            footer-rollup-541.js:382 vBulletin.loadingIndicator.hide ajax indicator suppressed
                            footer-rollup-541.js:2556 Polled for header data!1528147112012
                            footer-rollup-541.js:382 vBulletin.loadingIndicator.show ajax indicator suppressed
                            footer-rollup-541.js:382 vBulletin.loadingIndicator.hide ajax indicator suppressed
                            footer-rollup-541.js:2556 Polled for header data!1528147142012
                            footer-rollup-541.js:382 vBulletin.loadingIndicator.show ajax indicator suppressed
                            footer-rollup-541.js:382 vBulletin.loadingIndicator.hide ajax indicator suppressed

                            Comment

                            • sm4uma
                              Member
                              • Feb 2018
                              • 42

                              #15
                              Through further testing, I have figured out that it is the SMTP settings that are causing the JSON problem. When I turn the settings to use the php mail() function instead of SendGrid's SMTP, there is no JSON error. Turning the setting to use the php mail() function also makes it so that all users are receiving emails instead of just the first three. However, this is not a proper solution as I will quickly meet my quota if I keep using SiteGround's email.

                              Is there some way of using the php mail() function but having that function use SendGrid's SMTP replay? I can edit source files if necessary. Or is this something that I would need to speak to SiteGround about?

                              I've also tested this using 5.4.2 instead of 5.4.1 and same result.

                              Comment

                              Related Topics

                              Collapse

                              Working...