Resource icon

[bd] Mails 1.1.0

No permission to download
Sending mass user emails from ACP ( /admin.php?users/email ), with Mandrill sending active, does the integrated bounce handling still work?
It should keep working.

I didn't test this mod, but on XF 1.4 I can use mandrill with smtp credential and is working fine. I did a check on outgoing mail and received a 10 score on http://www.mail-tester.com/
I also set a bounce email address and is working. The users with invalid email are set to "invalid (bounced email).

What I don't understand what is the advantage of using this addon on XF 1.4? Thank you in advance
It's just easier to setup. Also, some server has limitation on stmp connection.

@xfrocks Bug. Appears the bounce handling is this scenario is not working. For the email addresses that bounce, the user account is not being set to 'Email invalid (bounced)' for user state.
Have you waited for awhile? The bounce is not processed immediately.
 
Have you waited for awhile? The bounce is not processed immediately.
How long? It was just over an hour after receiving the bounce notification that I checked the account in XF and it still had a valid user state.
 
Was it a hard or soft bounce?
47 hard, 2 soft. For example;
Hello, this is the mail server on mail128-13.atl41.mandrillapp.com.

I am sending you this message to inform you on the delivery status of a
message you previously sent. Immediately below you will find a list of
the affected recipients; also attached is a Delivery Status Notification
(DSN) report in standard format, as well as the headers of the original
message. <strife@<redacted>.net> delivery failed; will not continue trying

Final-Recipient: rfc822;strife@<redacted>.net
Action: failed
Status: 5.4.4 (unable to route: no mail hosts for domain)
X-PowerMTA-BounceCategory: routing-errors
and
Hello, this is the mail server on mail128-137.atl41.mandrillapp.com.

I am sending you this message to inform you on the delivery status of a
message you previously sent. Immediately below you will find a list of
the affected recipients; also attached is a Delivery Status Notification
(DSN) report in standard format, as well as the headers of the original
message. <wdy@<redacted>.net> delivery failed; will not continue trying

Final-Recipient: rfc822;wdy@<redacted>.net
Action: failed
Status: 5.0.0 (undefined status)
Diagnostic-Code: smtp;550 account expired
X-PowerMTA-BounceCategory: inactive-mailbox
 
@xfrocks - recently (last 2 sends of my monthly newsletter) I have noticed that when using [BD] mail and the mandrill system - (I send over 6000 emails out to users monthly) it "times out" and only ends up sending half of the emails. Same internet connection and host. Any thoughts?
 
starting to bug me:

Code:
XenForo_Exception: [bd] Mails: Sending mail failed, log is available at forums/internal_data/bdmails_1423592642_59874de44c732bfb970e952c88f0480d.log - library/bdMails/Transport/Abstract.php:75
Generated By: Unknown Account, A moment ago
Stack Trace
#0  /forums/library/bdMails/Transport/Abstract.php(61): bdMails_Transport_Abstract->_bdMails_log(Array, '[{"email":"poul...', false, Array)
#1  /forums/library/Zend/Mail/Transport/Abstract.php(348): bdMails_Transport_Abstract->_sendMail()
#2  /forums/library/Zend/Mail.php(1194): Zend_Mail_Transport_Abstract->send(Object(Zend_Mail))
#3  /forums/library/XenForo/Model/MailQueue.php(79): Zend_Mail->send(Object(bdMails_Transport_Mandrill))
#4  /forums/library/XenForo/Deferred/MailQueue.php(10): XenForo_Model_MailQueue->runMailQueue(7.99999904633)
#5  /forums/library/XenForo/Model/Deferred.php(294): XenForo_Deferred_MailQueue->execute(Array, Array, 7.99999904633, '')
#6  /forums/library/XenForo/Model/Deferred.php(428): XenForo_Model_Deferred->runDeferred(Array, 7.99999904633, '', false)
#7  /forums/library/XenForo/Model/Deferred.php(373): XenForo_Model_Deferred->_runInternal(Array, NULL, '', false)
#8  /forums/deferred.php(23): XenForo_Model_Deferred->run(false)
#9 {main}
Request State
array(3) {
  ["url"] => string(44) "http://portalcentric.net/forums/deferred.php"
  ["_GET"] => array(0) {
  }
  ["_POST"] => array(4) {
    ["_xfRequestUri"] => string(76) "/forums/threads/custom-ps4-wallpaper-functionality-reportedly-incoming.9291/"
    ["_xfNoRedirect"] => string(1) "1"
    ["_xfToken"] => string(8) "********"
    ["_xfResponseType"] => string(4) "json"
  }
}
 
