mirror of
https://github.com/fleetdm/fleet
synced 2026-05-21 16:08:47 +00:00
relates to #12606 Implementation of the Windows automatic enrollment Fleet UI pages. This includes implementation of card for windows automatic enrollment, the setup page for windows automatic enrollment, and terms and conditions page for windows (This is currently still being worked on as our current solution is not working). **windows mdm auto enrollment card**  **windows auto enrollment setup page**  - [x] Changes file added for user-visible changes in `changes/` or `orbit/changes/`. See [Changes files](https://fleetdm.com/docs/contributing/committing-changes#changes-files) for more information. - [x] Manual QA for all new/changed functionality --------- Co-authored-by: Marcos Oviedo <marcos@fleetdm.com>
31 lines
631 B
Go
31 lines
631 B
Go
package mail
|
|
|
|
import (
|
|
"bytes"
|
|
"html/template"
|
|
|
|
"github.com/fleetdm/fleet/v4/server"
|
|
"github.com/fleetdm/fleet/v4/server/fleet"
|
|
)
|
|
|
|
// InviteMailer is used to build an email template for the invite email.
|
|
type InviteMailer struct {
|
|
*fleet.Invite
|
|
BaseURL template.URL
|
|
AssetURL template.URL
|
|
InvitedBy string
|
|
OrgName string
|
|
}
|
|
|
|
func (i *InviteMailer) Message() ([]byte, error) {
|
|
t, err := server.GetTemplate("server/mail/templates/invite_token.html", "email_template")
|
|
if err != nil {
|
|
return nil, err
|
|
}
|
|
|
|
var msg bytes.Buffer
|
|
if err = t.Execute(&msg, i); err != nil {
|
|
return nil, err
|
|
}
|
|
return msg.Bytes(), nil
|
|
}
|