accept inbox

This commit is contained in:
bel
2026-02-24 00:00:46 -07:00
parent 1b74eb0d16
commit 8e40f85166
2 changed files with 5 additions and 1 deletions

View File

@@ -35,6 +35,7 @@ type Emailer struct {
Password string
Limit int
OAuth string
Inbox string
}
func NewEmailer() *Emailer {
@@ -49,6 +50,7 @@ func NewEmailer() *Emailer {
SMTP: envOr("SMTP", "smtp.gmail.com:465"),
Password: envOr("PASSWORD", "lhnjijrvqaesiufp"),
OAuth: envOr("OAUTH", ""),
Inbox: envOr("INBOX", "INBOX"),
}
}
@@ -166,7 +168,7 @@ func (e *Emailer) readIMAP(authU, authP string) (chan *mail.Message, error) {
return nil, err
}
}
mbox, err := c.Select("INBOX", true) //readonly
mbox, err := c.Select(e.INBOX, true) //readonly
if err != nil {
return nil, err
}