Results 1 to 4 of 4

Thread: Help rewrite this code please

  1. #1

    Thread Starter
    PowerPoster
    Join Date
    Jan 2001
    Location
    Florida
    Posts
    3,216
    How would you rewrite this code so that the it sends one email receipt to the sender with the 6 emails, represented by the array

    Code:
    MyEmail(Count)
    written as well?

    The way it is now the sender gets 6 separate emails with one email on each email sent.

    To test and see what I am doing go to

    http://www.whoisthisjesus.tv
    look on the bottom for email this site to a friend.

    thanks

  2. #2
    Addicted Member dmr's Avatar
    Join Date
    Jul 2000
    Location
    West-Germany :) Timezone: GMT +1 [DST] North.......: 52° 16’ 09” East...: 10° 31’ 16”
    Posts
    255
    in perl you'd do it like this:

    for (my $i = 0; $i < $count; $i++) {
    # your stuff

    }

    in vb it would be like this:

    for i = 1 to Count
    'your stuff

    next



    Hope this helps,
    Dennis.
    Code that I author is neither elegant nor efficient. It is, however, functional. Once I get something that works, I'm generally satisfied with myself - I mean, if it works, that's good enough, right?

    Originally posted by aknisely
    Sorry, but I feel uncomfortable on CC with clothes on
    __________________
    The truth ... is out there!

  3. #3

    Thread Starter
    PowerPoster
    Join Date
    Jan 2001
    Location
    Florida
    Posts
    3,216
    duh I forgot to paste the code

    Code:
    '--sends confirmation email to sender
    	Dim wwit
    	wwit = "www.WhoIsThisJesus.tv"
    
    	For Count= 0 To 5
    		If MyEmail(Count) <> "" AND AllOk = 0 Then
    			'Set objCDO2 = Server.CreateObject("CDO.Message")
    			Set objCDO2 = Server.CreateObject("CDONTS.NewMail")
    				objCDO2.From = "[email protected]"
    				objCDO2.To = SenderEmail 
    						txtSubject2 = VBCrlf & VBCrlf & "The following email has been sent to the recipients listed below." & _
    						VBCrlf & MyEmail(Count) & _
    						VBCrlf & VBCrlf & "You have received an invitation from " & SenderEmail & " to visit " & wwit & _
    						VBCrlf & "Watch 'Who Is This Jesus: Is He Risen?' TV special Easter weekend.  This expanded version of the Christmas broadcast of Who Is This Jesus?, which was seen by more " & _
    						"than 12 million people during the Christmas holiday, includes new material never before aired. Hosted by well-known television pastor Dr. D. James Kennedy and popular " & _
    						"actor Dean Jones, this powerful primetime production features experts from Westminster Abbey, Harvard, Notre Dame, Vanderbilt, the Jesus Seminar, and Princeton. Who Is " & _
    						"This Jesus: Is He Risen? takes viewers through the maze of theories offered to explain or explain away the resurrection of Jesus Christ. And it leads them to what for millions " & _
    						"is an inescapable conclusion. Click here for local listings! " & wwit & _
    						VBCrlf & VBCrlf & "Watch for our Live Online Chat on April 13-15!"
    				objCDO2.Subject = "Confirmation Email from WhoIsThisJesus.tv" 
    				'objCDO2.TextBody = txtSubject2
    				objCDO2.Body = txtSubject2
    				objCDO2.Send
    			Set objCDO2 = nothing  
    		End If  		
       	Next

  4. #4

    Thread Starter
    PowerPoster
    Join Date
    Jan 2001
    Location
    Florida
    Posts
    3,216
    any ideas?

Posting Permissions

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



Click Here to Expand Forum to Full Width