Search The ForumSearch   RegisterRegister  LoginLogin

MailBee.NET SMTP

 AfterLogic Forum : MailBee.NET SMTP
Subject Topic: MailMessage SetUniqueMessageID Post ReplyPost New Topic
Author
Message << Prev Topic | Next Topic >>
loredano
Newbie
Newbie
Avatar

Joined: 11 April 2018
Location: Italy
Online Status: Offline
Posts: 15
Posted: 13 April 2018 at 1:26am | IP Logged Quote loredano

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 View loredano's Profile Search for other posts by loredano
 
Alex
AfterLogic Support
AfterLogic Support
Avatar

Joined: 19 November 2003
Online Status: Offline
Posts: 2206
Posted: 13 April 2018 at 4:32am | IP Logged Quote Alex

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 View Alex's Profile Search for other posts by Alex
 
loredano
Newbie
Newbie
Avatar

Joined: 11 April 2018
Location: Italy
Online Status: Offline
Posts: 15
Posted: 04 May 2018 at 3:32am | IP Logged Quote loredano

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 View loredano's Profile Search for other posts by loredano
 
Igor
AfterLogic Support
AfterLogic Support


Joined: 24 June 2008
Location: United States
Online Status: Offline
Posts: 6104
Posted: 04 May 2018 at 3:41am | IP Logged Quote Igor

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 View Igor's Profile Search for other posts by Igor
 
Igor
AfterLogic Support
AfterLogic Support


Joined: 24 June 2008
Location: United States
Online Status: Offline
Posts: 6104
Posted: 04 May 2018 at 3:43am | IP Logged Quote Igor

Also, if you assign Message-ID explicitly, be sure to set MailMessage.Builder.SetMessageIDOnSend to false.

--
Regards,
Igor, Afterlogic Support
Back to Top View Igor's Profile Search for other posts by Igor
 

If you wish to post a reply to this topic you must first login
If you are not already registered you must first register

  Post ReplyPost New Topic
Printable version Printable version

Forum Jump

Powered by Web Wiz Forums version 7.9
Copyright ©2001-2004 Web Wiz Guide