mirror of https://github.com/h44z/wg-portal.git
				
				
				
			add ServerName to TLS config
This commit is contained in:
		
							parent
							
								
									0d4e12a6c1
								
							
						
					
					
						commit
						ab02f656be
					
				|  | @ -67,7 +67,7 @@ func SendEmailWithAttachments(cfg MailConfig, sender, replyTo, subject, body, ht | ||||||
| 	default: // MailEncryptionNone
 | 	default: // MailEncryptionNone
 | ||||||
| 		srv.Encryption = mail.EncryptionNone | 		srv.Encryption = mail.EncryptionNone | ||||||
| 	} | 	} | ||||||
| 	srv.TLSConfig = &tls.Config{InsecureSkipVerify: !cfg.CertValidation} | 	srv.TLSConfig = &tls.Config{ServerName: srv.Host, InsecureSkipVerify: !cfg.CertValidation} | ||||||
| 	switch cfg.AuthType { | 	switch cfg.AuthType { | ||||||
| 	case MailAuthPlain: | 	case MailAuthPlain: | ||||||
| 		srv.Authentication = mail.AuthPlain | 		srv.Authentication = mail.AuthPlain | ||||||
|  |  | ||||||
		Loading…
	
		Reference in New Issue