Lack of interest Define a public interface for \XF\Mail\Queue

This suggestion has been closed automatically because it did not receive enough votes over an extended period of time. If you wish to see this, please search for an open suggestion and, if you don't find any, post a new one.

Sim

Well-known member
If we want to swap out the Mail queue, it would be useful to have the public interface that the Mailer is going to use defined.

For example:

PHP:
<?php

namespace XF\Mail;

interface MailQueue
{
    public function queue(\Swift_Mime_Message $message);
   
    public function queueForRetry(\Swift_Mime_Message $message, $queueEntry);
}

... and then the Queue class would become:

PHP:
<?php

namespace XF\Mail;

class Queue implements MailQueue
{
    ...
}

... and the constructor for the Mailer would typehint the XF\Mail\MailQueue interface rather than the XF\Mail\Queue class.
 
Upvote 6
This suggestion has been closed. Votes are no longer accepted.
Top Bottom