wneessen / go-mail

📧 Easy to use, yet comprehensive library for sending mails with Go
https://go-mail.dev
MIT License
571 stars 44 forks source link

MessageID generation not random enough #74

Closed wneessen closed 1 year ago

wneessen commented 1 year ago

Description

When in a bulk mailing, a list of *mail.Msg is prepared with a message ID in a loop, the processing might be so fast, that the message ID for the message IDs is not random. This might cause issues if mails are delivered to the same person on the same server with one address being forward to the 2nd mail address. Most mail server would "combine" this into one mail. While this might be the wanted behaviour from a mail receiving perspective, from a sending perspectice this is not right. The message ID needs to be unique.

This needs some further investigation.

To Reproduce

This came up in the mail example for discussion: https://github.com/wneessen/go-mail/discussions/73

Expected behaviour

A unique and random message id is to be generated for every message.

Screenshots

No response

Attempted Fixes

No response

Additional context

No response