mirror of
https://codeberg.org/forgejo/forgejo.git
synced 2025-06-01 04:12:10 +00:00
add config options for HELO
This commit is contained in:
parent
c76ee1cf83
commit
c47afdff58
7 changed files with 61 additions and 47 deletions
|
@ -104,13 +104,18 @@ func sendMail(settings *setting.Mailer, recipients []string, msgContent []byte)
|
|||
return err
|
||||
}
|
||||
|
||||
hostname, err := os.Hostname()
|
||||
if err != nil {
|
||||
return err
|
||||
}
|
||||
if !setting.MailService.DisableHelo {
|
||||
hostname := setting.MailService.HeloHostname
|
||||
if len(hostname) == 0 {
|
||||
hostname, err = os.Hostname()
|
||||
if err != nil {
|
||||
return err
|
||||
}
|
||||
}
|
||||
|
||||
if err = client.Hello(hostname); err != nil {
|
||||
return err
|
||||
if err = client.Hello(hostname); err != nil {
|
||||
return err
|
||||
}
|
||||
}
|
||||
|
||||
// If not using SMTPS, alway use STARTTLS if available
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue