Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Support for batch sending #8

Closed
ruudk opened this issue Jun 15, 2011 · 5 comments
Closed

Support for batch sending #8

ruudk opened this issue Jun 15, 2011 · 5 comments

Comments

@ruudk
Copy link

ruudk commented Jun 15, 2011

Would love to see support for batch sending. Do you have this planned already?

@Znarkus
Copy link
Owner

Znarkus commented Jun 15, 2011

Haven't planned it, but it should be added :) Don't know when yet though

@ruudk
Copy link
Author

ruudk commented Jun 15, 2011

Maybe I'll look into it later

Would be cool to have something like this:

<?php
$email = new Mail_Postmark();
$email->startBatch();

$email->addTo('address@example1.com', 'Name')
    ->subject('Subject')
    ->messagePlain('Mail 1')
    ->send();

$email->addTo('address@johndoe.com', 'Name')
    ->subject('Subject')
    ->messagePlain('Mail 2')
    ->send();

$email->sendBatch();
?>

What do you think? Do you have a better approach?

@Znarkus
Copy link
Owner

Znarkus commented Jun 15, 2011

I haven't put much thought into it, but that looks doable. Another way might be to have a Mail_Postmark_Batch class, to separate it.

$batch = new Mail_Postmark_Batch();
$batch->add(Mail_Postmark::compose()...);
$batch->add(Mail_Postmark::compose()...);
$batch->add(Mail_Postmark::compose()...);
$batch->send();

@ruudk
Copy link
Author

ruudk commented Jun 15, 2011

I like your approach more... now all I need is to find time to implement it.

@Znarkus
Copy link
Owner

Znarkus commented Jun 15, 2011

Would you do that? That would be excellent :)

@ruudk ruudk closed this as completed Jun 15, 2011
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants