Current development status of 4.0?

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

Leeoniya
Forum Newbie
Posts: 8
Joined: Wed Apr 16, 2008 2:19 am

Current development status of 4.0?

Post by Leeoniya »

Hello all,

I was looking through the Zen-Cart roadmap here: http://www.zen-cart.com/forum/showthread.php?t=75264
...and saw that SwiftMailer was slated to replace phpMailer in the next version (1.4):
"email infrastructure replaced with SwiftMailer instead of phpMailer which is faltering in light of contemporary server configurations"
will ver 4.0 be out soon enough for them to use the upcoming release? i'm guessing that if a decision on their part is made to continue PHP4 support, it will prevent them from using v4 regardless of when it's finished?

what's the current dev status?

regards,
Leon
User avatar
Chris Corbyn
Breakbeat Nuttzer
Posts: 13098
Joined: Wed Mar 24, 2004 7:57 am
Location: Melbourne, Australia

Re: Current development status of 4.0?

Post by Chris Corbyn »

Current dev status of the standard edition of the software itself is 95% complete. The missing bits are:

* Read-receipts
* FileEmbedder plugin
* Support for a few charsets (Shift-JIS, Big5)
* Version 3 compatibility wrappers

There's another edition of version 4 (enterprise) which will be available however. A more feature-rich business-oriented version which comes under a non-free license. That isn't so complete right now and until it's finished there wont be a non-beta standard edition out. The enterprise edition effectively builds on top of the standard edition so there's potential for significant changes even at this stage.

Because of the business side of this new version the website needs a complete rewrite. Most of the current site is static content. The new website needs a whole e-commerce module writing and integrating, along with a bug-tracker (can't use SF.net for licensing reasons) for the enterprise version (priority bugfixes) and a licensee download area. Actual written documentation is missing too. I'm also releasing an e-book.

Basically I have my work cut out.

I'm waiting on a designer to finish the website template re-design.

All that said, because the standard edition (the same featureset which v3 has, plus a bit more) is nearly done I'll be polling for beta testers soon. The beta will be run in two stages:

1) Roughly 100 volunteer beta testers will be provided with the beta software and a bug tracker to feedback to me
2) Once the private beta is over and any changes have been made, an official public beta will be released and made available for download on the website. Even if this is considered stable it will remain beta until all the stuff I mentioned above is ready.

I really wish I could do this full-time, but unfortunately I have to work 8 hours a day and cycle 1 hour each direction, eat my dinner and of course sleep! That leaves me a short amount of time to do any work on it, but I do chip away day by day :)

Of course, there's nothing stopping the curious from checking out from subversion. The stuff which is already there does work, you just wouldn't under any circumstances want to use it in production. It's also undocumented other than comments in the code, and the test coverage.

https://swiftmailer.svn.sourceforge.net ... simplified

EDIT | If ZenCart supports PHP4 they won't be able to use Swift Mailer v4 anyway ;) It's a PHP5-only release.
User avatar
Chris Corbyn
Breakbeat Nuttzer
Posts: 13098
Joined: Wed Mar 24, 2004 7:57 am
Location: Melbourne, Australia

Re: Current development status of 4.0?

Post by Chris Corbyn »

Do you mind if I sticky this post? I'd rather people know what's going on actually since it has been a good while since I started v4 and I'm quite happy to be upfront :)
Leeoniya
Forum Newbie
Posts: 8
Joined: Wed Apr 16, 2008 2:19 am

Re: Current development status of 4.0?

Post by Leeoniya »

thanks for the update.
Do you mind if I sticky this post?
mind it? i'd be disappointed if you didn't, lol

one more question before i stop badgering you. What features will the enterprise ver have over the standard and have you decided on the licensing scheme and/or actual costs?
User avatar
onion2k
Jedi Mod
Posts: 5263
Joined: Tue Dec 21, 2004 5:03 pm
Location: usrlab.com

Re: Current development status of 4.0?

Post by onion2k »

Leeoniya wrote:one more question before i stop badgering you. What features will the enterprise ver have over the standard and have you decided on the licensing scheme and/or actual costs?
That's 2 questions.

:P
Leeoniya
Forum Newbie
Posts: 8
Joined: Wed Apr 16, 2008 2:19 am

Re: Current development status of 4.0?

Post by Leeoniya »

...but i cleverly wrapped them into one, i was foolish to think that i could get away with such heresy. :oops:
User avatar
Chris Corbyn
Breakbeat Nuttzer
Posts: 13098
Joined: Wed Mar 24, 2004 7:57 am
Location: Melbourne, Australia

Re: Current development status of 4.0?

Post by Chris Corbyn »

Leeoniya wrote:thanks for the update.
Do you mind if I sticky this post?
mind it? i'd be disappointed if you didn't, lol

