Results 1 to 3 of 3
  1. #1
    Join Date
    Nov 2008
    Posts
    1

    Unanswered: Tricky E-mail Function

    Hi,
    I have created a database of contacts which I'm hoping to also use for sending out my e-mail list. My basic idea is that I use the mail function to send to any contacts that have an e-mail address. I'm sure this is quite do-able but I have one problem. My server has a limit of sending 100 e-mails at any one time. This is to stop SPAM being sent out from the server. This would also mean though that if I wanted to send out e-mails I would need to send out in blocks of 100. For example, if there was 640 contacts. I would need to send 7 e-mails. 6 e-mails would send to 100 people each and the 7th would send to the remaining 40.

    I haven't started working on this aspect of the database yet but just wanted to find out whether people thought this might be possible to accomplish using Access. If not, does anyone else have any other solutions to using Access as a source for e-mail-out information.

    Cheers
    Russ

  2. #2
    Join Date
    Jan 2007
    Location
    UK
    Posts
    11,434
    Provided Answers: 10
    Should be possible; here's some pseudo-code to get you started
    Code:
    declare counter
    declare record_counter integer
    declare recipients string
    declare total_records integer
    
    Open recordset for email addresses from table
    
      set counter = 0
      set record_counter = 0
      set recipients_list = ""
      set total_records = count of records in recordset
    
      While Not end of recordset
    
        set recipients_list = recipients_list & email_address & "; "
        set counter = counter + 1
        
        If (counter >= 100) or (record_counter = total_records) Then
        
          sendemail to recipients_list
        
          set counter = 0
          set recipients_list = ""
        
        End If
        
        record_counter = record_counter + 1
    
      Go to next in recordset
    George
    Home | Blog

  3. #3
    Join Date
    Feb 2004
    Location
    New Zealand
    Posts
    1,424
    Provided Answers: 8
    also one thing to think about

    do you want to saveit in the Sent Items

    I wrote a bulk email send for our CMS the problem i had was they were attaching a big PDF and the mail box was full up with sent items so all i did was add the .DeleteAfterSubmit = Ture them send it and .DeleteAfterSubmit = False after the send.
    hope this help

    See clear as mud


    StePhan McKillen
    the aim is store once, not store multiple times
    Remember... Optimize 'til you die!
    Progaming environment:
    Access based on my own environment: DAO3.6/A97/A2000/A2003/A2007/A2010
    VB based on my own environment: vb6 sp5
    ASP based on my own environment: 5.6
    VB-NET based on my own environment started 2007
    SQL-2005 based on my own environment started 2008
    MYLE
    YOUR PASSWORD IS JUST LIKE YOUR TOOTHBRUSH DON'T SHARE IT.

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •