accept inbox
This commit is contained in:
4
email.go
4
email.go
@@ -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
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user