This topic is locked
[SOLVED]

 Include hyperlink with events driven email

9/20/2010 5:30:30 PM
ASPRunnerPro General questions
C
cordaco author

Please some HELP!!!!
In some of my tables I have links to my customers proofs. I have set up using the Event page to automatically send a notice the proof is ready to view. What I would really like to email to do is actually send an email with a link to the proof. I have tried everything I know, but obviously I don't know much.
Here is the current script being used.
'** Send simple email ****

' do not forget to setup email parameters like From, SMTP server etc

' on 'Security->User login settings' dialog
email="info@csquaremultimedia.com"

email2 = rs("Email")

message = rs("Business")

message2="Your contact information was displayed to a potential customer in the Local Directory of www.resourceliving.com"; & vbcrlf & vbcrlf & "This email is only a notification to help you identify any calls you may receive due to this view" & vbcrlf & vbcrlf & "Best regards"

Subject="Partner Displayed"

subject2="Resource Living Partner Displayed"

sendmail email, subject, message

sendmail email2, subject2, message2

Sergey Kornilov admin 9/20/2010

Which event do you use the send this email and how sample link looks like?

C
cordaco author 9/21/2010



Which event do you use the send this email and how sample link looks like?


Visit http://www.resourceliving.com/dbLiving/Local_Directory_view.asp?editid1=126 and view the image which, on the table, is under field "Advertisement". I would like for the current "Events" driven email to include a hyperlink to this image on my server.
I really plan to implement this to another page, but the table will be the same. The current event I am using VIEW PAGE: BEFORE DISPLAY, but I plan to use the code for other events.

Sergey Kornilov admin 9/21/2010

If I understand it right you need to get the current View page URL in View page: Before process event.
Here is an example:

URL ="http://"; & Request.ServerVariables("SERVER_NAME") & Request.ServerVariables("URL") & "?" & Request.QueryString
Stu 9/22/2010

If I may offer some advice to put you on your way. I did just this whenever an engineer updated a customer fault.
The basic technique I used was to go to the page I want to display. An example for me might be:-
http://localhost/v14CustomerPortal-myweb/EngineerFaultReport_list.asp?mastertable=dbo%2EW%2DAllFaults&masterkey1=47672 (of course localhost won't be the correct url for an external web)
Now I have a model for the URL. All I have to do is use one of the events to save the Master Key and then put the string in my e-mail address
Something like:-
Link="http://localhost/v14CustomerPortal-mywebWithGraphs/EngineerFaultReport_list.asp?mastertable=dbo%2EW%2DAllFaults&masterkey1="; & MasterKeyISaved
and put that in the body text of the e-mail. you might have to add quotes arond the MasterKeyISaved. Apologies but I don't have time to give you chapter and verse.
Regards

C
cordaco author 9/22/2010

Maybe I am not being clear...
I have a field which is a File/Image. I would like this File/Image to be included in the email as a hyperlink, not just as the file name. The intent is for the person receiving the "Events" driven email using either "Send Simple Email or Send Email with Data actions can click on the described link and the image or file opens using a browser.
What happens now:


What I need to happen:

C
clig 9/22/2010



Maybe I am not being clear...
I have a field which is a File/Image. I would like this File/Image to be included in the email as a hyperlink, not just as the file name. The intent is for the person receiving the "Events" driven email using either "Send Simple Email or Send Email with Data actions can click on the described link and the image or file opens using a browser.
What happens now:


What I need to happen:




something like message="http://www.resourceliving.com/dbliving/Artwork/"; & dict("columnname") - or the exact dict keys value
if this is a dynamic url - capture it in the before event using admins suggestion before

C
cordaco author 9/23/2010
C
clig 9/27/2010



Thanks you very much!

message="http://www.resourceliving.com/dbliving/Artwork/"'>http://www.resourceliving.com/dbliving/Artwork/"; & dict("columnname") worked with a minor correction;
message="http://www.resourceliving.com/dbliving/Artwork/"'>http://www.resourceliving.com/dbliving/Artwork/"; & rs
("columnname")


Awesome - the sample was from 5.2 using "After Record Added"