@xfrocks - recently (last 2 sends of my monthly newsletter) I have noticed that when using [BD] mail and the mandrill system - (I send over 6000 emails out to users monthly) it "times out" and only ends up sending half of the emails. Same internet connection and host. Any thoughts?
I recently sent out 5,300 emails in one hit via ACP mass email, and didn't have any problems.
 
starting to bug me:

Code:
XenForo_Exception: [bd] Mails: Sending mail failed, log is available at forums/internal_data/bdmails_1423592642_59874de44c732bfb970e952c88f0480d.log -
What does your "forums/internal_data/bdmails_1423592642_59874de44c732bfb970e952c88f0480d.log" file contain?
 
What does your "forums/internal_data/bdmails_1423592642_59874de44c732bfb970e952c88f0480d.log" file contain?

this:

Code:
array (
  0 =>
  array (
    'to' =>
    array (
      0 =>
      array (
        'email' => 'poulou@hotmail.com',
      ),
    ),
    'headers' =>
    array (
      'X-To-Validate' => '1e854ad2+poulou@hotmail.com',
      'Message-Id' => '<8f40381225d9036696cb889d0fd01ab18360a2ba@portalcentric.net>',
    ),
    'from_email' => 'XxUnkn0wnxX@portalcentric.net',
    'from_name' => 'PortalCentric',
    'subject' => 'PortalCentric wrote a message on your profile',
    'text' => 'J-M, PortalCentric wrote a message on your profile at Portal Centric:

----------------------------------------------------------------------

To view this message, click here:
http://portalcentric.net/forums/profile-posts/10564/

To see all your profile messages, click here:
http://portalcentric.net/forums/members/j-m.19351/

----------------------------------------------------------------------

This message was sent to you from Portal Centric because your preferences are set to an receive email when a new profile message is received.

To stop receiving email alerts, please edit your preferences:
http://portalcentric.net/forums/account/alert-preferences

http://portalcentric.net/forums/',
    'html' => '<html lang="en-US" dir="LTR">
<head>
    <meta charset="UTF-8" />
    <base href="http://portalcentric.net/forums/" />
    <title>PortalCentric wrote a message on your profile</title>
</head>
<body dir="LTR" text="#141414" bgcolor="#F0F0F0" link="#176093" alink="#176093" vlink="#176093" style="padding: 10px">

    <table cellpadding="0" cellspacing="0" border="0" dir="LTR" style="
        background-color: #F0F7FC;
        border: 1px solid #A5CAE4;
        border-radius: 5px;
        direction: LTR;">
    <tr>
        <td style="
            background-color: #D7EDFC;
            padding: 5px 10px;
            border-bottom: 1px solid #A5CAE4;
            border-top-left-radius: 4px;
            border-top-right-radius: 4px;
            font-family: \'Trebuchet MS\', Helvetica, Arial, sans-serif;
            font-size: 11px;
            line-height: 1.231;">
            <a href="http://portalcentric.net/forums/" style="color: #176093; text-decoration:none">Portal Centric</a>
        </td>
    </tr>
    <tr>
        <td style="
            background-color: #FCFCFF;
            padding: 1em;
            color: #141414;
            font-family: \'Trebuchet MS\', Helvetica, Arial, sans-serif;
            font-size: 13px;
            line-height: 1.231;">
            <p style="margin-top: 0">J-M,</br>
<p><a href="http://portalcentric.net/forums/members/portalcentric.1646/" style="color: #176093; text-decoration: none">PortalCentric</a> posted a message on your profile at <a href="http://portalcentric.net/forums/" style="color: #176093; text-decoration: none">Portal Centric</a>.</p></p>

<a href="http://portalcentric.net/forums/profile-posts/10564/" style="color: #141414; text-decoration: none"><span style="color: #176093; font-size: 10px; text-decoration: underline">http://portalcentric.net/forums/profile-posts/10564/</span><br /></a>

<table cellpadding="10" cellspacing="0" border="0" width="100%" style="margin: 20px 0; background-color: #f0f7fc; border-top: 1px solid #d7edfc">
<tr>
    <td>
        <a href="http://portalcentric.net/forums/profile-posts/10564/" style="
            display: block;
            float: left;
            padding: 5px 10px;
            background-color: #65a5d1;
            border: none;
            border-radius: 3px;
            font-family: \'Trebuchet MS\', Helvetica, Arial, sans-serif;
            font-size: 11px;
            color: white;
            text-decoration: none">View this Message</a>
    </td>
    <td align="right">
        <a href="http://portalcentric.net/forums/members/j-m.19351/" style="
            display: block;
            padding: 5px 0;
            font-family: \'Trebuchet MS\', Helvetica, Arial, sans-serif;
            font-size: 11px;
            color: #176093;
            text-decoration: none">View all Your Profile Messages</a>
    </td>
</tr>
</table>

<p style="font-size: 11px; color: #969696">This message was sent to you from <a href="http://portalcentric.net/forums/" style="color: #969696">Portal Centric</a> because your preferences are set to receive email alerts when someone comments on your profile or status.</p>

<p style="font-size: 11px; color: #969696">To stop receiving email, please <a href="http://portalcentric.net/forums/account/alert-preferences" style="color: #969696">edit your email preferences</a>.</p>
        </td>
    </tr>
    <tr>
        <td style="
            background-color: #F0F7FC;
            padding: 5px 10px;
            border-top: 1px solid #D7EDFC;
            border-bottom-left-radius: 4px;
            border-bottom-right-radius: 4px;
            text-align: right;
            font-family: \'Trebuchet MS\', Helvetica, Arial, sans-serif;
            font-size: 11px;
            line-height: 1.231;">
            <a href="http://portalcentric.net/forums/" style="color: #176093; text-decoration: none">http://portalcentric.net/forums/</a>
        </td>
    </tr>
    </table>  

</body>
</html>',
  ),
  1 => '[{"email":"poulou@hotmail.com","status":"rejected","_id":"6f8d7666f81a4f44b3154af79c021bae","reject_reason":"hard-bounce"}]',
  2 => false,
  3 =>
  array (
    'microtime' => 0.2682819366455078125,
  ),
)

