Closed robincsamuel closed 2 years ago
Maybe I am missing something here, but I do not see a domain in the build methods. Can you point me to that part of the code?
Ah, sorry! I should have mentioned it's about the message-id generation.
The email_utils.make_msgid()
method call here accepts an optional domain
argument, and fallbacks to socket.getfqdn()
as default.
This makes the message-id like 64632159294.1.58385612484174113@ip-172-23-3-37.ec2.internal
, but I'm trying to make it like 64632159294.1.58385612484174113@mydomain.com
.
So what I am suggesting is, If we can accept an optional domain argument in the build
methods, it can be passed to the email_utils.make_msgid()
method and the generated message-id will have the custom domain name instead of the local IP address.
@abhishek-ram I've also raised a PR with suggested changes. Please check and share your thoughts :)
it'd be nice if a domain can be an optional argument to the message & mdn
build
methods. Because thesocket.getfqdn()
returns the local IP.Please let me know what do you think. I'll be happy to raise a PR :)
Thanks!