| Author |  | 
      
        | talaattito Groupie
 
  
  
 Joined: 05 October 2011
 Location: Egypt
 Online Status: Offline
 Posts: 44
 | 
          please im used mailbee 7 and .net
           | Posted: 15 October 2012 at 6:06am | IP Logged |   |  
           | 
 |  when i send email to multiple recipients and use this line of code
 ==>> mailer.Message.ImportRelatedFiles(ImportRelatedFilesOptions.ImportFromUris)
 i find that import related files duplicated depend on numbers of recipients
 there is way to import related files only one time to all recipients and dont duplicate it
 ---im clear attachments for every message but this way take long time becouse in each time it import related files
 i hope you understand me
 thank you
 | 
       
        | Back to Top |     | 
       
       
        |  | 
        | Igor AfterLogic Support
 
  
 
 Joined: 24 June 2008
 Location: United States
 Online Status: Offline
 Posts: 6168
 | 
          I have tried reproducing the problem with the latest DLL build, the HTML file I used was extremely minimal:
           | Posted: 16 October 2012 at 3:30am | IP Logged |   |  
           | 
 |  
 
 
| Code: 
 
    
    | 
      
       | <html><head><title>Import Test</title></head><body> <img src="http://www.afterlogic.com/files/oe.png">
 </body></html>
 |  |  |  
 and the code I used is as follows:
 
 
 
| Code: 
 
    
    | 
      
       | Smtp mailer = new Smtp(); mailer.SmtpServers.Add("mail.domain.com", "user@domain.com", "password");
 mailer.Message.LoadBodyText(@"C:\test\img.html", MessageBodyType.Html, System.Text.Encoding.Default, ImportBodyOptions.ImportRelatedFiles | ImportBodyOptions.ImportRelatedFilesFromUris);
 mailer.Subject = "Import Test";
 mailer.From.AsString = "user@domain.com";
 mailer.To.AddFromString("user@domain.com");
 mailer.Cc.AddFromString("admin@domain.com");
 mailer.Send();
 |  |  |  
 Duplication is not confirmed. If you have any idea how the above sample should be modified to replicate the problem, please let us know.
 
 --
 Regards,
 Igor, AfterLogic Support
 | 
       
        | Back to Top |     | 
       
       
        |  | 
        | talaattito Groupie
 
  
  
 Joined: 05 October 2011
 Location: Egypt
 Online Status: Offline
 Posts: 44
 | 
          sorry i mean if i send bulk of mails
           | Posted: 16 October 2012 at 5:51am | IP Logged |   |  
           | 
 |  i used for loop to send emails
 this is for loop code
 =====================================================
 For SendEmails.i = 1 To ToMails.Count
 AddEmailAsJob(mailer)
 Next i
 mailer.SendJobs()
 Sub AddEmailAsJob(ByVal mailer As Smtp)
 Try
 Dim f As Integer
 Dim s As String = i.ToString("0000000") '1 -> "0000001".
 mailer.Message.From.AsString = "im@yahoo.com"
 mailer.Message.ReplyTo.AsString = "im@yahoo.com"
 mailer.Message.To.AsString = "to@yahoo.com"
 mailer.Message.Priority = MailPriority.Highest
 mailer.Message.Subject = "subject"
 mailer.Message.Charset = "utf-8"
 mailer.Message.BodyHtmlText = "BodyMail"
 mailer.Message.ImportRelatedFiles  (ImportRelatedFilesOptions.ImportFromUris)
 mailer.AddJob(s, Nothing, Nothing)
 End Sub
 ========================================
 in this case if i send 3 mails ImportRelatedFiles  duplicate 3 times
 there is way to ImportRelatedFiles  on the first time only for all mails
 thank you
 | 
       
        | Back to Top |     | 
       
       
        |  | 
        | talaattito Groupie
 
  
  
 Joined: 05 October 2011
 Location: Egypt
 Online Status: Offline
 Posts: 44
 | 
          
           | Posted: 16 October 2012 at 5:56am | IP Logged |   |  
           | 
 |  