and if this is a bouncing issues.. i don't believe i have one set up... as i use mandril for all my SMTP outgoing mail but i cannot configure incoming mail as it says i only can have there MX entries within my DNS but i have a different mail server for my incoming mail... configured in DNS...
 
47 hard, 2 soft. For example;

and
Are their user stated updated by now? They should be.

No bouncer detection for Mailgun yet? :(
https://documentation.mailgun.com/user_manual.html#tracking-bounces

Would be just great :love:
Yeah, not yet. As everyone here seem to agree Maindrill is better...

this:

Code:
array (
  0 =>
  array (
    'to' =>
    array (
      0 =>
      array (
        'email' => 'poulou@hotmail.com',
      ),
    ),
    'headers' =>
    array (
      'X-To-Validate' => '1e854ad2+poulou@hotmail.com',
      'Message-Id' => '<8f40381225d9036696cb889d0fd01ab18360a2ba@portalcentric.net>',
    ),
    'from_email' => 'XxUnkn0wnxX@portalcentric.net',
    'from_name' => 'PortalCentric',
    'subject' => 'PortalCentric wrote a message on your profile',
    'text' => 'J-M, PortalCentric wrote a message on your profile at Portal Centric:

----------------------------------------------------------------------

To view this message, click here:
http://portalcentric.net/forums/profile-posts/10564/

To see all your profile messages, click here:
http://portalcentric.net/forums/members/j-m.19351/

----------------------------------------------------------------------

This message was sent to you from Portal Centric because your preferences are set to an receive email when a new profile message is received.

To stop receiving email alerts, please edit your preferences:
http://portalcentric.net/forums/account/alert-preferences

http://portalcentric.net/forums/',
    'html' => '<html lang="en-US" dir="LTR">
<head>
    <meta charset="UTF-8" />
    <base href="http://portalcentric.net/forums/" />
    <title>PortalCentric wrote a message on your profile</title>
</head>
<body dir="LTR" text="#141414" bgcolor="#F0F0F0" link="#176093" alink="#176093" vlink="#176093" style="padding: 10px">

    <table cellpadding="0" cellspacing="0" border="0" dir="LTR" style="
        background-color: #F0F7FC;
        border: 1px solid #A5CAE4;
        border-radius: 5px;
        direction: LTR;">
    <tr>
        <td style="
            background-color: #D7EDFC;
            padding: 5px 10px;
            border-bottom: 1px solid #A5CAE4;
            border-top-left-radius: 4px;
            border-top-right-radius: 4px;
            font-family: \'Trebuchet MS\', Helvetica, Arial, sans-serif;
            font-size: 11px;
            line-height: 1.231;">
            <a href="http://portalcentric.net/forums/" style="color: #176093; text-decoration:none">Portal Centric</a>
        </td>
    </tr>
    <tr>
        <td style="
            background-color: #FCFCFF;
            padding: 1em;
            color: #141414;
            font-family: \'Trebuchet MS\', Helvetica, Arial, sans-serif;
            font-size: 13px;
            line-height: 1.231;">
            <p style="margin-top: 0">J-M,</br>
<p><a href="http://portalcentric.net/forums/members/portalcentric.1646/" style="color: #176093; text-decoration: none">PortalCentric</a> posted a message on your profile at <a href="http://portalcentric.net/forums/" style="color: #176093; text-decoration: none">Portal Centric</a>.</p></p>

<a href="http://portalcentric.net/forums/profile-posts/10564/" style="color: #141414; text-decoration: none"><span style="color: #176093; font-size: 10px; text-decoration: underline">http://portalcentric.net/forums/profile-posts/10564/</span><br /></a>

<table cellpadding="10" cellspacing="0" border="0" width="100%" style="margin: 20px 0; background-color: #f0f7fc; border-top: 1px solid #d7edfc">
<tr>
    <td>
        <a href="http://portalcentric.net/forums/profile-posts/10564/" style="
            display: block;
            float: left;
            padding: 5px 10px;
            background-color: #65a5d1;
            border: none;
            border-radius: 3px;
            font-family: \'Trebuchet MS\', Helvetica, Arial, sans-serif;
            font-size: 11px;
            color: white;
            text-decoration: none">View this Message</a>
    </td>
    <td align="right">
        <a href="http://portalcentric.net/forums/members/j-m.19351/" style="
            display: block;
            padding: 5px 0;
            font-family: \'Trebuchet MS\', Helvetica, Arial, sans-serif;
            font-size: 11px;
            color: #176093;
            text-decoration: none">View all Your Profile Messages</a>
    </td>
</tr>
</table>

<p style="font-size: 11px; color: #969696">This message was sent to you from <a href="http://portalcentric.net/forums/" style="color: #969696">Portal Centric</a> because your preferences are set to receive email alerts when someone comments on your profile or status.</p>

<p style="font-size: 11px; color: #969696">To stop receiving email, please <a href="http://portalcentric.net/forums/account/alert-preferences" style="color: #969696">edit your email preferences</a>.</p>
        </td>
    </tr>
    <tr>
        <td style="
            background-color: #F0F7FC;
            padding: 5px 10px;
            border-top: 1px solid #D7EDFC;
            border-bottom-left-radius: 4px;
            border-bottom-right-radius: 4px;
            text-align: right;
            font-family: \'Trebuchet MS\', Helvetica, Arial, sans-serif;
            font-size: 11px;
            line-height: 1.231;">
            <a href="http://portalcentric.net/forums/" style="color: #176093; text-decoration: none">http://portalcentric.net/forums/</a>
        </td>
    </tr>
    </table> 

</body>
</html>',
  ),
  1 => '[{"email":"poulou@hotmail.com","status":"rejected","_id":"6f8d7666f81a4f44b3154af79c021bae","reject_reason":"hard-bounce"}]',
  2 => false,
  3 =>
  array (
    'microtime' => 0.2682819366455078125,
  ),
)

and if this is a bouncing issues.. i don't believe i have one set up... as i use mandril for all my SMTP outgoing mail but i cannot configure incoming mail as it says i only can have there MX entries within my DNS but i have a different mail server for my incoming mail... configured in DNS...
Maindrill handles that by itself so you don't need to set it up.
 
so why am i getting such errors in my log then? are they related?
You have it in your log because Mandrill refused to send email to that address (and the reason is bounced). And because Mandrill refused, the add-on logged it back for your information.
 
@xfrocks

In addition to the question above, I have one more :D

I've run into this a couple times now. A user actually has a valid email address, but they're 'trapped' in the bounced group, usually due to a temporary hard bounce from the ISP. They can't verify their (valid) email address, since it says the address does not need to be verified (it's not awaiting verification). The workaround is for them to go in and change it, then change it back to the one which bounced originally.

