Experts any ideas?

Results 1 to 2 of 2

Thread: Experts any ideas?

  1. #1
    Join Date
    Dec 1969

    Default Experts any ideas?

    1)Have about 4000+ emailaddress in table with different dates.<BR>2)I have .vbs file to run at 2am every day (.vbs article from 4guys :)<BR>3).VBS file loops through each record , takes date and sends 1 of 7 pre defined emails based on signed up yesterday you get email #2, signedup day before yesterday you get email #3...etc<BR>4)I use;s email component to use the queueing (helps with load?) method and it sends a copy to sent folder.(tracking)<BR>5)In sent folder it has about 1100 emails that were sent.<BR>6)Looking at the schedule task it says, .vbs file is still running about 6hours later, but no emails are being sent.<BR>7).VBS file has main function which loops through records and calls sendmail function(on same page).<BR>8)Sendmail function first finds correct pre-defined email to go out by stored proc. (pre-defind email in other table) then sends email to queue to be sent. <BR>Any ideas on whats going on here? Why is it getting hung up? Should I destroy and recreate the connection each time? Maybe connection time out? I&#039;m guessing that it loops through each record fast, but the send mail function is too slow to keep up?, but why would it say still running, like it is still looping? What happens when it loops that fast and the other function those mailing functions?<BR>Thanks<BR>KIMY

  2. #2
    Join Date
    Dec 1969

    Default RE: Experts any ideas?

    Hi,<BR><BR>This is a clear case of threading defeciencies in vbs.<BR><BR>The following should get you out of the problem<BR><BR>Insert a doevents() after the sendmail function.<BR><BR>This would allow the vbs thread to hold on until the sendmail actually hands over the mail to the queue.<BR><BR>Also it would be wise to analyse what mail server you are using for sending out these mails. I dont know whether you are running any SMTP server locally or whether you are using any outside SMTP server.<BR><BR>There are chances that the SMTP server is refusing the acceptance of these mails for various reasons like unknown sender or unknown recipient etc.<BR><BR>You can do some error checking by checking out the response of Sendmail function before moving on to the next mail. May be this would help you make corrections to your code or change the mail server itself.<BR><BR>Thanks<BR><BR>Nilesh Deshpande<BR>Look at my work at<BR><BR><BR>

Posting Permissions

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