www.webdeveloper.com
Results 1 to 4 of 4

Thread: Adding an Array to a Mail Function

  1. #1
    Join Date
    Jul 2004
    Posts
    61

    Adding an Array to a Mail Function

    Arraylist Into a Mail Function
    If I was going to store e-mail addresses in the arraylist, how would I unload them for use of sending an e-mail?

    e.g.
    Dim objMail As New System.Web.Mail.MailMessage()
    objMail.To = **?**

  2. #2
    Join Date
    Nov 2002
    Location
    Auburn, AL
    Posts
    9,222
    why are you using an array or array list though. If you pull them from the db just loop through the data set. If you pull them from the list box just loop through the list box. You array scheme seems to be adding an extra step.

  3. #3
    Join Date
    Jul 2004
    Posts
    61
    I'm using listbox1 that pulls all the e-mails from the database and then listbox2 is used for the e-mails I choose from listbox1. From there I chose to store the results in a arraylist. Is there an easier way? Do you know how to pull the results from the listbox?
    Have to probably add semicolons for each e-mail as well.

  4. #4
    Join Date
    Nov 2002
    Location
    Auburn, AL
    Posts
    9,222
    just do this

    loop listbox max val
    mail code to emailaddy.selecteditem.text
    emailaddy.selecteditem.value + 1
    end loop

    well thats the phseudo code anyway
    but selecteditem.value gives you the value, so just inctiment it in the loop. Then use the text for the email addresses.

Thread Information

Users Browsing this Thread

There are currently 1 users browsing this thread. (0 members and 1 guests)

Posting Permissions

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



Recent Articles