Comments (11)
@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.
Bro, Thanks for Reply, where add this code ?
from mailwizz-php-sdk.
@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):
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.
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.
"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.
@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.
@twisted1919: I am busy testing the new endpoint and perhaps I am doing something wrong:
- 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']);
}
}
from mailwizz-php-sdk.
@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.
Doh - I am clearly not Captain Obvious right now :-(
I will drop you a Skype - still have your details...
from mailwizz-php-sdk.
Really Nice! , I am looking for Solution , Thanks both @magicdude4eva @twisted1919
from mailwizz-php-sdk.
Thanks - works as expected.
from mailwizz-php-sdk.
Related Issues (20)
- what is URL Hash in tracking campaign ? HOT 3
- API Adds Email Multiple Times Duplicated HOT 6
- where to copy examples files HOT 1
- How to get a campaign's opens/bounces/unsubscribes via API? HOT 1
- How to test it
- Installation HOT 9
- Delete list forbidden HOT 3
- This email address is blacklisted HOT 2
- Changing Class names to customers needs HOT 13
- Add to email blacklist? HOT 1
- API Issue
- Rest API Call Issue HOT 1
- PHP 7.4 warnings
- PHP 7.4 issues HOT 2
- Signature issue HOT 1
- Create API for list segments(Endpoint - MailWizzApi_Endpoint_ListSegments )
- PHP 8.0+ curl_init issue HOT 1
- Reconfirm someone that unsubscribed HOT 1
- Support PHP 7.4+ HOT 1
- request timeout HOT 2
Recommend Projects
-
React
A declarative, efficient, and flexible JavaScript library for building user interfaces.
-
Vue.js
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
-
Typescript
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
-
TensorFlow
An Open Source Machine Learning Framework for Everyone
-
Django
The Web framework for perfectionists with deadlines.
-
Laravel
A PHP framework for web artisans
-
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.
-
Visualization
Some thing interesting about visualization, use data art
-
Game
Some thing interesting about game, make everyone happy.
Recommend Org
-
Facebook
We are working to build community through open source technology. NB: members must have two-factor auth.
-
Microsoft
Open source projects and samples from Microsoft.
-
Google
Google ❤️ Open Source for everyone.
-
Alibaba
Alibaba Open Source for everyone
-
D3
Data-Driven Documents codes.
-
Tencent
China tencent open source team.
from mailwizz-php-sdk.