Discover Packages
code.gitea.io/gitea
services
mailer
sender
package
Version:
v1.23.6
Opens a new window with list of versions in this module.
Published: Mar 24, 2025
License: MIT
Opens a new window with license information.
Imports: 20
Opens a new window with list of imports.
Imported by: 0
Opens a new window with list of known importers.
Documentation Source Files Index Constants Variables Functions Types LoginAuth(username, password) NtlmAuth(username, password) type DummySender type Message type SMTPSender type Sender type SendmailSender (s) Send(from, to, msg) NewMessage(to, subject, body) NewMessageFrom(to, fromDisplayName, fromAddress, subject, body) (m) SetHeader(field, value) (m) ToMessage() (s) Send(from, to, msg) (s) Send(from, to, msg)
Documentation
¶
func LoginAuth (username, password string ) smtp.Auth
LoginAuth SMTP AUTH LOGIN Auth Handler
func NtlmAuth (username, password string ) smtp.Auth
NtlmAuth SMTP AUTH NTLM Auth Handler
type DummySender struct {}
DummySender Sender sendmail mail sender
func (s *DummySender) Send(from string , to []string , msg io.WriterTo) error
Send send email
type Message struct {
Info string
FromAddress string
FromDisplayName string
To string
ReplyTo string
Subject string
Date time.Time
Body string
Headers map [string ][]string
}
Message mail body and log info
func NewMessage (to, subject, body string ) *Message
NewMessage creates new mail message object with default From header.
func NewMessageFrom (to, fromDisplayName, fromAddress, subject, body string ) *Message
NewMessageFrom creates new mail message object with custom From header.
func (m *Message) SetHeader(field string , value ...string )
SetHeader adds additional headers to a message
func (m *Message) ToMessage() *gomail.Msg
ToMessage converts a Message to gomail.Message
SMTPSender Sender SMTP mail sender
func (s *SMTPSender) Send(from string , to []string , msg io.WriterTo) error
Send send email
type Sender interface {
Send(from string , to []string , msg io.WriterTo) error
}
type SendmailSender struct {}
SendmailSender Sender sendmail mail sender
func (s *SendmailSender) Send(from string , to []string , msg io.WriterTo) error
Send send email
Source Files
¶
Click to show internal directories.
Click to hide internal directories.