Click to See Complete Forum and Search --> : How to pass variable to URL within SendMail strHTML


gorden
04-01-2005, 12:17 PM
I think the problem is merely syntactical and I've tried just about everything...

Here's the relevant part of the code:
(I'm building an HTML string to be built and sent as a CDOSYS email...

<% ' Submitter email

strAddress = TRIM(Request.Form("bnlauthem"))
strHTML = "<font face='Verdana' size='2'>A publication for Primary Author: xxxx has been assigned: <br><br>Publication Number: <font color='#800080'><b>" & v_publication_num_pr & "</b></font> and Accession Number: <font color='#800080'><b>" & v_accession_num & "</b></font><br><br><br><a href='http://xxx.xxx.xxx/isd/pubs/BC_meta.asp?pubnum=&v_publication_num_pr '</a>Metadata<br> "

SendMail strAddress, "Publication Submission", strHTML

Everythings a-ok except instead of the value of the variable v_publication_num_pr in the URL, the constant &v_publication_num_pr appears after ?pubnum:
http://xxx.xxx.xxx/isd/pubs/BC_meta.asp?pubnum=&v_publication_num_pr

How can I get the value passed to the URL?
Seems simple but...

phpnovice
04-01-2005, 12:57 PM
strHTML = ""
strHTML = strHTML & "<font face=""Verdana"" size=""2"">"
strHTML = strHTML & "A publication for Primary Author: xxxx has been assigned:<br>"
strHTML = strHTML & "<br>"
strHTML = strHTML & "Publication Number: <font color=""#800080""><b>" & v_publication_num_pr & "</b></font> "
strHTML = strHTML & "and Accession Number: <font color=""#800080""><b>" & v_accession_num & "</b></font><br>"
strHTML = strHTML & "<br><br>"
strHTML = strHTML & "<a href=""http://xxx.xxx.xxx/isd/pubs/BC_meta.asp?pubnum=&" & v_publication_num_pr & """</a> Metadata<br>"

gorden
04-01-2005, 01:18 PM
That's It!!! ...with one small change in the last line:

pubnum=" & v_publication_num_pr - remove the ampersand(&) after the '='

I am so very grateful for your response.
just fyi... The reason for this convoluted code is that it reflects data submitted to the submitter. The HREF link is used to set the variable to the next form by using request.QueryString. The email contains no form and neither a session/application variable is appropriate since email recipient will invoke a new session and the possibility for the application variable to change if another form is submitted by another user.

grateful for your reply...Pat

phpnovice
04-01-2005, 01:31 PM
pubnum=" & v_publication_num_pr - remove the ampersand(&) after the '='
Oopsie. :D