genkgo / mail

Library to send e-mails over different transports and protocols (like SMTP and IMAP) using immutable messages and streams. Also includes SMTP server.
https://mail.readthedocs.io/
Other
402 stars 21 forks source link

Implement null connection #31

Closed GwendolenLynch closed 6 years ago

GwendolenLynch commented 6 years ago

Use:

ClientFactory::fromString('null://localhost/')->newClient()

Use cases:

Please feel very free to throw rejection, requests for changes, or merge my way. :wink:

frederikbosch commented 6 years ago

@GawainLynch Thanks! Will look at this next week. Although I have one remark already, the NullConnection would belong in the Smtp namespace since it is dedicated to SMTP only.

GwendolenLynch commented 6 years ago

NullConnection would belong in the Smtp namespace since it is dedicated to SMTP only.

I'm going to blame that on "Friday night" … I'll dig back into it in the morning. :+1:

frederikbosch commented 6 years ago

And tests for the class are missing.

GwendolenLynch commented 6 years ago

Moved NS & added tests.

Just to note, I had left out tests on the original PR as I had (originally) copied PlainTcpConnection and that was marked with @codeCoverageIgnore … plus this is itself a test class :wink:

frederikbosch commented 6 years ago

Thanks. I’d love to have tests though. There is defined behaviour, which is pretty well testable. This is not the case for the PlainTcpConnection, because you will have to open a tcp connection in another thread (other php process). Therefore I marked it as ignored for code coverage.

GwendolenLynch commented 6 years ago

Not a problem in the world for me. I'm just in the process of "getting to know how you work" … every project does things (slightly or more) different.

frederikbosch commented 6 years ago

Oh, I understand completely, and I am very happy with the fact you are contributing! In terms of how I work regarding to code: as strict as possible ;)

GwendolenLynch commented 6 years ago

Actually, on that … could you ping me via email (address on my GH profile), I have a couple of things to quickly run by you.

frederikbosch commented 6 years ago

Much obliged!

GwendolenLynch commented 6 years ago

A pleasure :smiley_cat: