mirror of https://github.com/h44z/wg-portal.git
				
				
				
			fix TLS for email sending
This commit is contained in:
		
							parent
							
								
									6ece6e5be9
								
							
						
					
					
						commit
						29cd73aa46
					
				|  | @ -71,9 +71,9 @@ func SendEmailWithAttachments(cfg MailConfig, sender, replyTo, subject, body str | ||||||
| 		} | 		} | ||||||
| 	} | 	} | ||||||
| 
 | 
 | ||||||
| 	if cfg.CertValidation { | 	if cfg.TLS { | ||||||
| 		return e.Send(hostname, auth) | 		return e.SendWithStartTLS(hostname, auth, &tls.Config{InsecureSkipVerify: !cfg.CertValidation}) | ||||||
| 	} else { | 	} else { | ||||||
| 		return e.SendWithStartTLS(hostname, auth, &tls.Config{InsecureSkipVerify: true}) | 		return e.Send(hostname, auth) | ||||||
| 	} | 	} | ||||||
| } | } | ||||||
|  |  | ||||||
		Loading…
	
		Reference in New Issue