Results 1 to 5 of 5

Thread: Automated Email response?

  1. #1
    Join Date
    Dec 2008
    Location
    Portsmouth UK
    Posts
    23
    Thanks
    7
    Thanked 0 Times in 0 Posts

    Question Automated Email response?

    Hi again, hope all is well.

    Im trying to find a way for an automated email to be sent to the user after they have completed and submited a form upon my website.

    Any ideas as to how i tackle this one?

    Thanks, Danny.
    Last edited by danny_matthews; 03-22-2009 at 10:11 AM.

  2. #2
    Join Date
    Dec 2008
    Location
    Portsmouth UK
    Posts
    23
    Thanks
    7
    Thanked 0 Times in 0 Posts

    Default

    No one has any ideas? I think its something to do with the php script?!

    Please? anyone!

  3. #3
    Join Date
    Sep 2008
    Location
    Bristol - UK
    Posts
    842
    Thanks
    32
    Thanked 132 Times in 131 Posts

    Default

    After you've done whatever needs doing, like adding their details to the database, just use the mail function. I imagine you take their email so I'll use $_POST['email'] for that.

    More on the mail function:

    PHP Code:
    <?php

    // Add to the database here, if successful execute the following
    // You'll want to do some sort of validation on the email before sending it to avoid sending hundreds of emails that lead nowhere

    $to      $_POST['email']; // To the user
    $subject 'Thanks for visiting my site'// Subject of the message...
    $message 'Hello, ' $_POST['email'] . "\n Thanks for visiting my site etc..."// Contents of the email
    $headers 'From: yourwebsite@website.com' "\r\n" .
        
    'Reply-To: yourwebsite@website.com' "\r\n";

    mail($to$subject$message$headers);
    ?>
    Simple as that really,

    Good luck.
    Last edited by Schmoopy; 03-20-2009 at 05:28 PM.

  4. The Following User Says Thank You to Schmoopy For This Useful Post:

    danny_matthews (03-21-2009)

  5. #4
    Join Date
    Dec 2008
    Location
    Portsmouth UK
    Posts
    23
    Thanks
    7
    Thanked 0 Times in 0 Posts

    Default

    Thank you! I had thought it was something fairly simple, just couldn't quite get there myself. So thank you, it is really appreciated.

    Danny.

  6. #5
    Join Date
    Apr 2009
    Posts
    5
    Thanks
    0
    Thanked 0 Times in 0 Posts

    Default

    If you want to send a series of e-mails, you might also consider using an auto responder such as aweber.

    Just a thought.
    Alan

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
  •