This topic is locked

email

10/30/2007 12:51:24 AM
ASPRunnerPro General questions
N
nickb author

I everyone. I've just downloaded ASP Runner. It's amazing. I've been able to do almost everything I had to do in a couple of hours. I had know previous knowledge of ASP before. I wanted to a couple of small things but now, since it's that easy, i'm in for big.
But, there is a but, i need help with email.
I want to create a button on the edit page that will open up Outlook with the email adress, the subject already written in the correct sections. I navigate through the forum and came across the piece of code which is not working for me. Here is the code :
Sub EditOnLoad()
str = "select * from TableName where " & where

Set rsTemp = server.CreateObject("ADODB.Recordset")

rsTemp.open str, dbConnection

Response.write "<a href=""mailto:" & rsTemp("email") & "?subject=Yoursubject&body=yourbody "">Click to send record info!</a>"
End Sub
I get an error -2147217900 [Microsoft][ODBC SQL Server Driver][SQL Server]Incorrect syntax near 'where'.
Is it fixable...
Or maybe since i made the email adress appears as a link, would it be easier to modify that link... I still prefer the button idea, but could live with the modified link.
Anyone has a solution for a future brilliant ASP programmer (thanks ASPRunner)
Thanks

Sergey Kornilov admin 10/30/2007

Here is the code that works. Make sure you put real table and field names there.

str = "select * from Cars where ID = " & Request("editid1")

Set rsTemp = server.CreateObject("ADODB.Recordset")

rsTemp.open str, dbConnection

Response.write "<a href=""mailto:" & rsTemp("Email") & "?subject=Yoursubject&body=yourbody "">Click to send record info!</a>"

N
nickb author 10/31/2007

thanks a lot. It did work.
I made a modification, but it doesn't work. I wanted to replace the text link with an image. Here's what i did
str = "select * from Cars where ID = " & Request("editid1")

Set rsTemp = server.CreateObject("ADODB.Recordset")

rsTemp.open str, dbConnection

Response.write "<a href=""mailto:" & rsTemp("Email") & "?subject=Yoursubject&body=yourbody ""><img border="0" src="../../Images/email.jpg"></a>"
Of course, i didn't work...

Sergey Kornilov admin 10/31/2007

You need to explain what exactly didn't work and where I can see it.
I recommend to post your application to the Demo Account (last tab in ASPRunnerPro) and send the URL to support@xlinesoft.com.

N
nickb author 10/31/2007

I get an error
Microsoft VBScript compilation error '800a03f2'
Expected identifier
/xnet/Soumissions/nouvelle/include/Soumission_events.asp, line 43
Response.write "<a href=""mailto:" & rsTemp("courriel") & "?subject=Votre demande à été traité&body=Vous pouvez consultez votre demande à l'adresse http://www.website.com/soumission/result.asp?No="& rsTemp("No") &" ""><src="../../Images/email.jpg"></a>"

--------------------------------------------------------------------------------------------------------^
Maybe it has something to do with specifying it's an image. But what and where to put it?

N
nickb author 10/31/2007

basically what i want to do is to replace the text : Click to send record info! by the image _../../Images/email.jpg_
the main reason is that i used a template with a brown background and we don't see the text clearly enough.
can it be done
thanks

Sergey Kornilov admin 10/31/2007

Sure, this can be done.
Please follow my advise.

N
nickb author 10/31/2007

I have done it but when it comes to verifying my email (by clicking the link in your email) this is what i get :
Account is not verified. Please try again

Sergey Kornilov admin 10/31/2007

This is an automated email which I have no idea what account is yours.
That's why you need to contact support team directly at support@xlinesoft.com.

N
nickb author 10/31/2007

Posted at support@xlinesoft.com

Sergey Kornilov admin 11/1/2007

Answered to your email.