| Author | 
         | 
         
      
        
         
         lukapor Newbie 
          
 
  Joined: 21 June 2023 Location: Slovenia
 Online Status: Offline Posts: 3
          | 
        
         
          
           | Posted: 21 June 2023 at 3:34am | IP Logged
		     | 
                    
            		  
           | 
           
          
           
  | 
           
          
That was tested by library MailBee.NET version 12.3.1
 
 in eml was property from formated like this
 From: =?utf-8?Q?=20E-Signature via Docu?= ,--<info@info.com>
 
 Loading eml was succeded but in propety From I got 
 From.Email = "E-Signature via Docu"
 From.DisplayName =  null
 
 excepted value should be
 From.Email = "info@info.com"
 From.DisplayName =  "E-Signature via Docu"
 
 
         | 
       
       
        | Back to Top | 
         
          
         | 
       
       
       
        |   | 
      
        
         
         Alex AfterLogic Support 
          
  
  Joined: 19 November 2003
 Online Status: Offline Posts: 2207
          | 
        
         
          
           | Posted: 21 June 2023 at 3:46am | IP Logged
		     | 
                    
            		  
           | 
           
          
           
  | 
           
          
Hi,
 
 That's incorrect formatting. Putting this From value into .EML and opening the resulting email in Mozilla Thunderbird shows some weird results.
 
 This is because "," (comma) separates email addresses. If you remove the comma, the results could be different.
 
 Regards,
 Alex
         | 
       
       
        | Back to Top | 
         
          
         | 
       
       
       
        |   | 
      
        
         
         lukapor Newbie 
          
 
  Joined: 21 June 2023 Location: Slovenia
 Online Status: Offline Posts: 3
          | 
        
         
          
           | Posted: 21 June 2023 at 7:33am | IP Logged
		     | 
                    
            		  
           | 
           
          
           
  | 
           
          
Thats correct from can be email address list.
 
 One question.
 From property should be EmailAddressCollection. (same type as To property)
 
 maybe
 From should be populate as first valid email address?
         | 
       
       
        | Back to Top | 
         
          
         | 
       
       
       
        |   | 
      
        
         
         Alex AfterLogic Support 
          
  
  Joined: 19 November 2003
 Online Status: Offline Posts: 2207
          | 
        
         
          
           | Posted: 21 June 2023 at 8:57am | IP Logged
		     | 
                    
            		  
           | 
           
          
           
  | 
           
          
Well, you can try something like
 
Code: 
   
    
    
      
       
 // Just an example of how eac can be initialized. You probably already have that object.
 EmailAddressCollection eac = new EmailAddressCollection("=?utf-8?Q?=20E-Signature via Docu?= ,--<info@info.com>"); 
 foreach (EmailAddress addr in eac)
 {
      if (Smtp.ValidateEmailAddressSyntax(addr.Email))
      {
           msg.From = addr;
      }
 }
  | 
       
       | 
    
    | 
 
 
 
 So it iterates through email list and finds that one which is a real email address, and uses it then.
 
 Regards,
 Alex
         | 
       
       
        | Back to Top | 
         
          
         | 
       
       
       
        |   | 
      
        
         
         Alex AfterLogic Support 
          
  
  Joined: 19 November 2003
 Online Status: Offline Posts: 2207
          | 
        
         
          
           | Posted: 21 June 2023 at 8:58am | IP Logged
		     | 
                    
            		  
           | 
           
          
           
  | 
           
          
You can add 'break' statement to always use the first valid found address. But I guess there will be just the one anyway.
 
 Regards,
 Alex
         | 
       
       
        | Back to Top | 
         
          
         | 
       
       
       
        |   | 
      
        
         
         lukapor Newbie 
          
 
  Joined: 21 June 2023 Location: Slovenia
 Online Status: Offline Posts: 3
          | 
        
         
          
           | Posted: 21 June 2023 at 2:28pm | IP Logged
		     | 
                    
            		  
           | 
           
          
           
  | 
           
          
Thx 
 
 Regards,
 Luka
         | 
       
       
        | Back to Top | 
         
          
         | 
       
       
       
        |   |