Initial commit

This commit is contained in:
Neil Alexander
2021-07-07 18:15:07 +01:00
commit ceffe7612d
26 changed files with 2130 additions and 0 deletions

View 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
}