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

Resend API key required even with custom SMTP #26

Open
ro78 opened this issue Aug 14, 2023 · 7 comments
Open

Resend API key required even with custom SMTP #26

ro78 opened this issue Aug 14, 2023 · 7 comments

Comments

@ro78
Copy link

ro78 commented Aug 14, 2023

Describe the bug
Since a recent release, we can use an external (custom) SMTP instead of Resend.
But when I try to use it, it's still asks me to configure a Resend API key.

To Reproduce
Steps to reproduce the behavior:

  1. Install pop on a clear host
  2. Run the command pop --smtp.host localhost --smtp.port 25 --from [email protected]
  3. See error

Expected behavior
Pop doesn't display any error related to Resend

Screenshots
2023-08-14_113536

Desktop (please complete the following information):

  • OS: Debian 11
  • Browser: N/A
  • Version: 0.2
@ro78
Copy link
Author

ro78 commented Aug 15, 2023

I found that username & password is mandatory. I think it's better to accept using SMTP without them, as some hosts are trusted relays without any auth.

@p-i-c-o
Copy link

p-i-c-o commented Aug 31, 2023

Any update on this?? still having the same issue.

@p-i-c-o
Copy link

p-i-c-o commented Sep 13, 2023

@ro78 any update??

@ro78
Copy link
Author

ro78 commented Sep 13, 2023

Any update from me? No, I reported this bug and I don't have any update from the developer.

@p-i-c-o
Copy link

p-i-c-o commented Sep 14, 2023

Any update from me? No, I reported this bug and I don't have any update from the developer.

Ok, thank you anyways

@ltdangle
Copy link

ltdangle commented Nov 1, 2023

Looks like currently it's a feature, not a bug.
You can't set smtp credential via command line, you have to set them via environment variables.

@p4tpr0
Copy link

p4tpr0 commented Sep 24, 2024

That’s a bug.
You should be able to post though a local SMTP without authentication.

compare

$ export POP_SMTP_HOST=localhost
$ export POP_SMTP_PORT=25
$ pop

   ERROR   RESEND_API_KEY  environment variable is required.

   You can grab one at https://resend.com/api-keys

with:

$ export POP_SMTP_HOST=localhost
$ export POP_SMTP_PORT=25
$ export POP_SMTP_USERNAME=foo
$ export POP_SMTP_PASSWORD=bar
$ pop
                                       
 From foo                              
 To [email protected]                    
 Subject Hello!                        
                                       
 ┃ # Email                             
…

Anyway, you can work around that limitation by setting: a bogus POP_SMTP_USERNAME and a bogus POP_SMTP_PASSWORD and POP_SMTP_ENCRYPTION=none

$ export POP_SMTP_HOST=localhost
$ export POP_SMTP_PORT=25
$ export POP_SMTP_USERNAME=foo
$ export POP_SMTP_PASSWORD=bar
$ export POP_SMTP_ENCRYPTION=none
$ pop

(it works!)

Also, pop makes a(nother) very unwelcome assumption, for a TUI software: it forces the use of fully qualified From and To email addresses ([email protected]). From a "terminal" perspective, especially with POP_SMTP_HOST=localhost a user expects being able to send emails from & to local addresses:

$ pop
                                       
 From user1                              
 To user2                    
 Subject Hello!                        
                                       
 ┃ # Email                             
…

An email address of the form "user" is perfectly legitimate on the local system.

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

No branches or pull requests

4 participants