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

Feature request: local sendmail as provider #2

Open
tamtamchik opened this issue Jul 7, 2016 · 3 comments
Open

Feature request: local sendmail as provider #2

tamtamchik opened this issue Jul 7, 2016 · 3 comments

Comments

@tamtamchik
Copy link

Would be nice to have it as a provider, for development or testing, so it'll be easy to switch it to one of production-ready providers.

@Zegnat
Copy link

Zegnat commented Mar 25, 2017

You could try this one I used for a bit: Mail.php. Works like any other sender:

use Omnimail\Email;
use Zegnat\Omnimail\Mail;

$sender = new Mail();

$email = (new Email())
    ->addTo('alice@example.com')
    ->setFrom('bob@example.com')
    ->setSubject('Hello, world!')
    ->setTextBody('Hello World! How are you?');

$sender->send($email);

Some limitations:

  1. Names for email addresses are discarded.
  2. While a Logger is accepted in the constructor, nothing actually gets logged.
  3. Only text bodies are sent, HTML bodies are ignored completely.

I am not likely to update it unless I find a specific reason to do so. I have switched to Swiftmailer for my current project.

@eileenmcnaughton
Copy link
Collaborator

I did actually include a swiftmailer instance in here #19 - I think I only did 'Mail' - the point was more about establishing the factory class than the actual mailer (https://github.com/eileenmcnaughton/omnimail-swiftmailer ) - I think that basic implementation will be in the next release, or usable from it.

@shahariaazam
Copy link
Collaborator

Sorry to pick this issue after long time. PR is welcome for this

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

5 participants