当前位置: 首页>>代码示例>>Golang>>正文


Golang MailAddress.Email方法代码示例

本文整理汇总了Golang中github.com/bradfitz/go-smtpd/smtpd.MailAddress.Email方法的典型用法代码示例。如果您正苦于以下问题:Golang MailAddress.Email方法的具体用法?Golang MailAddress.Email怎么用?Golang MailAddress.Email使用的例子?那么恭喜您, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在github.com/bradfitz/go-smtpd/smtpd.MailAddress的用法示例。


在下文中一共展示了MailAddress.Email方法的8个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的Golang代码示例。

示例1: AddRecipient

func (e *env) AddRecipient(rcpt smtpd.MailAddress) error {
	if strings.HasPrefix(rcpt.Email(), "[email protected]") {
		return errors.New("we don't send email to [email protected]")
	}
	e.msg.To[localcount] = rcpt.Email()
	localcount++
	return e.BasicEnvelope.AddRecipient(rcpt)
}
开发者ID:agupta666,项目名称:web-smtp,代码行数:8,代码来源:smtp.go

示例2: AddRecipient

func (e *env) AddRecipient(rcpt smtpd.MailAddress) error {
	if strings.HasPrefix(rcpt.Email(), "[email protected]") {
		return errors.New("we don't send email to [email protected]")
	}
	fmt.Println("Typeof to list", reflect.TypeOf(e.msg.To))
	e.msg.To = append(e.msg.To, rcpt.Email())
	fmt.Println(e.msg.To)
	// e.msg.To[localcount] = rcpt.Email()
	// localcount++
	return e.BasicEnvelope.AddRecipient(rcpt)
}
开发者ID:divyasurana,项目名称:web-smtp,代码行数:11,代码来源:smtp.go

示例3: AddRecipient

func (e *fakeEnvelope) AddRecipient(rcpt smtpd.MailAddress) error {
	e.m.To = append(e.m.To, rcpt.Email())
	return nil
}
开发者ID:nihao,项目名称:tsuru,代码行数:4,代码来源:smtp.go

示例4: onNewMail

func onNewMail(c smtpd.Connection, from smtpd.MailAddress) (smtpd.Envelope, error) {
	log.Printf("New mail received from %q", from)
	myMessage.From = from.Email()
	return &Envelope{new(smtpd.BasicEnvelope), myMessage}, nil
}
开发者ID:ashaniray,项目名称:mailhook,代码行数:5,代码来源:server.go

示例5: onNewMail

func onNewMail(c smtpd.Connection, from smtpd.MailAddress) (smtpd.Envelope, error) {
	myMessage.From = from.Email()
	return &env{new(smtpd.BasicEnvelope), myMessage}, nil
}
开发者ID:agupta666,项目名称:web-smtp,代码行数:4,代码来源:smtp.go

示例6: onNewMail

func (s *server) onNewMail(conn smtpd.Connection, from smtpd.MailAddress) (smtpd.Envelope, error) {
	log.Printf("smtp: new mail from %s", from.Email())
	return &env{s: s, from: webfist.NewEmailAddr(from.Email())}, nil
}
开发者ID:jaredhanson,项目名称:webfist,代码行数:4,代码来源:smtp.go

示例7: AddRecipient

func (e *Envelope) AddRecipient(rcpt smtpd.MailAddress) error {
	e.msg.To = append(e.msg.To, rcpt.Email())
	return e.BasicEnvelope.AddRecipient(rcpt)
}
开发者ID:ashaniray,项目名称:mailhook,代码行数:4,代码来源:envelope.go

示例8: AddRecipient

func (e *envelope) AddRecipient(rcpt smtpd.MailAddress) error {
	if strings.HasPrefix(rcpt.Email(), "[email protected]") {
		return errors.New("we don't send email to [email protected]")
	}
	return e.BasicEnvelope.AddRecipient(rcpt)
}
开发者ID:abhiyerra,项目名称:presentations,代码行数:6,代码来源:server3.go


注:本文中的github.com/bradfitz/go-smtpd/smtpd.MailAddress.Email方法示例由纯净天空整理自Github/MSDocs等开源代码及文档管理平台,相关代码片段筛选自各路编程大神贡献的开源项目,源码版权归原作者所有,传播和使用请参考对应项目的License;未经允许,请勿转载。