Web Wiz - Green Windows Web Hosting

  New Posts New Posts RSS Feed - send email issue
  FAQ FAQ  Forum Search   Events   Register Register  Login Login

send email issue

 Post Reply Post Reply
Author
radujit View Drop Down
Newbie
Newbie


Joined: 12 May 2011
Status: Offline
Points: 2
Post Options Post Options   Thanks (0) Thanks(0)   Quote radujit Quote  Post ReplyReply Direct Link To This Post Topic: send email issue
    Posted: 12 May 2011 at 7:37pm

Hi,
I have this newsletter code, that takes emails from the recordset Tonews and sends a specific message + attach

dim cdoConfig
Set cdoConfig = CreateObject("CDO.Configuration")
With cdoConfig.Fields 
        .Item(cdosmtpserverport) = 26
        .Item(cdoSendUsingMethod) = 2
        .Item(cdoSMTPServer) = smtpserver
        .Item(cdoSMTPAuthenticate) = 1 
        .Item(cdoSendUsername) = musername
        .Item(cdoSendPassword) = mpassword
        .Update 
    End With
dim cdoMessage   

do while not Tonews.eof
    Set cdoMessage = CreateObject("CDO.Message") 
 
    With cdoMessage
        Set .Configuration = cdoConfig
        .From =  " mailto:ra@iisconsult.ro - raport@iisconsult.ro"
  .To = Tonews("email")
  .Subject = Session("title")  
        .HTMLBody = msg
         if  Session("attach") <> "" then
    .AddAttachment  "D:\Inetpub\wwwroot\iis2\upload" &  Session("attach")
 end if
  
.Send
     End With 
   Set cdoMessage = Nothing 
    Tonews.MoveNext
loop

    Set cdoConfig = Nothing

Everything works fine, except that the email is transmitted twice to each receipient.

So I would like to help modify my code so that:
1. send message only once
2. split the recordset considering the following mail server restrictions:
- A mail box can't send more that 50 emails within 10 minutes.
- A mail box can' send an email to more that 30 recipients in each sending process.
- if are more than 1000 messages sent to swith to another account.

Thank you.

Back to Top
 Post Reply Post Reply

Forum Jump Forum Permissions View Drop Down

Forum Software by Web Wiz Forums® version 12.08
Copyright ©2001-2026 Web Wiz Ltd.


Become a Fan on Facebook Follow us on X Connect with us on LinkedIn Web Wiz Blogs
About Web Wiz | Contact Web Wiz | Terms & Conditions | Cookies | Privacy Notice

Web Wiz is the trading name of Web Wiz Ltd. Company registration No. 05977755. Registered in England and Wales.
Registered office: Web Wiz Ltd, Unit 18, The Glenmore Centre, Fancy Road, Poole, Dorset, BH12 4FB, UK.

Prices exclude VAT at 20% unless otherwise stated. VAT No. GB988999105 - $, € prices shown as a guideline only.

Copyright ©2001-2026 Web Wiz Ltd. All rights reserved.