// GetEmail returns use email
436763
func (u *User) GetEmail() string {
	r, ok := u.Get("email")
	if ok {
		return r.(string)
	}

	return ""
}
106483
func (w *WebHookAuthor) GetEmail() string {
	if w == nil || w.Email == nil {
		return ""
	}
	return *w.Email
}
507944
func AddEmail(c *context.APIContext, form api.CreateEmailOption) {
	if len(form.Emails) == 0 {
		c.Status(422)
		return
	}

	emails := make([]*models.EmailAddress, len(form.Emails))
	for i := range form.Emails {
		emails[i] = &models.EmailAddress{
			UID:         c.User.ID,
			Email:       form.Emails[i],
			IsActivated: !setting.Service.RegisterEmailConfirm,
		}
	}

	if err := models.AddEmailAddresses(emails); err != nil {
		if models.IsErrEmailAlreadyUsed(err) {
			c.Error(422, "", "Email address has been used: "+err.(models.ErrEmailAlreadyUsed).Email)
		} else {
			c.Error(500, "AddEmailAddresses", err)
		}
		return
	}

	apiEmails := make([]*api.Email, len(emails))
	for i := range emails {
		apiEmails[i] = convert.ToEmail(emails[i])
	}
	c.JSON(201, &apiEmails)
}
723984
func splitEmail(email string) (local string, domain string, ok bool) {
	parts := strings.Split(email, "@")
	if len(parts) < 2 {
		return
	}
	local = parts[0]
	domain = parts[1]
	// Check that the parts contain enough characters.
	if len(local) < 1 {
		return
	}
	if len(domain) < len("x.xx") {
		return
	}
	return local, domain, true
}
722239
func (s *SourceImportAuthor) GetEmail() string {
	if s == nil || s.Email == nil {
		return ""
	}
	return *s.Email
}
984964
func Email() string {
	return strings.ToLower(FirstName(RandomGender)+LastName()) + StringNumberExt(1, "", 3) + "@" + randomFrom(jsonData.Domains)
}
830387
func (r Network_Message_Delivery_Email_Sendgrid) GetEmailList(list *string) (resp []datatypes.Container_Network_Message_Delivery_Email_Sendgrid_List_Entry, err error) {
	params := []interface{}{
		list,
	}
	err = r.Session.DoRequest("SoftLayer_Network_Message_Delivery_Email_Sendgrid", "getEmailList", params, &r.Options, &resp)
	return
}
449061
func (s *service) RetrieveUserInfoByEmail(email string) (resDTO rest.ResponseDTOUserInfo, error *servicehelper.Error) {
	entity, err := s.repo.FindByEmail(email)
	if err != nil {
		return rest.ResponseDTOUserInfo{}, &servicehelper.Error{Detail: errors.New("no result found"), Code: servicehelper.NotFound}
	}
	return rest.ResponseDTOUserInfo{
		UserId: entity.ID,
		Email:  entity.Email,
	}, nil
}
768937
func (mg *MailgunImpl) GetRoute(ctx context.Context, id string) (Route, error) {
	r := newHTTPRequest(generatePublicApiUrl(mg, routesEndpoint) + "/" + id)
	r.setClient(mg.Client())
	r.setBasicAuth(basicAuthUser, mg.APIKey())
	var envelope struct {
		Message string `json:"message"`
		*Route  `json:"route"`
	}
	err := getResponseFromJSON(ctx, r, &envelope)
	if err != nil {
		return Route{}, err
	}
	return *envelope.Route, err

}
107557
func (s *PutFileInput) SetEmail(v string) *PutFileInput {
	s.Email = &v
	return s
}
426177
func (api *Client) GetUserByEmail(email string) (*User, error) {
	return api.GetUserByEmailContext(context.Background(), email)
}
63483
func (s *Group) SetEmail(v string) *Group {
	s.Email = &v
	return s
}
766018
func (repo *repo) FindByEmail(email string) (user service.Entity, err error) {
	if err = dbconn.DB.Where("email = ?", email).First(&user).Error; err != nil {
		return service.Entity{}, err
	}
	return user, nil
}
698661
func (s *Resource) SetEmail(v string) *Resource {
	s.Email = &v
	return s
}
331355
func (i *Invitation) GetEmail() string {
	if i == nil || i.Email == nil {
		return ""
	}
	return *i.Email
}
1070551
func (s *DescribeGroupOutput) SetEmail(v string) *DescribeGroupOutput {
	s.Email = &v
	return s
}
727308
func (s *Session) Email() string {
	if s.sessionType == apitypes.MachineSession {
		return "none"
	}

	return s.identity.(envelope.UserInf).Email()
}