Skip to content

[Mime] Add PGP feature #50222

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

Closed
wants to merge 5 commits into from
Closed

[Mime] Add PGP feature #50222

wants to merge 5 commits into from

Conversation

the-pulli
Copy link

As discussed in #50160 here is the corresponding PR.

@carsonbot carsonbot added this to the 6.3 milestone May 3, 2023
@carsonbot
Copy link

Hey!

I see that this is your first PR. That is great! Welcome!

Symfony has a contribution guide which I suggest you to read.

In short:

  • Always add tests
  • Keep backward compatibility (see https://symfony.com/bc).
  • Bug fixes must be submitted against the lowest maintained branch where they apply (see https://symfony.com/releases)
  • Features and deprecations must be submitted against the 6.3 branch.

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!
If this PR is merged in a lower version branch, it will be merged up to all maintained branches within a few days.

I am going to sit back now and wait for the reviews.

Cheers!

Carsonbot

@OskarStark OskarStark added the Mime label May 3, 2023
@carsonbot carsonbot changed the title Add PGP feature to MIME component [Mime] Add PGP feature to MIME component May 3, 2023
@OskarStark OskarStark changed the title [Mime] Add PGP feature to MIME component Add PGP feature May 3, 2023
@OskarStark OskarStark changed the title Add PGP feature [Mime] Add PGP feature May 3, 2023
@nicolas-grekas nicolas-grekas modified the milestones: 6.3, 6.4 May 23, 2023
Copy link
Member

@GromNaN GromNaN left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

This is a great new feature. IMO it should be a new component: symfony/mime is independent of these new classes and it would make it easier to resolve dependencies with pear/crypt_gpg.

@@ -17,6 +17,7 @@
],
"require": {
"php": ">=8.1",
"pear/crypt_gpg": "^1.6",
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

This needs to be moved to require-dev as said in previous comment.

Copy link
Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Haven't I moved it to require-dev in d5b9214?
I'm glad you like the idea of that feature. A new component would be essential a standalone package under a certain namespace?

Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Haven't I moved it to require-dev in d5b9214?

The commit sorts packages alphabetically, but does not move the package to require-dev.

Copy link
Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

d5b9214 fixes the composer.json in the root dir, this is src/Symfony/Component/Mime/composer.json.

Copy link
Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I see. If it should't live in symfony/mime then it should be entirely removed from there and instead moved into a new component (for example symfony/pgp) where the dependency is handled?

Copy link
Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Hey,

the last months I tested my implementation in a Symfony app and discovered several flaws. For example it doesn't work with templated emails and sending via mail provider via api is also not possible due to the nature of a PGP structured mail.
I still would like to see that feature in Symfony and I'll work on that in the upcoming weeks.

@OskarStark OskarStark modified the milestones: 6.4, 7.1 Nov 4, 2023
@wouterj wouterj linked an issue Nov 4, 2023 that may be closed by this pull request
@xabbuh xabbuh added the Feature label May 15, 2024
@xabbuh xabbuh modified the milestones: 7.1, 7.2 May 15, 2024
@fabpot fabpot modified the milestones: 7.2, 7.3 Nov 20, 2024
@fabpot
Copy link
Member

fabpot commented Jan 5, 2025

@the-pulli Are you still willing to work on this? I agree with the previous comment that it should be part of a new component that would be well integrated with Mime.

@the-pulli
Copy link
Author

Sure @fabpot , I can give it another shot. My mentioned package from #50160 still working well for me in a Laravel app. But I discovered that most of the transactional mail provider doesn't support PGP encryption. The ones working for me were Mailtrap.io and ZohoMail. I keep you posted with updates and it's nice to know that there's still a demand for this feature.

@Spomky
Copy link
Contributor

Spomky commented Feb 18, 2025

Is it really necessary to use pear/crypt_gpg?
Wouldn't it be possible to integrate only what we need to encrypt/sign emails directly into Symfony? I notice that these are mostly command line calls (https://github.com/pear/Crypt_GPG/blob/master/Crypt/GPG.php#L1621-L1666)

I am also interested in this feature. I can make myself available to help integrate it

@stof
Copy link
Member

stof commented Feb 18, 2025

Closing in favor of #59372

@stof stof closed this Feb 18, 2025
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging this pull request may close these issues.

PGPEncrypter for Symfony Mailer
10 participants