I started to write a thread about fixing this, for my members, but it seems there could be a cleaner/easier/more professional way to do this.

Any thoughts?

Use you contact us form, and send an email requesting their email status be updated.

This really isn't a good option. There's no way to notify the user that they need to contact us, and it's been happening more and more on my large forum. For every user who contacts me about it, I bet five more just give up.

Here's the most common scenario:

1. User marks one of our emails as spam or junk mail, unknowing that it'll change their user status on the site (though it says it in every email).
2. User is added to the Mandrill blacklist, and set to Invalid Email (Bounced).
3. User visits the site like normal, but receives the notice that delivery attempts have failed to the email address on file, and that they need to update and verify their email.
4. User wants to use his current email address. Goes to verify the address, and it doesn't send a verification email because a) he's not in the Awaiting Confirmation user state and b) the address is on the Mandrill blacklist.

As I type this out I'm seeing the technical limitations, and I'm not sure this add-on could modify the Mandrill blacklist.

@xfrocks would it be possible for you to add an additional user state for Spam-related rejections, so we could display a different notification to those users than the ones who simply have old/deleted email addresses on file?

I'd gladly donate for this. Thanks again for all you do here :)
 
ok i have been getting a few of these daily and its the smae/simular error with google No Captcha anything to do with the connection SSL really...

