Page 1 of 1

Using the Verbose Sending plugin Swift 3

Posted: Fri Mar 16, 2007 2:39 pm
by RobertGonzalez
Everah | Split from viewtopic.php?p=355652#355652
d11wtq wrote:Try the plugin in this thread: viewtopic.php?p=301240#301240

:)
Does anyone know how to implemented the linked to plug in for PHP5 on Swift V3?

Posted: Fri Mar 16, 2007 5:56 pm
by Chris Corbyn
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 8O

I'll finish this tomorrow, but if you were feeling enthusiastic here's the head-start :P

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...
	}
}

Posted: Fri Mar 16, 2007 7:00 pm
by RobertGonzalez
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.

Posted: Sat Mar 17, 2007 7:29 am
by Chris Corbyn
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.
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.

Posted: Sat Mar 17, 2007 8:51 am
by RobertGonzalez
Cool. Do you plan on making that plugin part of the core package?

Posted: Sun Mar 18, 2007 6:49 am
by Chris Corbyn
I'll make as many plugins as I can if people fnd them useful :)

The next ones that will appear are throttlers and message customization plugins.

Posted: Tue Mar 20, 2007 4:09 pm
by Chris Corbyn
This now in subversion and the View has been abstracted so you can change the way it's displayed.

Posted: Wed Mar 21, 2007 4:39 pm
by Chris Corbyn