Ejemplo n.º 1
0
func createAttachment(data *verifyData) (*pgpmail.MessagePart, error) {
	p := new(pgpmail.MessagePart)
	p.AddHeader(ctHeader, "application/octet-stream; name=\"verify_data.tgz\"")
	p.AddHeader("Content-Disposition", "attachment; filename=\"verify_data.tgz\"")
	p.AddHeader("Content-Transfer-Encoding", "base64")
	body, err := createAttachmentBody(data)
	if err != nil {
		return nil, err
	}
	p.Body = body
	return p, nil
}
Ejemplo n.º 2
0
func createBody() *pgpmail.MessagePart {
	p := new(pgpmail.MessagePart)
	p.AddHeader(ctHeader, "text/plain")
	p.Body = "This is an automated response generated by the Nyms mail verification system.\n"
	return p
}