| talaattito wrote: 
 
    
    | 
      
       | sorry i mean if i send bulk of mails i used for loop to send emails
 this is for loop code
 =====================================================
 For SendEmails.i = 1 To ToMails.Count
 AddEmailAsJob(mailer)
 Next i
 mailer.SendJobs()
 Sub AddEmailAsJob(ByVal mailer As Smtp)
 Dim f As Integer
 Dim s As String = i.ToString("0000000") '1 -> "0000001".
 mailer.Message.From.AsString = "im@yahoo.com"
 mailer.Message.ReplyTo.AsString = "im@yahoo.com"
 mailer.Message.To.AsString = "to@yahoo.com"
 mailer.Message.Priority = MailPriority.Highest
 mailer.Message.Subject = "subject"
 mailer.Message.Charset = "utf-8"
 mailer.Message.BodyHtmlText = "BodyMail"
 mailer.Message.ImportRelatedFiles  (ImportRelatedFilesOptions.ImportFromUris)
 mailer.AddJob(s, Nothing, Nothing)
 End Sub
 ========================================
 in this case if i send 3 mails ImportRelatedFiles  duplicate 3 times
 there is way to ImportRelatedFiles  on the first time only for all mails
 thank you
 |  |  |  | 
       
        | Back to Top |     | 
       
       
        |  | 
        | Igor AfterLogic Support
 
  
 
 Joined: 24 June 2008
 Location: United States
 Online Status: Offline
 Posts: 6168
 | 
          Not sure why you'd need to import files in the loop, I'd suggest to do that outside of the loop. If that, however, is absolutely necessary for some reason, you can either clear attachments collection or reset the message itself.
           | Posted: 16 October 2012 at 5:57am | IP Logged |   |  
           | 
 |  
 --
 Regards,
 Igor, AfterLogic Support
 | 
       
        | Back to Top |     | 
       
       
        |  | 
        | talaattito Groupie
 
  
  
 Joined: 05 October 2011
 Location: Egypt
 Online Status: Offline
 Posts: 44
 | 
          if i do that outside the loop the  import files not attached in email
           | Posted: 16 October 2012 at 6:09am | IP Logged |   |  
           | 
 |  please where i place the code of import files outside loop
 give me sample please, i wait you
 thank you
 | 
       
        | Back to Top |     | 
       
       
        |  | 
        | Igor AfterLogic Support
 
  
 
 Joined: 24 June 2008
 Location: United States
 Online Status: Offline
 Posts: 6168
 | 
          Oh, I missed the point that you use SendJobs there, not a regular loop. And in that case, using Attachments.Clear or Message.Reset methods are the only option, especially if there are different files for different recipients.
           | Posted: 16 October 2012 at 6:18am | IP Logged |   |  
           | 
 |  
 --
 Regards,
 Igor, AfterLogic Support
 | 
       
        | Back to Top |     | 
       
       
        |  | 
        | Shakhawat Newbie
 
  
 
 Joined: 01 November 2012
 Location: United States
 Online Status: Offline
 Posts: 1
 | 
          Can you help me to open a Hotmail account. How to open it?
           | Posted: 01 November 2012 at 4:21am | IP Logged |   |  
           | 
 |  | 
       
        | Back to Top |       | 
       
       
        |  | 
        | Igor AfterLogic Support
 
  
 
 Joined: 24 June 2008
 Location: United States
 Online Status: Offline
 Posts: 6168
 | 
          Depends on what exactly you mean by "open an account". If you need to access your hotmail / live.com account via POP3 or SMTP with MailBee.NET Objects, supply pop3.live.com or smtp.live.com respectively for mail server hostname, MailBee will automatically configure the port number and SSL/TLS settings.
           | Posted: 01 November 2012 at 4:30am | IP Logged |   |  
           | 
 |  
 --
 Regards,
 Igor, AfterLogic Support
 | 
       
        | Back to Top |     | 
       
       
        |  |