mirror of
https://github.com/neilalexander/yggmail.git
synced 2026-04-27 12:26:29 +03:00
15 lines
255 B
Go
15 lines
255 B
Go
package smtpserver
|
|
|
|
import (
|
|
"fmt"
|
|
"strings"
|
|
)
|
|
|
|
func parseAddress(email string) (string, string, error) {
|
|
at := strings.LastIndex(email, "@")
|
|
if at == 0 {
|
|
return "", "", fmt.Errorf("invalid email address")
|
|
}
|
|
return email[:at], email[at+1:], nil
|
|
}
|