package email import ( "context" "time" ) // EmailProvider is the pluggable interface for email services. type EmailProvider interface { // CreateMailbox creates a temporary mailbox, returning the email address and an internal ID. CreateMailbox(ctx context.Context) (email string, mailboxID string, err error) // WaitForVerificationCode polls for an OTP email and extracts the verification code. // notBefore: only consider emails received after this time (use time.Time{} to accept all). WaitForVerificationCode(ctx context.Context, mailboxID string, timeout time.Duration, notBefore time.Time) (code string, err error) // WaitForTeamAccountID polls for a Team workspace creation email from OpenAI // and extracts the account_id from the embedded link (direct URL or Mandrill tracking link). // notBefore: only consider emails received after this time. WaitForTeamAccountID(ctx context.Context, mailboxID string, timeout time.Duration, notBefore time.Time) (accountID string, err error) }