How do you implement an autoresponder?

Discussion in 'HTML & Website Design' started by gloveless, Jun 2, 2007.

  1. #1
    Hi all, :)

    Just wondering what autoresponder to use and how to install it. Would I want to set up a new mysql database just for capturing the names? Maybe it's something I should pay someone else to do for me.

    Basically, I'm looking to create an email list on my wordpress blog and I'm not sure how to set it up: webmarketingutah.com is the site. I've been working with html and css for years but am just now getting into wordpress and database driven sites. :eek:

    Anyway, I'd love some feedback with this! :eek:
     
    gloveless, Jun 2, 2007 IP
  2. Brennan

    Brennan Notable Member

    Messages:
    3,318
    Likes Received:
    198
    Best Answers:
    0
    Trophy Points:
    240
    #2
    Are you looking for an autoresponder or email list?
     
    Brennan, Jun 2, 2007 IP
  3. gloveless

    gloveless Peon

    Messages:
    46
    Likes Received:
    0
    Best Answers:
    0
    Trophy Points:
    0
    #3
    I'd basically like to have people enter their name and email on the site so I can start building an email list. Once they submitted their info, an autoresponder would send a "thank you for subscribing" response.
     
    gloveless, Jun 2, 2007 IP
  4. Brennan

    Brennan Notable Member

    Messages:
    3,318
    Likes Received:
    198
    Best Answers:
    0
    Trophy Points:
    240
    #4
    Brennan, Jun 2, 2007 IP
  5. gloveless

    gloveless Peon

    Messages:
    46
    Likes Received:
    0
    Best Answers:
    0
    Trophy Points:
    0
    #5
    :) Cool Thanks!
     
    gloveless, Jun 2, 2007 IP
  6. josh_coffman

    josh_coffman Peon

    Messages:
    175
    Likes Received:
    7
    Best Answers:
    0
    Trophy Points:
    0
    #6
    You can do this with php.

    Create an html form with your two inputs (name and email) and use php to insert into a database.

    I customized a script for you:

    <?php

    DEFINE ('DB_USER', 'put username here');
    DEFINE ('DB_PASSWORD', 'put password here');
    DEFINE ('DB_HOST', 'localhost');
    DEFINE ('DB_NAME', 'put name of database here');

    if($dbc = mysql_connect (DB_HOST, DB_USER, DB_PASSWORD)){
    if(!mysql_select_db(DB_NAME)){
    trigger_error("Could not select the database!\n<br />MySQL error: " . mysql_error());
    exit();
    }
    }else{trigger_error("Could not connect to MySQL!\n<br />MySQL Error: " . mysql_error());exit();}

    $email=$_POST['emailaddress'];
    $name=$_POST['name'];

    $validEmail = "^[_a-z0-9-]+(\.[_a-z0-9-]+)*@[a-z0-9-]+(\.[a-z0-9-]+)*(\.[a-z]{2,4})$";
    $emailtest = eregi($validEmail, $email); // tests to see if it is a valid email

    $mailtoaddress = $email;
    $redirectURL = "http://www.webmarketingutah.com.com/emailsuccess.html"; // the URL of the thank you page.
    $mail_name = "Web Marketing Utah";
    $mail_email = "noreply@webmarketingutah.com"; // email address of autoresponder
    $mailtobcc = "admin@webmarketingutah.com"; // bcc's you everytime someone signs up

    if(isset($email) && $emailtest != 0){ // checks if email is set and valid

    $mailheader .= "From: " . $mail_name . " <" . $mail_email . ">" . "\r\n" . "Bcc: " . $mailtobcc;
    $mailsubject = "Thank you for signing up at Web Marketing Utah"; // the subject of the email

    mysql_query("INSERT INTO emailaddresses VALUES ('$name','$email')"); // emailaddresses is the name of your table. this inserts name and email into database

    $mailmessage = "Thank you for subscribing to Web Marketing Utah!"."\r\n\r\n".
    "We look forward to providing you with useful marketing information.";

    mail($mailtoaddress,$mailsubject,$mailmessage,$mailheader); // sends the email
    header("Location: ".$redirectURL); // redirects to your thank you page which you specify above
    }

    ?>
     
    josh_coffman, Jun 3, 2007 IP
  7. ckclark121

    ckclark121 Peon

    Messages:
    63
    Likes Received:
    1
    Best Answers:
    0
    Trophy Points:
    0
    #7
    Thanks Josh! That was helpful
     
    ckclark121, Jun 3, 2007 IP
  8. josh_coffman

    josh_coffman Peon

    Messages:
    175
    Likes Received:
    7
    Best Answers:
    0
    Trophy Points:
    0
    #8
    No problem. If you need any help getting this working let me know!
     
    josh_coffman, Jun 3, 2007 IP
  9. 13nire

    13nire Banned

    Messages:
    395
    Likes Received:
    6
    Best Answers:
    0
    Trophy Points:
    0
    #9
    It's so great.
    Thanks.
     
    13nire, Jun 6, 2007 IP
  10. gloveless

    gloveless Peon

    Messages:
    46
    Likes Received:
    0
    Best Answers:
    0
    Trophy Points:
    0
    #10
    Awesome, thanks! I almost forgot about this post.


     
    gloveless, Jun 8, 2007 IP