Forums
This topic is locked
Problems sending to multiple addresses with CDONTS
10 Jun 2004 23:27:11 _ _ posted:
Hi,I have a flash teaser that allows users to enter five friends names and e-mail them the a html page linking to the teaser. My problem is when I pass the variables (via POST) to my sendmail.asp page I am battling to extract all five addresses from the URL string.
objMail.To = Request.Querystring("email1" Request.Querystring("email2" Request.Querystring("email3" Request.Querystring("email4" Request.Querystring("email5"
I would expect this to extract the five e-mails from the Querystring and then send the HTML message to them but it gives me a "Expected end of statement" error.
Any help on this would be hugely appreciated
Gregg
Replies
Replied 12 Jun 2004 17:36:27
12 Jun 2004 17:36:27 Phil Shevlin replied:
show the code
Replied 13 Jun 2004 01:38:27
13 Jun 2004 01:38:27 _ _ replied:
objMail.From = request.Querystring("textfrom"
objMail.Subject = "Jocasta Rising Teaser"
'you need to add these lines FOR the mail to be sent in HTML format
objMail.BodyFormat = 0
objMail.MailFormat = 0
objMail.To = Request.Querystring("email1" Request.Querystring("email2" Request.Querystring("email3" Request.Querystring("email4" Request.Querystring("email5"
objMail.Body = HTML
objMail.Send
Response.write("Mail was Sent"
set objMail = nothing
objMail.Subject = "Jocasta Rising Teaser"
'you need to add these lines FOR the mail to be sent in HTML format
objMail.BodyFormat = 0
objMail.MailFormat = 0
objMail.To = Request.Querystring("email1" Request.Querystring("email2" Request.Querystring("email3" Request.Querystring("email4" Request.Querystring("email5"
objMail.Body = HTML
objMail.Send
Response.write("Mail was Sent"
set objMail = nothing
Replied 14 Jun 2004 14:37:46
14 Jun 2004 14:37:46 _ _ replied:
Hi,
This problem is still persisiting and my desperation levels are rising as my deadline is for today.
I would be most grateful to anyone who could help me troubleshoot htis problem
You can view what is happening at www.jocastarising.com/teasers/teaser.htm ... when you try to "send to friends" at the end it displays the error message...
Thanks in advance...
Gregg
Edited by - skabenga on 14 Jun 2004 14:41:54
This problem is still persisiting and my desperation levels are rising as my deadline is for today.
I would be most grateful to anyone who could help me troubleshoot htis problem
You can view what is happening at www.jocastarising.com/teasers/teaser.htm ... when you try to "send to friends" at the end it displays the error message...
Thanks in advance...
Gregg
Edited by - skabenga on 14 Jun 2004 14:41:54
Replied 14 Jun 2004 23:28:29
14 Jun 2004 23:28:29 Jack Cider replied:
Gregg,
Try giving all of your fields the same name ("email" for example). Then just change your code to this:
ObjMail.To = Request.Querystring("email"
Then I think it will grab everything named email from your form and it should then send to all addresses. I know this works with HTML forms and the Request.Form command, so I figure it's worth a shot for you. Hope this helps...
Jack
Try giving all of your fields the same name ("email" for example). Then just change your code to this:
ObjMail.To = Request.Querystring("email"
Then I think it will grab everything named email from your form and it should then send to all addresses. I know this works with HTML forms and the Request.Form command, so I figure it's worth a shot for you. Hope this helps...
Jack
Replied 15 Jun 2004 11:25:41
15 Jun 2004 11:25:41 _ _ replied:
Thanks Jack...
Still no luck though...
What happens is that becasue all five fields are named the same in flash... when I type in one the other four immediately pick up the first ones info... if you check the link above you will see what I mean... also now in the URL there is only one e-mail for the sendmail.asp to extract and send to...
Any other ideas??
Still no luck though...
What happens is that becasue all five fields are named the same in flash... when I type in one the other four immediately pick up the first ones info... if you check the link above you will see what I mean... also now in the URL there is only one e-mail for the sendmail.asp to extract and send to...
Any other ideas??
Replied 07 Jul 2004 18:33:40
07 Jul 2004 18:33:40 Lee Diggins replied:
Hi
Try this
objMail.To = Request.Form("email1" & "; " & Request.Form("email2" & "; " & Request.Form("email3" & "; " & Request.Form("email4" & "; " & Request.Form("email5"
You don't use querystring with POST, that's GET and you must concatenate like above
Digga
Sharing Knowledge Saves Valuable Time!!!
Try this
objMail.To = Request.Form("email1" & "; " & Request.Form("email2" & "; " & Request.Form("email3" & "; " & Request.Form("email4" & "; " & Request.Form("email5"
You don't use querystring with POST, that's GET and you must concatenate like above
Digga
Sharing Knowledge Saves Valuable Time!!!
Replied 08 Jul 2004 00:29:55
08 Jul 2004 00:29:55 Rene Bandsma replied:
I think the solution should be something like this:
<pre id=code><font face=courier size=2 id=code>
objMail.To = "" & request.querystring("email1" & "; " & request.querystring("email2" ..........etc.
</font id=code></pre id=code>
<pre id=code><font face=courier size=2 id=code>
objMail.To = "" & request.querystring("email1" & "; " & request.querystring("email2" ..........etc.
</font id=code></pre id=code>
Replied 08 Jul 2004 11:00:29
08 Jul 2004 11:00:29 Lee Diggins replied:
Except skabenga says......
<BLOCKQUOTE id=quote><font size=1 face="Verdana, Arial, Helvetica" id=quote>quote:<hr height=1 noshade id=quote>I have a flash teaser that allows users to enter five friends names and e-mail them the a html page linking to the teaser. My problem is when I pass the variables (via POST) to my sendmail.asp page I am battling to extract all five addresses from the URL string. <hr height=1 noshade id=quote></BLOCKQUOTE id=quote></font id=quote><font face="Verdana, Arial, Helvetica" size=2 id=quote>
......so must use Request.Form not Request.QueryString
Digga
Sharing Knowledge Saves Valuable Time!!!
<BLOCKQUOTE id=quote><font size=1 face="Verdana, Arial, Helvetica" id=quote>quote:<hr height=1 noshade id=quote>I have a flash teaser that allows users to enter five friends names and e-mail them the a html page linking to the teaser. My problem is when I pass the variables (via POST) to my sendmail.asp page I am battling to extract all five addresses from the URL string. <hr height=1 noshade id=quote></BLOCKQUOTE id=quote></font id=quote><font face="Verdana, Arial, Helvetica" size=2 id=quote>
......so must use Request.Form not Request.QueryString
Digga
Sharing Knowledge Saves Valuable Time!!!