Sending mail but not message id

I get interesting deviations from my clients mail server when sending mail with indy-10 tidMessage component saying:

550 Rejected: message does not contain message identifier

I get this even when using my own indy demo application

http://www.indyproject.org/DemoDownloads/Indy_10_MailClient.zip

what should i do to fix it. thank!

+3
source share
2 answers

TIdMessage in Indy 10 intentionally skips the "Message-Id" header when encoding email to a socket or TStream. You will need to use the TIdMessage.ExtraHeaders property, for example:

IdMessage1.MsgId := ...';
IdMessage.ExtraHeaders.Values['Message-Id'] := IdMessage1.MsgId;

EDIT:

- TIdMessage , "Message-ID" "In-Reply-To":

http://indyproject.org/sockets/blogs/changelog/20160912.aspx

TIdMessage.MsgId "Message-ID" , , . ExtraHeaders.

+4

Indy9, , 10:

    procedure AddMsgID(AMsg: TIdMessage);
    var
      id: AnsiString;
    begin
      id := GenerateUniqueMsgID;
      AMsg.MsgId := id;
      AMsg.AddHeader('Message-ID=' + id);
      // AMsg.ExtraHeaders.Values['Message-ID'] := id;
    end; // AddMsgID
+6

Source: https://habr.com/ru/post/1781392/


All Articles