Does anyone know how to implemented the linked to plug in for PHP5 on Swift V3?
Using the Verbose Sending plugin Swift 3
Moderators: Chris Corbyn, General Moderators
- RobertGonzalez
- Site Administrator
- Posts: 14293
- Joined: Tue Sep 09, 2003 6:04 pm
- Location: Fremont, CA, USA
Using the Verbose Sending plugin Swift 3
Everah | Split from viewtopic.php?p=355652#355652
Last edited by RobertGonzalez on Sun Mar 18, 2007 9:16 am, edited 2 times in total.
- Chris Corbyn
- Breakbeat Nuttzer
- Posts: 13098
- Joined: Wed Mar 24, 2004 7:57 am
- Location: Melbourne, Australia
You don't really need it, just don't use batchSend(). If you use a loop you can get the return value from each send anyway. However, if you want to write a plugin it should be a lot more logical than it was with the old API.
I started but I'm too drunk to code sorry... I was actually just about to fall into bed when I spotted your post
I'll finish this tomorrow, but if you were feeling enthusiastic here's the head-start
I started but I'm too drunk to code sorry... I was actually just about to fall into bed when I spotted your post
I'll finish this tomorrow, but if you were feeling enthusiastic here's the head-start
Code: Select all
class Swift_Plugin_VerboseSending implements Swift_Events_SendListener
{
public function sendPerformed(Swift_Events_SendEvent $e)
{
$num_sent = $e->getNumSent();
$recipients = $e->getRecipients();
//Bleh... too drunk... my eyes have gone all fuzzy...
}
}- RobertGonzalez
- Site Administrator
- Posts: 14293
- Joined: Tue Sep 09, 2003 6:04 pm
- Location: Fremont, CA, USA
I should have posted back... I went with a foreach (it was only 30 mails) and it worked fine. I actually ported some of that echo code into the foreach loop and it had the same effect.
Thanks for the post though d11. I may look at writing that plug in just do I can familiarize myself with the process.
Thanks for the post though d11. I may look at writing that plug in just do I can familiarize myself with the process.
- Chris Corbyn
- Breakbeat Nuttzer
- Posts: 13098
- Joined: Wed Mar 24, 2004 7:57 am
- Location: Melbourne, Australia
I'm actually modifying what goes in SendEvent now... I'm adding getFailedRecipients() to the event because it's useful to have easy access to. The version you have will require a bit of a workaround to identify who the failures are in a list.Everah wrote:I should have posted back... I went with a foreach (it was only 30 mails) and it worked fine. I actually ported some of that echo code into the foreach loop and it had the same effect.
Thanks for the post though d11. I may look at writing that plug in just do I can familiarize myself with the process.
- RobertGonzalez
- Site Administrator
- Posts: 14293
- Joined: Tue Sep 09, 2003 6:04 pm
- Location: Fremont, CA, USA
- Chris Corbyn
- Breakbeat Nuttzer
- Posts: 13098
- Joined: Wed Mar 24, 2004 7:57 am
- Location: Melbourne, Australia
- Chris Corbyn
- Breakbeat Nuttzer
- Posts: 13098
- Joined: Wed Mar 24, 2004 7:57 am
- Location: Melbourne, Australia
- Chris Corbyn
- Breakbeat Nuttzer
- Posts: 13098
- Joined: Wed Mar 24, 2004 7:57 am
- Location: Melbourne, Australia