one more question before i stop badgering you. What features will the enterprise ver have over the standard and have you decided on the licensing scheme and/or actual costs?
I'm still adding to the list of features, but a handful of things I'm sure of:
  • Distributed sending; where a cluster of server is available
  • Much more accuracy of failure reporting/delivery tracking (not disclosing any more on this yet)
  • Self-contained MTA for asynchronous sending (uses a spooler)
  • Ability to operate as an incoming MTA (for things like Helpdesk software which responds to emails)
    - This can also (potentially) handle bounces
    - Requires the ability to use port 25
  • DKIM/DomainKeys
  • PKCS signed messages
  • More complex content-types in the mime layer (still available with standard version if implemented manually)
  • Ability to save/restore messages uses XML format
  • STARTTLS support
  • More authentication mechanisms
  • Parsing of real emails into Swift message objects
Holding an enterprise license will give you access to the enterprise documentation and download area so you can grab the updates at no charge. Enterprise license holders get the first priority when it comes to how I spend my time bugfixing and responding to support requests. They also have access to the book I'll be releasing; which standard edition downloaders are able to purchase for a small fee (it just supplements the online documentation in greater detail with more use case examples).

I can't disclose any prices yet sorry. I still haven't finalized that myself. It's certainly not going to be expensive for businesses, although I don't see many hobbyists paying for it ;)
matthijs
DevNet Master
Posts: 3360
Joined: Thu Oct 06, 2005 3:57 pm

Re: Current development status of 4.0?

Post by matthijs »

Sounds very interesting. Seems like a good move to split it into a free and paid pro version. I'm sure many would be glad to pay for that if they need the library in a commercial setting.
User avatar
Chris Corbyn
Breakbeat Nuttzer
Posts: 13098
Joined: Wed Mar 24, 2004 7:57 am
Location: Melbourne, Australia

Re: Current development status of 4.0?

Post by Chris Corbyn »

Just figured I'd share this. I'm putting together some documentation for version 4 and running some pre-optimization benchmarks.

Before I optimize, I've already piddled all over version 3 in terms of memory usage when it comes to attaching large files.

The following benchmark generates files full of random binary code at 0, 1, 2, 3, 4, 5, 6, 7, 8, 9, 10, 20, 30, 40... through to 100 MiB. It checks the peak memory used after sending the emails.

One set of data is for Array caching; the other is for disk caching.

Code: Select all

<?php
 
require_once '../../lib/swift_required.php';
 
//Using sendmail, but SmtpTransport should be just the same
$mailer = new Swift_Mailer(new Swift_SendmailTransport('/usr/sbin/sendmail -bs'));
 
//Define a cache type
$type = 'array';
 
//Use the correct cache type
Swift_Preferences::getInstance()->setCacheType($type);
 
//Create a CSV log file
$log = fopen($type . '-results.csv', 'w');
 
//Write headings
fwrite($log, '"Attachment Size (MiB)","Memory (MiB)"' . "\n");
 
$increment = 1;
 
for ($i = 0; $i <= 100; $i += $increment)
{
  //Non-linear scale
  if ($i >= 10) $increment = 10;
  
  //Create a file full of random binary
  `dd if=/dev/random of=attach.ext bs=1048576 count=$i`;
 
  //Create a message with the random binary attached
  $message = Swift_Message::newInstance()
    ->setSubject('Swift Mailer Benchmark')
    ->setTo(array('chris@w3style.co.uk' => 'Chris Corbyn'))
    ->setFrom(array('chris@w3style.co.uk' => 'Chris Corbyn'))
    ->setBody("Benchmark test")
    ->attach(Swift_Attachment::fromPath('attach.ext'))
    ;
 
  //Send it with Sendmail
  $mailer->send($message);
 
  //Record result
  $usage = round( memory_get_peak_usage() / (1024 * 1024), 2);
  fwrite($log, sprintf("\"%s\",\"%s\"\n", $i, $usage));
  printf("MEM @ {$i} MiB = %s MiB\n", $usage);
}
 
//Close the CSV
fclose($log);
The results show that with disk caching enabled Swift will never use over 1.68MiB of memory. Without it (this is where it slaughters version 3) it the ratio of memory:attachmentSize is good considering it all happens in memory and encoded attachments should always be at least 33% bigger than the original file.

I'll post more benchmarks soon (speed differences between disk caching and array caching, speed when sending 1, 5, 10, 20, 50, 100 emails etc).

PS: Disk caching is on by default in version 4 (yay for PHP5!)
Attachments
SwiftMailerAttachmentMemory2.png
SwiftMailerAttachmentMemory2.png (51.81 KiB) Viewed 25351 times
User avatar
Chris Corbyn
Breakbeat Nuttzer
Posts: 13098
Joined: Wed Mar 24, 2004 7:57 am
Location: Melbourne, Australia

Re: Current development status of 4.0?

Post by Chris Corbyn »

Here are the equivalent benchmark results from v3. It's massively different although disk caching uses less memory than v4 -- mostly because I haven't optimized yet and the API has grown quite a lot (lots more classes). I'll try and optimize to get that down.

