Skip to content

feat: Allow plaintext e-mails for SMTP#125

Open
jficz wants to merge 2 commits into
charmbracelet:mainfrom
jficz:fix_115
Open

feat: Allow plaintext e-mails for SMTP#125
jficz wants to merge 2 commits into
charmbracelet:mainfrom
jficz:fix_115

Conversation

@jficz

@jficz jficz commented Mar 1, 2025

Copy link
Copy Markdown
Contributor

Adds --plaintext flag which allows sending
e-mails in plaintext with SMTP method.

Not implemented for the Resend method.

Fixes (partially?) #115

@jficz

jficz commented Apr 13, 2025

Copy link
Copy Markdown
Contributor Author

@aymanbagabas @andreynering @raphamorim
politely requesting a review :) Sorry for the ping, not sure what's your review process

@aymanbagabas

Copy link
Copy Markdown
Contributor

Hi @jficz, this looks good!

Could you add POP_SMTP_PLAINTEXT=bool so that this option can be controlled by environment variables?

@raphamorim raphamorim left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

lgmt

@jficz

jficz commented Apr 15, 2025

Copy link
Copy Markdown
Contributor Author

Could you add POP_SMTP_PLAINTEXT=bool

sure, gimme a day or two

Adds `--plaintext` flag which allows sending
e-mails in plaintext with SMTP method.

Also adds counterpart POP_PLAINTEXT.

Not implemented for the Resend method.
@jficz

jficz commented Apr 15, 2025

Copy link
Copy Markdown
Contributor Author

@aymanbagabas added as POP_PLAINTEXTas, strictly speaking, it doesn't have anything to do with SMTP (as in the protocol)

@jficz

jficz commented Apr 15, 2025

Copy link
Copy Markdown
Contributor Author

also, any chance of a release with this feat ?

@aymanbagabas

Copy link
Copy Markdown
Contributor

@aymanbagabas added as POP_PLAINTEXTas, strictly speaking, it doesn't have anything to do with SMTP (as in the protocol)

Perfect!

Could you add Resend support as well? With Resend, we can omit the HTML version of the message when using plaintext

@jficz

jficz commented Apr 16, 2025

Copy link
Copy Markdown
Contributor Author

The reason I did not implement this for Resend is that, tbh, I did not really understand the code. I can take look but that will take more time.

@jficz

jficz commented Apr 16, 2025

Copy link
Copy Markdown
Contributor Author

@aymanbagabas tried in e1e08d4 but I have absolutely no idea if this will work 🤷‍♂️

I don't really understand the unsafe condition or how resend.SendEmailRequest works. Assuming it just ignores Html if the string is empty.

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

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants