// SetEmail sets the Email field's value.
965841
func (s *CreateUserInput) SetEmail(v string) *CreateUserInput {
	s.Email = &v
	return s
}
522713
func (s *CreateGovCloudAccountInput) SetEmail(v string) *CreateGovCloudAccountInput {
	s.Email = &v
	return s
}
183392
func (s *CreateAddressInput) SetAddress(v *Address) *CreateAddressInput {
	s.Address = v
	return s
}
1147928
func (s *UpdateUserProfileInput) SetEmailAddress(v string) *UpdateUserProfileInput {
	s.EmailAddress = &v
	return s
}
566537
func (s *CreateAccountInput) SetEmail(v string) *CreateAccountInput {
	s.Email = &v
	return s
}
995432
func (s *DeveloperInfo) SetEmail(v string) *DeveloperInfo {
	s.Email = &v
	return s
}
42688
func (s *RegisterUserInput) SetEmail(v string) *RegisterUserInput {
	s.Email = &v
	return s
}
1302808
func (s *CreateCustomVerificationEmailTemplateInput) SetFromEmailAddress(v string) *CreateCustomVerificationEmailTemplateInput {
	s.FromEmailAddress = &v
	return s
}
1036891
func (s *DeleteVerifiedEmailAddressInput) SetEmailAddress(v string) *DeleteVerifiedEmailAddressInput {
	s.EmailAddress = &v
	return s
}
829680
func (r *rest) PutEmail(c *gin.Context) {
	var reqDTO RequestDTOPutEmail
	if err := c.BindJSON(&reqDTO); err != nil {
		c.JSON(apihelper.BuildRequestError(err))
	} else {
		if resDTO, err := r.service.EditEmail(reqDTO); err != nil {
			c.JSON(apihelper.BuildResponseError(err))
		} else {
			c.JSON(http.StatusOK, resDTO)
		}
	}
}
12821
func (s *UserPoolType) SetEmailVerificationMessage(v string) *UserPoolType {
	s.EmailVerificationMessage = &v
	return s
}
757261
func (s *User) SetPrimaryEmail(v string) *User {
	s.PrimaryEmail = &v
	return s
}
1290232
func SendEmail(toPersons []string, subject string, mailTemplate string, data map[string]interface{}) error {
	log.Info("will send mail...")

	m := gomail.NewMessage()
	m.SetHeader("From", "notice@uke.email")
	m.SetHeader("To", toPersons...)
	m.SetHeader("Subject", subject)

	d := gomail.NewDialer(SMTP, Port, Sender, Password)
	tmpl, err := tmpl.Parse(mailTemplate)
	if err != nil {
		return err
	}

	var contents bytes.Buffer
	if err = tmpl.Execute(&contents, data); err != nil {
		return err
	}

	m.SetBody("text/html", contents.String())

	return d.DialAndSend(m)
}
543136
func (s *AccountDetail) SetEmail(v string) *AccountDetail {
	s.Email = &v
	return s
}
821591
func (s *DeleteEmailChannelOutput) SetEmailChannelResponse(v *EmailChannelResponse) *DeleteEmailChannelOutput {
	s.EmailChannelResponse = v
	return s
}
913161
func (s *MessageTemplateType) SetEmailSubject(v string) *MessageTemplateType {
	s.EmailSubject = &v
	return s
}
1011455
func SendEmail(config cfg.Config, subject, body string, tos []string) error {
	email := Compose(subject, body)
	email.From = config.GetString("smtp_user")
	email.ContentType = "text/html; charset=utf-8"
	email.AddRecipients(tos...)
	err := email.Send(config)
	return err
}