| Author |  | 
      
        | boranin Newbie
 
  
 
 Joined: 29 September 2007
 Location: New Zealand
 Online Status: Offline
 Posts: 32
 | 
          Could you please give us full (VB) function for "MD5Digest(Message-ID)" as used in MailMessage.GetHtmlAndSaveRelatedFiles Method when Dynamic mode used?
           | Posted: 22 February 2008 at 11:37pm | IP Logged |   |  
           | 
 |  Regards,
 Alex
 
 | 
       
        | Back to Top |     | 
       
       
        |  | 
        | Alex AfterLogic Support
 
  
  
 Joined: 19 November 2003
 Online Status: Offline
 Posts: 2207
 | 
          Internally, we call CreateMD5Digest(message.MessageID). CreateMD5Digest is defined as follows (actually, C#, as MailBee.NET is written in C#):
           | Posted: 23 February 2008 at 8:48am | IP Logged |   |  
           | 
 |  
 
| 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
 | 
          Thanks for the code. It has been very helpfull.
           | Posted: 24 February 2008 at 3:48am | IP Logged |   |  
           | 
 |  Regards,
 Alex
 | 
       
        | Back to Top |     | 
       
       
        |  |