PDA

View Full Version : ASP and JMail....best method


jimthepict
06-30-03, 02:02 PM
I am a complete newbie to scripting languages, and am trying to learn myself ASP. I have been practising making up forms with conditional regions that will be mailed upon submitting the form.

The main JMail code I have placed in an include, which contains information to check that the posting page is on the same site as the script to prevent spamming. But I have placed the <%set jmail=nothing%> on the same page as the form. Is this acceptable? Will it still close the Jmail function correctly. The script works and sends the mail, I am just not sure if this is good practice.

Also, I have given the jmail include an .asp extension though I have noticed many includes have a .inc extension.....does this matter?

Thank you for taking time to help a newbie and apologise if my questions seem pretty basic.

:confused:

Shane
06-30-03, 04:47 PM
Jim,

your practice seems fine.

In fact, renaming your include file from .inc to .asp is a great practice. If someone where to call your include file from the browser, they would be able to download the ".inc" version, but the ".asp" version would be parsed. This will prevent outside users from viewing your source.

I wouldn't worry about anything. Your code seems to be fine.

jimthepict
06-30-03, 04:59 PM
Well that seems encouraging Shane. I'll keep hammering away, eventually it should all come together.

Thanks for taking the time to reply to my post.