This topic is locked

Email Questions

8/7/2006 9:47:01 AM
ASPRunnerPro General questions
B
BrownLumber author

I'm able to email the edit form data successfully using the "Send Email with New Data" code. I have 2 questions regarding this:

  1. I have a field name in the edit form which holds an email address called "email" I want it to send the email based on the address in that field. I don't know how to do this.
  2. Is there a way to send only specific fields data with the field name as well rather than just all of the data?
    Thanks

J
Jane 8/8/2006

Hi,
here is a sample event code:

Function BeforeEdit(dict, where)

message =""
keys = dict.keys
message = message & keys(0) & " : " & dict(keys(0)) & vbcrlf

message = message & keys(1) & " : " & dict(keys(1)) & vbcrlf

message = message & keys(3) & " : " & dict(keys(3)) & vbcrlf
email=dict("email")

subject="New data record"
sendmail email, subject, message
BeforeEdit = True
End Function



where message include first, second and fourth fields.

B
BrownLumber author 8/8/2006

SUCCESS!! Thank you very much for the help, it worked perfectly. <img src='https://asprunner.com/forums/file.php?topicimage=1&fieldname=reply&id=10256&image=1&table=forumreplies' class='bbc_emoticon' alt=':D' />