Uh oh!
There was an error while loading.Please reload this page.
- Notifications
You must be signed in to change notification settings - Fork9.7k
[Mailer] Added OhMySMTP Bridge#42710
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 ourterms of service andprivacy statement. We’ll occasionally send you account related emails.
Already on GitHub?Sign in to your account
Uh oh!
There was an error while loading.Please reload this page.
Conversation
This commit adds thehttps://ohmysmtp.com bridge to enable sending over the OhMySMTP API.
carsonbot commentedAug 24, 2021
Hey! I see that this is your first PR. That is great! Welcome! Symfony has acontribution guide which I suggest you to read. In short:
Review the GitHub status checks of your pull request and try to solve the reported issues. If some tests are failing, try to see if they are failing because of this change. When two Symfony core team members approve this change, it will be merged and you will become an official Symfony contributor! I am going to sit back now and wait for the reviews. Cheers! Carsonbot |
carsonbot commentedAug 24, 2021
It looks like you unchecked the "Allow edits from maintainer" box. That is fine, but please note that if you have multiple commits, you'll need to squash your commits into one before this can be merged. Or, you can check the "Allow edits from maintainers" box and the maintainer can squash for you. Cheers! Carsonbot |
paul-oms commentedAug 24, 2021
Hi Core team - from what I can tell the failing tests are all failing on the 5.4 branch as well as here. So I assume I don't need to try to fix any more of these. Let me know if that's not correct. Would love to get this into the 5.4 release, thanks! |
derrabus commentedAug 24, 2021
You don't need to fix tests you didn't break. 😃 |
OskarStark left a comment
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others.Learn more.
Thanks for providing a new bridge, this is much appreciated 👍🏻
I left some comments
Uh oh!
There was an error while loading.Please reload this page.
Uh oh!
There was an error while loading.Please reload this page.
Uh oh!
There was an error while loading.Please reload this page.
src/Symfony/Component/Mailer/Bridge/Ohmysmtp/Tests/Transport/OhmysmtpApiTransportTest.php OutdatedShow resolvedHide resolved
Uh oh!
There was an error while loading.Please reload this page.
src/Symfony/Component/Mailer/Bridge/Ohmysmtp/Tests/Transport/OhmysmtpTransportFactoryTest.php OutdatedShow resolvedHide resolved
Uh oh!
There was an error while loading.Please reload this page.
| { | ||
| $response =$this->client->request('POST','https://'.$this->getEndpoint().'/send', [ | ||
| 'headers' => [ | ||
| 'Accept' =>'application/json', |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others.Learn more.
Can be removed, as you are using the json key below, which send the header automatically
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others.Learn more.
Hi@OskarStark I tested this end to end and the content-type and accept headers were not set on the outbound request, so the OhMySMTP API rejected the request - so I think we do need to leave this in?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others.Learn more.
cc@nicolas-grekas am I missing sth? It should set the headers, right?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others.Learn more.
| 'headers' => [ | ||
| 'Accept' =>'application/json', | ||
| 'OhMySMTP-Server-Token' =>$this->key, | ||
| 'Content-Type' =>'application/json', |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others.Learn more.
Can be removed, as you are using the json key below, which send the header automatically
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others.Learn more.
Hi@OskarStark I tested this end to end and the content-type and accept headers were not set on the outbound request, so the OhMySMTP API rejected the request - so I think we do need to leave this in?
src/Symfony/Component/Mailer/Bridge/Ohmysmtp/Transport/OhmysmtpSmtpTransport.php OutdatedShow resolvedHide resolved
Uh oh!
There was an error while loading.Please reload this page.
src/Symfony/Component/Mailer/Bridge/Ohmysmtp/Transport/OhmysmtpTransportFactory.php OutdatedShow resolvedHide resolved
Uh oh!
There was an error while loading.Please reload this page.
Uh oh!
There was an error while loading.Please reload this page.
paul-oms commentedAug 25, 2021
@OskarStark regarding the class names, it seems Fabbot is enforcing lowercase e.g. OhmysmtpTransportFactory over OhMySmtpTransportFactory Which way should it be? |
OskarStark commentedAug 25, 2021
To me it should be the second one cc@fabpot |
OskarStark commentedAug 25, 2021
Maybe it is because the folder is named lowercase? |
paul-oms commentedAug 25, 2021
You were right, took me a bit of wrestling with git to get it right but it's there now. Thanks! |
Uh oh!
There was an error while loading.Please reload this page.
src/Symfony/Component/Mailer/Bridge/OhMySmtp/Tests/Transport/OhMySmtpApiTransportTest.php OutdatedShow resolvedHide resolved
Uh oh!
There was an error while loading.Please reload this page.
src/Symfony/Component/Mailer/Bridge/OhMySmtp/Tests/Transport/OhMySmtpSmtpTransportTest.php OutdatedShow resolvedHide resolved
Uh oh!
There was an error while loading.Please reload this page.
src/Symfony/Component/Mailer/Bridge/OhMySmtp/Tests/Transport/OhMySmtpTransportFactoryTest.php OutdatedShow resolvedHide resolved
Uh oh!
There was an error while loading.Please reload this page.
src/Symfony/Component/Mailer/Bridge/OhMySmtp/Transport/OhMySmtpApiTransport.php OutdatedShow resolvedHide resolved
Uh oh!
There was an error while loading.Please reload this page.
src/Symfony/Component/Mailer/Bridge/OhMySmtp/Transport/OhMySmtpSmtpTransport.php OutdatedShow resolvedHide resolved
Uh oh!
There was an error while loading.Please reload this page.
fabpot commentedAug 26, 2021
|
Uh oh!
There was an error while loading.Please reload this page.
src/Symfony/Component/Mailer/Exception/UnsupportedSchemeException.php OutdatedShow resolvedHide resolved
Uh oh!
There was an error while loading.Please reload this page.
src/Symfony/Component/Mailer/Tests/Exception/UnsupportedSchemeExceptionTest.php OutdatedShow resolvedHide resolved
Uh oh!
There was an error while loading.Please reload this page.
…o oh-my-smtp-mailer,
paul-oms commentedAug 26, 2021
Thanks@fabpot and@OskarStark for the review. All requested changes have been completed. |
Uh oh!
There was an error while loading.Please reload this page.
src/Symfony/Component/Mailer/Bridge/OhMySmtp/Tests/Transport/OhMySmtpApiTransportTest.php OutdatedShow resolvedHide resolved
Uh oh!
There was an error while loading.Please reload this page.
OskarStark commentedAug 26, 2021
After my comments we are good to go |
fabpot commentedAug 26, 2021
Thank you@paul-oms. |
This PR was squashed before being merged into the 5.4 branch.Discussion----------[Mailer] Added OhMySMTP BridgeThis adds thehttps://ohmysmtp.com bridge to enable sending over the [OhMySMTP](https://ohmysmtp.com) API.| Q | A| ------------- | ---| Branch? | 5.4 <!-- see below -->| Bug fix? | no| New feature? | yes <!-- please update src/**/CHANGELOG.md files -->| Deprecations? | no <!-- please update UPGRADE-*.md and src/**/CHANGELOG.md files -->| Tickets | none <!-- prefix each issue number with "Fix #", no need to create an issue if none exist, explain below instead -->| License | MIT| Doc PR |symfony/symfony-docs#15747... <!-- required for new features --><!--Replace this notice by a short README for your feature/bugfix. This will help peopleunderstand your PR and can be used as a start for the documentation.Additionally (seehttps://symfony.com/releases): - Always add tests and ensure they pass. - Never break backward compatibility (seehttps://symfony.com/bc). - Bug fixes must be submitted against the lowest maintained branch where they apply (lowest branches are regularly merged to upper ones so they get the fixes too.) - Features and deprecations must be submitted against branch 5.x. - Changelog entry should followhttps://symfony.com/doc/current/contributing/code/conventions.html#writing-a-changelog-entry-->Commits-------ce72fd8 [Mailer] Added OhMySMTP Bridge
This PR was squashed before being merged into the 5.4 branch.Discussion----------[Mailer] Added OhMySMTP mailer detailsRefssymfony/symfony#42710Commits-------b3dc6a8 [Mailer] Added OhMySMTP mailer details

Uh oh!
There was an error while loading.Please reload this page.
This adds thehttps://ohmysmtp.com bridge to enable sending over theOhMySMTP API.