I already shared my plugin with you, but I'll still share my thoughts
for the rest of you. I actually think, the way Swift works is great
and I would not move away too far from its API, otherwise you restrict
its usage too much.

I would prefer the following API for sending mails:

$mailer = new sfMailer(new Swift_Connection_SMTP('smtp.host.tld'));
// or using YAML
$mailer = new sfMailer(new sfConfiguredMailConnection('connnection_label'));
// or even easier
$mailer = new sfMailer('connection_label');
// or, if the connection is named 'default'
$mailer = new sfMailer();

Here you still have the flexibility of using any of the Swift
connections, and still you can use a very short syntax if the
connection details are configured in a YAML file. Note that sfMailer
should extend Swift to inherit all its capabilities.

Sending a mail would be easy as well:

$message = new sfMail('My subject', 'My body');
// or using a partial as body
$message = new sfMail('My subject', 'module/partial_name');
// or sending an HTML mail
$message = new sfMail('My subject', 'module/partial_name', 'text/html');

$mailer->send($message, '[EMAIL PROTECTED]', '[EMAIL PROTECTED]');

Once again, $message extends Swift_Message to inherit all
capabilities. For everything that is non-symfony specific, users can
read the good documentation of Swift. Its API is very easy to use
anyway, so I think introducing a different API here makes no sense.


Bernhard

--~--~---------~--~----~------------~-------~--~----~
You received this message because you are subscribed to the Google Groups 
"symfony developers" group.
To post to this group, send email to [email protected]
To unsubscribe from this group, send email to [EMAIL PROTECTED]
For more options, visit this group at 
http://groups.google.com/group/symfony-devs?hl=en
-~----------~----~----~----~------~----~------~--~---

Reply via email to