Outlook configuration

display-name = "Clément DOUIN"
downloads-dir = "~/Downloads"
signature = "Cordialement,\nClément DOUIN"

[accounts.outlook]
default = true
email = "clement.douin@outlook.com"

backend = "imap"
imap.host = "outlook.office365.com"
imap.port = 993
imap.login = "clement.douin@outlook.com"
imap.passwd.cmd = "pass show outlook"

message.send.backend = "smtp"
smtp.host = "smtp.mail.outlook.com"
smtp.port = 587
smtp.encryption = "start-tls"
smtp.login = "clement.douin@outlook.com"
smtp.passwd.cmd = "pass show outlook"

Note: passwords are prompted when running the command himalaya accounts configure.

Using OAuth 2.0

This option is the most secure but the hardest to configure. First, you need to get your OAuth 2.0 credentials by following this guide. Once you get your client id and your client secret, you can configure your Himalaya account this way:

display-name = "Clément DOUIN"
downloads-dir = "~/Downloads"
signature = "Cordialement,\nClément DOUIN"

[accounts.outlook]
default = true
email = "clement.douin@outlook.com"

backend = "imap"
imap.host = "outlook.office365.com"
imap.port = 993
imap.login = "clement.douin@outlook.com"
imap.oauth2.client-id = "<imap.client-id>"
imap.oauth2.auth-url = "https://login.microsoftonline.com/common/oauth2/v2.0/authorize"
imap.oauth2.token-url = "https://login.microsoftonline.com/common/oauth2/v2.0/token"
imap.oauth2.pkce = true
imap.oauth2.scopes = [
  "offline_access",
  "https://outlook.office.com/IMAP.AccessAsUser.All",
]

message.send.backend = "smtp"
smtp.host = "smtp.mail.outlook.com"
smtp.port = 587
smtp.starttls = true
smtp.login = "clement.douin@outlook.com"
smtp.oauth2.client-id = "<smtp.client-id>"
smtp.oauth2.auth-url = "https://login.microsoftonline.com/common/oauth2/v2.0/authorize"
smtp.oauth2.token-url = "https://login.microsoftonline.com/common/oauth2/v2.0/token"
smtp.oauth2.pkce = true
smtp.oauth2.scope = "https://outlook.office.com/SMTP.Send"

Note: client secrets are prompted when running the command himalaya accounts configure.