PopB4Smtp v4 vs V3.3

Swift Mailer is a fantastic library for sending email with php. Discuss this library or ask any questions about it here.

Moderators: Chris Corbyn, General Moderators

Post Reply
arena
Forum Newbie
Posts: 11
Joined: Tue Jun 05, 2007 5:36 am

PopB4Smtp v4 vs V3.3

Post by arena »

Hello (again) !

as far as i understand,

in v3.3
PopB4Smtp was linked to the transport instance

in V4
PopB4Smtp is linked to the swift instance !

shouldn't it be more obvious to still link it to the transport instance as it is a pure smtp feature ?

another question, in 3.x documentation, the 'throwed' exceptions were well documented. Where can i find the same level of information on v4 ?
User avatar
Chris Corbyn
Breakbeat Nuttzer
Posts: 13098
Joined: Wed Mar 24, 2004 7:57 am
Location: Melbourne, Australia

Re: PopB4Smtp v4 vs V3.3

Post by Chris Corbyn »

arena wrote:as far as i understand,

in v3.3
PopB4Smtp was linked to the transport instance

in V4
PopB4Smtp is linked to the swift instance !

shouldn't it be more obvious to still link it to the transport instance as it is a pure smtp feature ?
Pop Before SMTP is a really ad-hoc feature that has little to do with SMTP. I deliberated over this for a while before deciding a more generic "plugin" was a cleaner place to put something like this. You can associative the plugin with a specific SMTP transport however:

Code: Select all

$plugin->bindSmtp($yourSmtpTransport);
another question, in 3.x documentation, the 'throwed' exceptions were well documented. Where can i find the same level of information on v4 ?
Yes sorry, that's my bad, I'm getting there ;)

v4 tries to be more robust but these are what it throws:

Swift_SwiftException
All exceptions subclass this

Swift_RfcComplianceException
If the MIME content generated (or provided by yourself) is not compliant. e.g. an ill-formed email address passed to setTo() or setFrom().

Swift_IoException
You should never see these. This is if something has gone wrong in the encoder subsystem, such as failing to write to a file

Swift_TransportException
When something fails amidst a call to send() or batchSend().
Post Reply