Source code for benchmark with version 3:

Code: Select all

<?php
 
ini_set('memory_limit', '1024M');
 
require_once '../lib/Swift.php';
require_once '../lib/Swift/Connection/Sendmail.php';
require_once '../lib/Swift/Cache/Memory.php';
require_once '../lib/Swift/Cache/Disk.php';
 
//Using sendmail, but SmtpTransport should be just the same
$mailer = new Swift(new Swift_Connection_Sendmail('/usr/sbin/sendmail -bs'));
 
//Define a cache type
$type = 'disk';
 
//Use the correct cache type
Swift_CacheFactory::setClassName(sprintf('Swift_Cache_%s', ucfirst($type)));
if ($type == 'disk')
{
  Swift_Cache_Disk::setSavePath(sys_get_temp_dir());
}
 
//Create a CSV log file
$log = fopen($type . '-results.csv', 'w');
 
//Write headings
fwrite($log, '"Attachment Size (MiB)","Memory (MiB)"' . "\n");
 
$increment = 1;
 
for ($i = 0; $i <= 100; $i += $increment)
{
  //Non-linear scale
  if ($i >= 10) $increment = 10;
  
  //Create a file full of random binary
  `dd if=/dev/random of=attach.ext bs=1048576 count=$i`;
 
  //Create a message with the random binary attached
  $message = new Swift_Message('Swift Mailer Benchmark', 'Benchmark test');
  $message->attach(new Swift_Message_Attachment(new Swift_File('attach.ext')));
 
  //Send it with Sendmail
  $mailer->send($message, new Swift_Address('chris@w3style.co.uk', 'Chris Corbyn'), new Swift_Address('chris@w3style.co.uk', 'Chris Corbyn'));
 
  //Record result
  $usage = round( memory_get_peak_usage() / (1024 * 1024), 2);
  fwrite($log, sprintf("\"%s\",\"%s\"\n", $i, $usage));
  printf("MEM @ {$i} MiB = %s MiB\n", $usage);
}
 
//Close the CSV
fclose($log);
I'll post one with the two versions overlaid...
Attachments
SwiftMailer_v3_Memory.png
SwiftMailer_v3_Memory.png (53.84 KiB) Viewed 25312 times
User avatar
Chris Corbyn
Breakbeat Nuttzer
Posts: 13098
Joined: Wed Mar 24, 2004 7:57 am
Location: Melbourne, Australia

Re: Current development status of 4.0?

Post by Chris Corbyn »

Overlaid version (the v3 / v4 Disk caching lines are sitting on top of each other since they're so close).
Attachments
SwiftMailerv3v4Comparison.png
SwiftMailerv3v4Comparison.png (50.31 KiB) Viewed 25307 times
Frocer
Forum Newbie
Posts: 2
Joined: Wed Dec 05, 2007 12:50 pm

Re: Current development status of 4.0?

Post by Frocer »

Hi there,

Just wondering how's the development of 4.0 coming along? :) I am eagerly waiting for DKIM and DomainKeys support! I will be happy to help beta testing it if you still need testers, I have been using SwiftMailer for about a year.

If we can't expect 4.0 out for a while, anyone has any recommendation regarding DKIM/DomainKeys work around?
User avatar
Chris Corbyn
Breakbeat Nuttzer
Posts: 13098
Joined: Wed Mar 24, 2004 7:57 am
Location: Melbourne, Australia

Re: Current development status of 4.0?

Post by Chris Corbyn »

v4 is written, but only the standard edition is ready for release. I'm afraid I've got a lot of personal and work commitments at the moment (probably the busiest I've been in about 3 years!) so the attention Swift is receiving right now is low on my list of priorities. The code has been written and benchmarks have been done; I merely need to release it, but now is not a good time since there will be an inevitable bout of support requests after the release which I'm not currently equipped to deal with.

Things should have calmed down a little in a month or so; perhaps less.
gmorehoudh
Forum Commoner
Posts: 50
Joined: Tue Mar 04, 2008 1:49 pm

Re: Current development status of 4.0?

Post by gmorehoudh »

Here at my company we are also waiting on Swift 4 to replace our entire duct taped mail infrastructure on our brand new web site. We'd love to see it soon. :)
Trance-formation
Forum Newbie
Posts: 11
Joined: Tue Jul 17, 2007 6:31 am

Re: Current development status of 4.0?

Post by Trance-formation »

I'm commencing a big project (commercial in that I'll get paid for it, but for the not-for-profit sector, grant funded) this month and had planned on using Swift3.3.3, but the features you write into the Enterprise version of 4 are appealing and as I was going to donate anyway will snap it up like a hungry dog when it's released.

Sooo... given that I have a development timeline, if I start with 3.3.3, how easy it will it be to upgrade to Enterprise version of Swift4? Or is the release date close enough to worth my waiting... or, as development starts in a week or so... do you need any more beta testers? :wink: :crazy:
Post Reply