Code:
Zend_Http_Client_Adapter_Exception: Email to cwylie462@gmail.com failed: Unable to Connect to ssl://mandrillapp.com:443. Error #0: php_network_getaddresses: getaddrinfo failed: Temporary failure in name resolution - library/Zend/Http/Client/Adapter/Socket.php:235
Generated By: Unknown Account, 7 minutes ago
Stack Trace
#0 /home/unkn0wn/public_html/forums/library/Zend/Http/Client.php(973): Zend_Http_Client_Adapter_Socket->connect('mandrillapp.com', 443, true)
#1 /home/unkn0wn/public_html/forums/library/bdMails/Transport/Mandrill.php(177): Zend_Http_Client->request('POST')
#2 /home/unkn0wn/public_html/forums/library/bdMails/Transport/Abstract.php(57): bdMails_Transport_Mandrill->_bdMails_sendMail()
#3 /home/unkn0wn/public_html/forums/library/Zend/Mail/Transport/Abstract.php(348): bdMails_Transport_Abstract->_sendMail()
#4 /home/unkn0wn/public_html/forums/library/Zend/Mail.php(1194): Zend_Mail_Transport_Abstract->send(Object(Zend_Mail))
#5 /home/unkn0wn/public_html/forums/library/XenForo/Model/MailQueue.php(79): Zend_Mail->send(Object(bdMails_Transport_Mandrill))
#6 /home/unkn0wn/public_html/forums/library/XenForo/Deferred/MailQueue.php(10): XenForo_Model_MailQueue->runMailQueue(7.99999809265)
#7 /home/unkn0wn/public_html/forums/library/XenForo/Model/Deferred.php(294): XenForo_Deferred_MailQueue->execute(Array, Array, 7.99999809265, '')
#8 /home/unkn0wn/public_html/forums/library/XenForo/Model/Deferred.php(428): XenForo_Model_Deferred->runDeferred(Array, 7.99999809265, '', false)
#9 /home/unkn0wn/public_html/forums/library/XenForo/Model/Deferred.php(373): XenForo_Model_Deferred->_runInternal(Array, NULL, '', false)
#10 /home/unkn0wn/public_html/forums/deferred.php(23): XenForo_Model_Deferred->run(false)
#11 {main}
Request State
array(3) {
  ["url"] => string(44) "http://portalcentric.net/forums/deferred.php"
  ["_GET"] => array(0) {
  }
  ["_POST"] => array(4) {
    ["_xfRequestUri"] => string(8) "/forums/"
    ["_xfNoRedirect"] => string(1) "1"
    ["_xfToken"] => string(8) "********"
    ["_xfResponseType"] => string(4) "json"
  }
}

