Comments (6)
Hi @vdvm, sorry for the delay in getting back to you! I have tagged this as an enhancement, since I'd like to do some research regarding not only the best way to format the message id, but also the speediest way to create one.
I'll get back in touch with this soon!
from email.
Hi @jordan-wright,
No problem. I'm glad you are willing to look into it :)
After sending a mail to my google account i looked at the source and it showed [email protected] in the Message-Id header. So i went to investigate. It seems that, according to the RFC, a mail client should add a Message-Id header. I did not know that so i checked some mailer programs (like Thunderbird, swift, etc.) and they all add a Message-Id header.
(A possible workaround is telling your MTA to add missing headers but then your DKIM breaks)
Regarding the Message-Id, i'm not sure what solution is best. Maybe UUID.date.time@hostname will do.
from email.
According to RFC 822 and 2822 every email should have unique message-id in their header. I am a mutt user, I sort email by message-id which helps me sorting emails. suggestion made to have uuid-datetime@host-fqdn would be better or even we can use uuid-datetime-go-email@host-fqdn. I would love adding this feature
from email.
Looks like this one got put on the back-burner, but it shouldn't be hard to implement. Let me see what I can do.
from email.
After reviewing some options, I believe I will go with a format similar to that provided by Python's email
package:
def make_msgid(idstring=None):
"""Returns a string suitable for RFC 2822 compliant Message-ID, e.g:
<142480216486.20800.16526388040877946887@nightshade.la.mastaler.com>
Optional idstring if given is a string used to strengthen the
uniqueness of the message id.
"""
timeval = int(time.time()*100)
pid = os.getpid()
randint = random.getrandbits(64)
if idstring is None:
idstring = ''
else:
idstring = '.' + idstring
idhost = socket.getfqdn()
msgid = '<%d.%d.%d%s@%s>' % (timeval, pid, randint, idstring, idhost)
return msgid
The difference will be that, from what I can tell, there is no easy way to get the FQDN of the local host. With this being the case, I'll opt to use the hostname for now.
from email.
Ok, this should be good to go as of b359bc6. If you could please confirm, then I will consider this closed out.
If this still isn't working for you, please let me know and I'll re-open the issue.
Thanks for the great suggestion!
from email.
Related Issues (20)
- How to accept email HOT 1
- BUG: HTMLRelated attachments with only HTML HOT 3
- Cannot get latest version: module contains a go.mod file, so module path should be github.com/jordan-wright/email/v4 HOT 5
- Start sending after client was idle for a while: tcp write: broken pipe HOT 4
- NewEmailFromReader is not handling multiple To, Cc and Bcc addresses correctly HOT 1
- cc and bcc not working
- Use mail.Address instead of plain strings HOT 3
- Q: how to use inline assets? HOT 2
- Old Content-Type headers are retained after email MIME content is generated with Bytes()
- Email.Headers.Add("Bcc"…) does not do what one might think HOT 3
- Non-multipart emails are not decoded when CTE is Base64
- Missing MIMe headers with NewEmailFromReader HOT 2
- Data Race in Connection Pool
- email should use base64 encoding as default for html to avoid dot-stuffing
- text decoding support for NewEmailFromReader
- Incorrect encoding for utf-8 characters in reply-to addresses HOT 1
- Hello author, about proxy IP
- SendWithStartTLS:504 5.7.4 Unrecognized authentication type [HK2PR04CA0063.apcprd04.prod.outlook.com] HOT 1
- How do I add attachments to the body HOT 2
Recommend Projects
-
React
A declarative, efficient, and flexible JavaScript library for building user interfaces.
-
Vue.js
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
-
Typescript
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
-
TensorFlow
An Open Source Machine Learning Framework for Everyone
-
Django
The Web framework for perfectionists with deadlines.
-
Laravel
A PHP framework for web artisans
-
D3
Bring data to life with SVG, Canvas and HTML. 📊📈🎉
-
Recommend Topics
-
javascript
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
-
web
Some thing interesting about web. New door for the world.
-
server
A server is a program made to process requests and deliver data to clients.
-
Machine learning
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
-
Visualization
Some thing interesting about visualization, use data art
-
Game
Some thing interesting about game, make everyone happy.
Recommend Org
-
Facebook
We are working to build community through open source technology. NB: members must have two-factor auth.
-
Microsoft
Open source projects and samples from Microsoft.
-
Google
Google ❤️ Open Source for everyone.
-
Alibaba
Alibaba Open Source for everyone
-
D3
Data-Driven Documents codes.
-
Tencent
China tencent open source team.
from email.