GithubHelp home page GithubHelp logo

Comments (11)

twisted1919 avatar twisted1919 commented on July 26, 2024

@magicdude4eva - there's no such option right now, but we can add one for the subscribers endpoint, something like:

$endpoint->campaignBounce('subscriber-uid', 'campaign-uid', 'bounce-type', 'bounce-reason');

If the bounce is hard, the subscriber is also blacklisted.

Would that help ?

from mailwizz-php-sdk.

masharif46 avatar masharif46 commented on July 26, 2024

Bro, Thanks for Reply, where add this code ?

from mailwizz-php-sdk.

magicdude4eva avatar magicdude4eva commented on July 26, 2024

@twisted1919 this will help if a Port25 user adds an extra field to the delivery-server so that Port25 can keep track of the jobid (which in this case would be the campaign uid):
image

In this case, Port25 would then log the campaign-UID in the logs which I would be able to pick up and then call the campaignBounce endpoint (notice the "mailwizz-ll646mkjmbbe1" towards the end of the bounce line):
b,2017-08-22 10:45:32+0200,2017-08-22 10:45:28+0200,campaign.bounce@DOMAIN,[email protected],rfc822;[email protected],failed,5.0.0 (undefined status),smtp;550 relay not permitted,mail.icloud.co.za (41.203.18.177),relaying-issues,smtp,hermes.bidorbuy.co.za (10.0.0.83),smtp,196.11.31.239,41.203.18.177,"PIPELINING,8BITMIME,SIZE,ETRN,AUTH,STARTTLS,AUTH:PLAIN,AUTH:LOGIN",,vmta-bobe-promo-za01,mailwizz-ll646mkjmbbe1,,icloud.co.za/vmta-bobe-promo-za01,bobe-promo-za,,,,,,,,,,,,,
I would need some guideance on the choice of "bounce-type" (I could translate the Port25 ones into your ones - i.e. "relaying-issues" to whatever your equivalent is) and I would assume that "bounce-reason" is the full Port25 reason (in the above example it is "smtp;550 relay not permitted,mail.icloud.co.za (41.203.18.177)"

from mailwizz-php-sdk.

twisted1919 avatar twisted1919 commented on July 26, 2024

this will help if a Port25 user adds an extra field to the delivery-server so that Port25 can keep track of the jobid (which in this case would be the campaign uid):

Ok, that's something you can instruct people to do in the usage examples, right? And i believe the tags are parsed in the header value so i don't have to do anything here.

Bounce types are: hard, soft and internal.
Hard bounces are the ones where the domain doesn't exist anymore, the user account has been suspended, etc.
Soft bounces are only the one when users have autoresponders which auto-respond to our emails, like when they are in vacation.
Internal bounces are the ones that happen because of us, like when our own smtp server cannot delivery the email because of any reason, like because it is listed in a BL and the remote server does not accept messages from it.

Makes sense ?

from mailwizz-php-sdk.

twisted1919 avatar twisted1919 commented on July 26, 2024

"bounce-reason" is the full Port25 reason (in the above example it is "smtp;550 relay not permitted,mail.icloud.co.za (41.203.18.177)"

This is correct yes.

from mailwizz-php-sdk.

magicdude4eva avatar magicdude4eva commented on July 26, 2024

@twisted1919 all of the above I can do. I will prep my changes in the meantime. Should not be too difficult and I can then test it with our campaigns once your new endpoint is up.

from mailwizz-php-sdk.

magicdude4eva avatar magicdude4eva commented on July 26, 2024

@twisted1919: I am busy testing the new endpoint and perhaps I am doing something wrong:

  1. The bounce-handler fires, but calling the campaign-bounce-create causes a "Not found":
[23/Aug/2017 13:22:01] Bounce: bad-domain [email protected] via vmta-bobe-promo-za01/[email protected] jobId=mailwizz-xb040mold9ba3, dsnStatus=5.1.2 (bad destination system: no such domain)
[23/Aug/2017 13:22:01]    MailWizz: unsubscribe for [email protected]:
[23/Aug/2017 13:22:01]    - skipped: TEST JONI
[23/Aug/2017 13:22:01]    - TEST: Bounce-update for campaign=xb040mold9ba3, subscriberUID=zt462bqbl8dbc, bouncetype=hard, bouncereason=5.1.2 (bad destination system: no such domain)
[23/Aug/2017 13:22:01]    - Bounce-update for campaign-xb040mold9ba3 failed with status=Not Found
[23/Aug/2017 13:22:01]    - success: TEST-GERD
[23/Aug/2017 13:22:01]    - TEST: Bounce-update for campaign=xb040mold9ba3, subscriberUID=zm283aop2ad96, bouncetype=hard, bouncereason=5.1.2 (bad destination system: no such domain)
[23/Aug/2017 13:22:01]    - Bounce-update for campaign-xb040mold9ba3 failed with status=Not Found

My code:

...
  // now inject the configuration and we are ready to make api calls
  MailWizzApi_Base::setConfig($config);

  // Configure subscriber-end point
  $MailWizzSubscriberEndPoint = new MailWizzApi_Endpoint_ListSubscribers();

  // Configure bounce-end pointer
  $MailWizzCampaignBounceEndPoint = new MailWizzApi_Endpoint_CampaignBounces();

...

      if (!is_null($Mailwizz_CampaignUID) && !empty($Mailwizz_CampaignUID)) {
        // Call the campaign-bounce endpoint
        $log->lwrite('   - TEST: Bounce-update for campaign=' . $Mailwizz_CampaignUID . ', subscriberUID=' . $subscription['subscriber_uid'] .
          ', bouncetype=' . $Mailwizz_bounceType . ', bouncereason=' . $Mailwizz_bounceReason);

        $bounceresponse = $MailWizzCampaignBounceEndPoint->create($Mailwizz_CampaignUID, array(
          'message'        => $Mailwizz_bounceReason,         // max 250 chars
          'bounce_type'    => $Mailwizz_bounceType,           // hard, soft or internal
          'subscriber_uid' => $subscription['subscriber_uid'] // 13 chars unique subscriber identifier
        ));

        if ($bounceresponse->body['status'] == "success") {
          $log->lwrite('   - Bounce-update for campaign-' . $Mailwizz_CampaignUID . '=' . $bounceresponse->body['status']);
        } else if ($bounceresponse->body['status'] != "success") {
          $log->lwrite('   - Bounce-update for campaign-' . $Mailwizz_CampaignUID . ' failed with status=' . $bounceresponse->body['error']);
        }
      }

The campaign exists:
image

and so does the subscriber:
image

from mailwizz-php-sdk.

twisted1919 avatar twisted1919 commented on July 26, 2024

@magicdude4eva - That's expected since the code for that endpoint does not exist in your app.
You can PM me so that i provide it for you if you really need it now ;)

from mailwizz-php-sdk.

magicdude4eva avatar magicdude4eva commented on July 26, 2024

Doh - I am clearly not Captain Obvious right now :-(

I will drop you a Skype - still have your details...

from mailwizz-php-sdk.

masharif46 avatar masharif46 commented on July 26, 2024

Really Nice! , I am looking for Solution , Thanks both @magicdude4eva @twisted1919

from mailwizz-php-sdk.

magicdude4eva avatar magicdude4eva commented on July 26, 2024

Thanks - works as expected.

from mailwizz-php-sdk.

Related Issues (20)

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.