Web Wiz - Solar Powered Eco Web Hosting

  New Posts New Posts RSS Feed - ASP Email function
  FAQ FAQ  Forum Search   Events   Register Register  Login Login

ASP Email function

 Post Reply Post Reply
Author
shanerobinson View Drop Down
Newbie
Newbie


Joined: 21 August 2008
Status: Offline
Points: 17
Post Options Post Options   Thanks (0) Thanks(0)   Quote shanerobinson Quote  Post ReplyReply Direct Link To This Post Topic: ASP Email function
    Posted: 10 March 2011 at 9:30am
Is it possible to make the Send Mail object dynamic?

At the moment a form is filled in on the website including the visitors e-mail address but when the messages is sent to us if you try to reply to the message, your just replying to your self and not the visitors mail address.


ObjSendMail.From = "tech@mydomain.com"

Thanks.
Back to Top
WebWiz-Bruce View Drop Down
Admin Group
Admin Group
Avatar
Web Wiz Developer

Joined: 03 September 2001
Location: Bournemouth
Status: Offline
Points: 9791
Answer Answer
Post Options Post Options   Thanks (0) Thanks(0)   Quote WebWiz-Bruce Quote  Post ReplyReply Direct Link To This Post Posted: 11 March 2011 at 10:46am
It can be set dynamically:-

strUserEmail = Request.Form("Email")

ObjSendMail.From = strUserEmail

However, when you read the visitors email address from the form you should check that it is a valid email address format and that you remove < and > as well as ; so that a spammer can not trick the component in to relaying spam from your website.

You should also add CAPTCHA to prevent remote form submission to prevent bots submitting 1,000's of emails per minute.
Back to Top
dpyers View Drop Down
Senior Member
Senior Member


Joined: 12 May 2003
Status: Offline
Points: 3938
Post Options Post Options   Thanks (0) Thanks(0)   Quote dpyers Quote  Post ReplyReply Direct Link To This Post Posted: 10 March 2011 at 6:37pm
What email component are you using?

Lead me not into temptation... I know the short cut, follow me.
Back to Top
WebWiz-Bruce View Drop Down
Admin Group
Admin Group
Avatar
Web Wiz Developer

Joined: 03 September 2001
Location: Bournemouth
Status: Offline
Points: 9791
Answer Answer
Post Options Post Options   Thanks (0) Thanks(0)   Quote WebWiz-Bruce Quote  Post ReplyReply Direct Link To This Post Posted: 11 March 2011 at 10:46am
It can be set dynamically:-

strUserEmail = Request.Form("Email")

ObjSendMail.From = strUserEmail

However, when you read the visitors email address from the form you should check that it is a valid email address format and that you remove < and > as well as ; so that a spammer can not trick the component in to relaying spam from your website.

You should also add CAPTCHA to prevent remote form submission to prevent bots submitting 1,000's of emails per minute.
Back to Top
shanerobinson View Drop Down
Newbie
Newbie


Joined: 21 August 2008
Status: Offline
Points: 17
Post Options Post Options   Thanks (0) Thanks(0)   Quote shanerobinson Quote  Post ReplyReply Direct Link To This Post Posted: 25 March 2011 at 3:52pm
Thanks bruce that works a treat, i will try and set up the captcha now.
Back to Top
 Post Reply Post Reply

Forum Jump Forum Permissions View Drop Down

Forum Software by Web Wiz Forums® version 12.07
Copyright ©2001-2024 Web Wiz Ltd.


Become a Fan on Facebook Follow us on X Connect with us on LinkedIn Web Wiz Blogs
About Web Wiz | Contact Web Wiz | Terms & Conditions | Cookies | Privacy Policy

Web Wiz is the trading name of Web Wiz Ltd. Company registration No. 05977755. Registered in England and Wales.
Registered office: Web Wiz Ltd, Unit 18, The Glenmore Centre, Fancy Road, Poole, Dorset, BH12 4FB, UK.

Prices exclude VAT unless otherwise stated. VAT No. GB988999105 - $, € prices shown as a guideline only.

Copyright ©2001-2024 Web Wiz Ltd. All rights reserved.