SitePoint Sponsor

User Tag List

Results 1 to 3 of 3
  1. #1
    SitePoint Member
    Join Date
    Nov 2009
    Posts
    2
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)

    How to add simple autoresponder to a form?

    We're using a custom signup form for our Constant Contact list subscriptions, which is embedded in our site, instead of using CC's list subscription forms. Rather than use CC's autoresponders (which are specific to each list), I'd like to incorporate a simple autoresponder into the signup form which, when the form is submitted, emails a discount coupon code to the email address they provided via the subscription form. (Discount code could be contained in a hidden input, I suppose.)

    Reason for this method is that the signup form is for multiple list (multiple choice), and I really just want to use an autoresponder that fires off one email regardless of which list(s) they subscribe to.

    Is there a simple way to do this with javascript? (Being that I don't really know javascript.) Basically, we just need to take the email address that's entered, and auto-send an email with a defined subject line and message body containing a bit of thank you text and the discount code. (Which could be via a hidden input.)

    Alternative idea is to use the form submission results (thank you) page we currently have defined for the form, and include a separate form there with a "Send My Discount Code" button that would fire off an email to the captured email address.

    First method would be preferable, and more streamlined. Any help appreciated...

    Steve

  2. #2
    Non-Member Max Height's Avatar
    Join Date
    Dec 2011
    Posts
    303
    Mentioned
    6 Post(s)
    Tagged
    1 Thread(s)
    afaik auto emails can be sent only from a server, so you'll need a server side scripting language like PHP, ASP etc to handle that. Also, be aware that data in "hidden" inputs is not secure. Someone just has to look at your html by selecting their browser's method to "View Source" and they can see the data in any hidden inputs and then change the input's value if it is sent to a server side script for emailing to wherever. The discount code should be created on the server and then included as part of the email sent to the user.

  3. #3
    SitePoint Member
    Join Date
    Nov 2009
    Posts
    2
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)
    Yeah, I'm aware that hidden inputs can be grabbed by viewing source. Most of our visitors probably wouldn't know to do that, and really if they grab the discount code and use it, well, that's just another sale to us. Anyway, thanks for the input. Guess I'll look for a mailer script (PHP) that can do this.


Bookmarks

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •