File tree 3 files changed +3
-0
lines changed
3 files changed +3
-0
lines changed Original file line number Diff line number Diff line change @@ -32,6 +32,7 @@ class has following attributes
32
32
- SUPPRESS_SEND: To mock sending out mail, defaults 0.
33
33
- USE_CREDENTIALS: Defaults to ` True ` . However it enables users to choose whether or not to login to their SMTP server.
34
34
- VALIDATE_CERTS: Defaults to ` True ` . It enables to choose whether to verify the mail server's certificate
35
+ - LOCAL_HOSTNAME: It enables to set the hostname of the local machine, which is used to connect to the SMTP server.
35
36
36
37
37
38
### ``` MessageSchema ``` class
Original file line number Diff line number Diff line change @@ -21,6 +21,7 @@ class ConnectionConfig(Settings):
21
21
USE_CREDENTIALS : bool = True
22
22
VALIDATE_CERTS : bool = True
23
23
TIMEOUT : int = DEFAULT_TIMEOUT
24
+ LOCAL_HOSTNAME : Optional [str ] = None
24
25
25
26
def template_engine (self ) -> Environment :
26
27
"""
Original file line number Diff line number Diff line change @@ -39,6 +39,7 @@ async def _configure_connection(self) -> None:
39
39
use_tls = self .settings .MAIL_SSL_TLS ,
40
40
start_tls = self .settings .MAIL_STARTTLS ,
41
41
validate_certs = self .settings .VALIDATE_CERTS ,
42
+ local_hostname = self .settings .LOCAL_HOSTNAME ,
42
43
)
43
44
44
45
if not self .settings .SUPPRESS_SEND : # for test environ
You can’t perform that action at this time.
0 commit comments