In V1 it used to be possible to assign Emails to projects via the project key as SMTP username. This no longer works in V2 (and it's also missing in the documentation.)
Since I'm far from fluent in Go, I used GPT to try to find out if there is something I'm doing wrong, but it looks like this is not an intended feature removal, it's intended to work but is broken. Here is the assessment, maybe it's helpful:
The SMTP handler still relies on session.AuthPlain(username, password) to extract the project from SMTP AUTH username, but the project now uses github.com/emersion/go-smtp v0.24.0. In that version AUTH is implemented through the AuthSession interface: AuthMechanisms() and Auth(mech). Because AuthPlain is not called, session.project remains empty and SMTP messages are assigned to the default project.
In V1 it used to be possible to assign Emails to projects via the project key as SMTP username. This no longer works in V2 (and it's also missing in the documentation.)
Since I'm far from fluent in Go, I used GPT to try to find out if there is something I'm doing wrong, but it looks like this is not an intended feature removal, it's intended to work but is broken. Here is the assessment, maybe it's helpful:
The SMTP handler still relies on session.AuthPlain(username, password) to extract the project from SMTP AUTH username, but the project now uses github.com/emersion/go-smtp v0.24.0. In that version AUTH is implemented through the AuthSession interface: AuthMechanisms() and Auth(mech). Because AuthPlain is not called, session.project remains empty and SMTP messages are assigned to the default project.