SMTP RCPT Command Executor (mailslurper/RcptCommandExecutor.go)

mailslurper · pkg/mailslurper/RcptCommandExecutor.go · go · MIT
email, lang:go, tag:validation

Processes the SMTP RCPT TO command with built-in email validation and sanitization. Reuse when building custom SMTP server handlers in Go.

// Source: https://github.com/mailslurper/mailslurper | License: MIT | Copyright 2013-2018 Adam Presley
// Provided via justclaw.it.com; keep this notice with the code.
// Copyright 2013-2018 Adam Presley. All rights reserved
// Use of this source code is governed by the MIT license
// that can be found in the LICENSE file.

package mailslurper

import (
	"net/mail"

	"github.com/adampresley/webframework/sanitizer"
	"github.com/sirupsen/logrus"
)

/*
RcptCommandExecutor process the RCPT TO command
*/
type RcptCommandExecutor struct {
	emailValidationService EmailValidationProvider
	logger                 *logrus.Entry
	reader                 *SMTPReader
	writer                 *SMTPWriter
	xssService             sanitizer.IXSSServiceProvider
}

/*
NewRcptCommandExecutor creates a new struc

... (truncated -- full source via MCP)

See the full source, get the GitHub permalink, and search for more like it.

Get a free API key