No announcement yet.

Need to send an email and add to mailing list with same action

  • Filter
  • Time
  • Show
Clear All
new posts

  • Need to send an email and add to mailing list with same action

    Hi all,

    I am trying to do something by way of contest entry. I want the form to do 2 things on clicking "submit". 1) It needs to send an email to an "Entries" account, and two it needs to add that email to my mailing list. I have 1) working, but can't seem to figure 2). Can some HTML guru tell me what I need to add to get the mailing list part done. I tried several variations to no avail. The code I have (with email address redacted) is:

    <h2>Enter Here to Win</h2>

    <form method="post" name="form" action="aspsendmail.asp">
    <input name="_recipients" value="" type="hidden">
    <input name="_subject" value="Contest Entry - GRAND" type="hidden">
    <input name="_redirect" value="Thank-You-_ep_4-1.html" type="hidden">

    Your Full Name: <input name="Name">&nbsp;&nbsp; <br><br>Your E-Mail Address (required):
    &nbsp; <input name="Email"><br><br>Your Phone Number:&nbsp; <input name="Phone"> <br>

    <p><input name="email-button" value="Submit" type="submit"></p>

    Thanks for the Help!!!

  • #2
    This is actually trickier than you would think. I can't think of a good solution off the top of my head. 3DCart has one server script for adding to a mailing list, and one for sending an email. You can't have one form that sends information to two different server scripts.

    php - One form, One submission button, but TWO actions - Stack Overflow

    I think you would need to use javascript/AJAX to send the request to one of the scripts in the background. This is kinda getting into the "hire a developer" territory.

    My workaround would be, especially since I assume this is temporary, host a Google Docs spreadsheet form. When someone fills it out their info will go onto a spreadsheet. From that sheet you can send emails and then later export your emails back into your site's mailing list. It is kind of a hacky workaround, but it might be better than the work required to do what you are thinking.


    • #3
      Thanks. I was hopeful it could be done, but I do tend to be more creative than my skills allow at times. For now, I've taken to copying addresses from the emails into my subscription list, but that will only work until for a while.

      Thanks again.