mirror of
https://github.com/neilalexander/yggmail.git
synced 2026-05-22 11:06:29 +03:00
Initial commit
This commit is contained in:
14
internal/smtpserver/session.go
Normal file
14
internal/smtpserver/session.go
Normal file
@@ -0,0 +1,14 @@
|
||||
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
|
||||
}
|
||||
Reference in New Issue
Block a user