Author |
|
loredano Newbie
Joined: 11 April 2018 Location: Italy
Online Status: Offline Posts: 15
|
Posted: 13 April 2018 at 1:26am | IP Logged
|
|
|
Hi,
I can only set the domain part of the message-id using the method MailMessage. SetUniqueMessageID ?
In multitask sending email using mailer.SendJobsAsync (on mailer object for each smtp server) if i use mailer.JobsSuccessful I can obtain the message-id assigned by mailbee object or assigned by smtp server used?
This question because I need some unique value of the message in order to update the database info after sent messages successfully?
|
Back to Top |
|
|
Alex AfterLogic Support
Joined: 19 November 2003
Online Status: Offline Posts: 2206
|
Posted: 13 April 2018 at 4:32am | IP Logged
|
|
|
Hi,
If you subscribe to Smtp.MessageSent event for each Smtp instance, you can then read MessageID assigned to each message. This event gives you access to the message just sent (in SmtpMessageSentEventArgs parameters), and you can take MessageID from there.
BTW, Message-IDs are anyway unique if this is your only concern.
Regards,
Alex
|
Back to Top |
|
|
loredano Newbie
Joined: 11 April 2018 Location: Italy
Online Status: Offline Posts: 15
|
Posted: 04 May 2018 at 3:32am | IP Logged
|
|
|
OK thanks,
but can I only set the domain part of the message-id using (Smtp mailer1 = new Smtp()) the method: mailer1.Message.SetUniqueMessageID("mymessageID") ?
|
Back to Top |
|
|
Igor AfterLogic Support
Joined: 24 June 2008 Location: United States
Online Status: Offline Posts: 6104
|
Posted: 04 May 2018 at 3:41am | IP Logged
|
|
|
If you use SetUniqueMessageID method, the value of Message-ID is random, except for the domain you specify. You can set complete Message-ID yourself using MailMessage.MessageID property.
--
Regards,
Igor, Afterlogic Support
|
Back to Top |
|
|
Igor AfterLogic Support
Joined: 24 June 2008 Location: United States
Online Status: Offline Posts: 6104
|
Posted: 04 May 2018 at 3:43am | IP Logged
|
|
|
Also, if you assign Message-ID explicitly, be sure to set MailMessage.Builder.SetMessageIDOnSend to false.
--
Regards,
Igor, Afterlogic Support
|
Back to Top |
|
|