Someone has asked me to make a webform with the following functionality:
Input text boxes for customer name, customer email address.
10 Input boxes for 5 names and 5 email addresses of friends
Ability to send an email to those 5 friends, where the content is the same, but the emails say Dear Jane, ..... From Julie, another with Dear Alice, ......from Julie
I can send the email by picking up the 5 email addresses and putting them in a BCC list separated by commas. But I have to send one email personalized for each of the 5 people. I'm having trouble knowing how to start iterating thru the email addresses. (I think I can pick up the names once I learn what procedure to use)
I've created each of the 5 email address fields like this:
<input type="text" name="txtToAddress" size="40" value="" id="1">
and given them an id of 1-5.
The software sends one email like the following and I can get it to work when I send to all the BCCs, but I need send up to 5 separate emails with one submit button:
cbNotifier.SendMail(objToken, sValidAddresses, txtFromAddress, txtToAddress, txtCCList, txtBCCList, txtSubject, txtBody, false)