Author |
|
boranin Newbie
Joined: 29 September 2007 Location: New Zealand
Online Status: Offline Posts: 32
|
Posted: 22 February 2008 at 11:37pm | IP Logged
|
|
|
Could you please give us full (VB) function for "MD5Digest(Message-ID)" as used in MailMessage.GetHtmlAndSaveRelatedFiles Method when Dynamic mode used?
Regards,
Alex
|
Back to Top |
|
|
Alex AfterLogic Support
Joined: 19 November 2003
Online Status: Offline Posts: 2206
|
Posted: 23 February 2008 at 8:48am | IP Logged
|
|
|
Internally, we call CreateMD5Digest(message.MessageID). CreateMD5Digest is defined as follows (actually, C#, as MailBee.NET is written in C#):
Code:
private static string CreateMD5Digest(string paramValue)
{
StringBuilder result = new StringBuilder();
MD5 hash = new MD5CryptoServiceProvider();
byte [] hashBytes = hash.ComputeHash(Encoding.Default.GetBytes(paramValue));
foreach(byte b in hashBytes)
{
result.Append(b.ToString("X2", CultureInfo.InvariantCulture));
}
return result.ToString();
}
|
|
|
The code has no external dependencies on other classes of MailBee.NET Objects.
Regards,
Alex
|
Back to Top |
|
|
boranin Newbie
Joined: 29 September 2007 Location: New Zealand
Online Status: Offline Posts: 32
|
Posted: 24 February 2008 at 3:48am | IP Logged
|
|
|
Thanks for the code. It has been very helpfull.
Regards,
Alex
|
Back to Top |
|
|