mirror of https://github.com/h44z/wg-portal.git
				
				
				
			Set server name in TLS config (#13)
This commit is contained in:
		
							parent
							
								
									87964f8ec4
								
							
						
					
					
						commit
						9c8a1df01f
					
				|  | @ -89,9 +89,9 @@ func SendEmailWithAttachments(cfg MailConfig, sender, replyTo, subject, body str | ||||||
| 
 | 
 | ||||||
| 	switch cfg.Encryption { | 	switch cfg.Encryption { | ||||||
| 	case MailEncryptionTLS: | 	case MailEncryptionTLS: | ||||||
| 		return e.SendWithTLS(hostname, auth, &tls.Config{InsecureSkipVerify: !cfg.CertValidation}) | 		return e.SendWithTLS(hostname, auth, &tls.Config{ServerName: cfg.Host, InsecureSkipVerify: !cfg.CertValidation}) | ||||||
| 	case MailEncryptionStartTLS: | 	case MailEncryptionStartTLS: | ||||||
| 		return e.SendWithStartTLS(hostname, auth, &tls.Config{InsecureSkipVerify: !cfg.CertValidation}) | 		return e.SendWithStartTLS(hostname, auth, &tls.Config{ServerName: cfg.Host, InsecureSkipVerify: !cfg.CertValidation}) | ||||||
| 	default: // MailEncryptionNone
 | 	default: // MailEncryptionNone
 | ||||||
| 		return e.Send(hostname, auth) | 		return e.Send(hostname, auth) | ||||||
| 	} | 	} | ||||||
|  |  | ||||||
		Loading…
	
		Reference in New Issue