as for my server resolvers i am using OpenDNS but i never had issues with em and still don't...

and when i try to resolve this from home coz i my self use OpenDNS i get this:

** server can't find ssl://mandrillapp.com:443: REFUSED

Edit: i did read the previous posts on this but i still can't see how i can fix this...

and i did try to configure the server with OVH Resolvers but when i asked them about the resolvers i should use they didn't give be a straight answer:

they said i had to set up a a Secondary DNS under their control panel first and i looked confusing had no idea what to do from there..
so i used Public DNS Resolvers
 
Last edited:
Would you consider making it an option that users can be added to another usergroup if their e-mail bounces, rather than using the invalid status? That way we can customise what happens to bounced users via the promotions/permissions system :).
 
Really, really enjoying the convenience of this addon. Thanks for all your hard work on it!

However, been having some issues with this addon not picking up bounces from Mandrill. I manually ran the bounce processing cron and it still wasn't picking it up.

Four bouncing emails didn't get picked up last night:
- three of them had bounced previously and weren't picked by this addon for some reason, but Mandrill immediately rejected them because they were on the rejection blacklist.
- one of them had bounced previously, the user fixed the issue and got it working again, so I manually marked the user as valid in Xenforo and removed it from Mandrill's blacklist. Things were fine for a little while, and then last night it started bouncing again with a Hard Bounce message. Mandrill lists the address in bouncing, but BD Mails isn't picking up the bounce. I manually ran the BD Mails bounce processing cron job and it still didn't pick it up.

Originally I wondered if this was an issue with how BD Mails keeps track of bounced emails, but I checked the code and it looks like this addon is just running a for-loop through all the rejected emails that come back from Mandrill and then marking them as bounced in Xenforo. I'm not clear why these emails aren't being picked up and marked as bounced... originally I thought maybe "Rejected" emails were ignored if they weren't explicitly a hard bounce, but reading the code it looks like all rejected emails are marked as bounces. I read PHP at a third-grade level, so maybe I'm misunderstanding, but that's what looks like is happening in Bounce.php + Mandrill.php.

If you need help debugging, I can probably pull the API results--my hunch is something in the JSON is structured slightly different than the format expected by this addon.
 
It would be great if we could choose what to do with soft-bounced e-mails, for example the XF bounce system will reclassify enough soft bounces in a certain period as a hard bounce. I'd really like to be able to replicate that setup in [BD] Mails.
 
Is it normal that bounced emails distract the users from the overal counting.
It's like they are no longer members. 100 users desepeared from my forum. All bounced emails.
 
Back
Top Bottom