Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations IamaSherpa on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

multiple email addresses

Status
Not open for further replies.

aaronzimmer

Programmer
Aug 19, 2003
24
US
I've got an "email to friends" form on an eCard that I'm working on. Everything works fine between the fla movie and the asp server side scripting....except, in the form won't let the viewer enter multiple email addresses into the form. If you put in more than one, it doesn't send...

Anyone have any idea why that might be

Here's the link to the eCard:
 
just a wild guess

emails separated with commas

did you remember to split these into separate emails in the asp page or split them in flash and send multiple calls to the asp page

just i once forgot about the delimiter .....took me ages to spot it was the problem
 
Thanks for the help Bill, but...

How do I split the them into seperate emails either onthe asp page or in Flash?

And, whats the delimiter? Is that the problem? How do I fix it? I couldn't understand what you meant on your post.

Thanks a ton!!
 
in flash

lets the contents of the box are a variable called email
Code:
emailtoSend = email.split(",");
//so if there were 2 addresses then emailtosend is an array containing 2 items
for(i=0;i<emailtoSend.length;i++){
theMail = emailtoSend[i];
//add the other bits that make the call to the asp page
}
//for 2 addresses this would now result in 2 calls to the asp page each with 1 unique address and all the other bits.


hope thats a bit clearer

 
That helps a ton. But where do I put that script? I can't add an actionscript to the input text box itself.

 
add it in with the rest of your submit code...just modify what you already have to include something like the above

can you post what you currently have

 
Sure!

Here's what I have for the actionscript attached to the Submit button

on (release) {
loadVariablesNum(&quot;eCard.asp&quot;, &quot;&quot;, &quot;POST&quot;);
}
on (release) {
gotoAndStop(2);
}

And Here's what I have for the asp script:

<% @language=&quot;VBSCRIPT&quot; %>

<%

Dim myMail, myBody

myBody = &quot;From: &quot;& request.form(&quot;fromname&quot;) & vbcrlf
myBody = myBody & &quot;Email: &quot;& request.form(&quot;fromemail&quot;) & vbcrlf
myBody = myBody & &quot;Message: &quot;& vbcrlf & request.form(&quot;message&quot;) & vbcrlf
myBody = myBody & &quot;Go to to launch eCard!&quot;


Set myMail = CreateObject(&quot;CDONTS.NewMail&quot;)

myMail.BodyFormat=1
myMail.From=request.form(&quot;fromemail&quot;)
myMail.To=request.form(&quot;emailtoSend&quot;)
myMail.Subject=&quot;New Music eCard!&quot;
myMail.Body=myBody
myMail.Send

set myMail=nothing

%>


Whatchya think??
 
this will only work in mx

change the variable names to the ones you have

on (release){
lv = new Loadvars();
lv.message = message;
lv.name = name;
lv.email = email;
emailtoSend = friends.split(&quot;,&quot;);
for(i=0;i<emailtoSend.length;i++){
lv.friend = emailtoSend;
lv.sendAndLoad(&quot;eCard.asp&quot;, lv, &quot;POST&quot;);
}
}


 
I entered your actionscript exactly to the 'submit' button, and changed my vars (for each of the boxes) to match your script: Here's what I have

Your Name: name
Your Email: email
Your Friend's Email Addresses: emailtoSend
Message: message

But its still not working. Sorry to take up all your time, but can you tell what I'm doing wrong?
 
THis is frustrating!

I changed the var for 'YOur Frineds Email Addresses' to &quot;friends&quot;, but still nothing works.

 
well the flash side is now fine so the problem must lie with the asp which i dont know much about but if it worked before with 1 address then change all the variable names back to the original so they will match the asp variables

looking at the asp i something 'fromname' so if that was your earlier flash variable name

make it

lv.fromname = fromname

or alter the asp



 
still nothing.

THank you for the help though. YOu definately got me a lot farther than I would be on my own. I'll keep trying.
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top