Jump to content

phpmailer and a auto responder


Fryman40

Recommended Posts

Hi All,

 

I was wondering if anyone can tell me how to setup or program a auto responder for my website form. Basically I have a flash website and a general form that is filled out and then posted to a php script and sends the info to a email address. What I would like to do is have the script send the information from the form to a email address and then automatically send that person an email back that says we are processing there information or whatever I decide. I am currently using phpmailer so not sure if this is hard to implement or not. I hate going through every email and send a basic message back when I know there must be something that will do this automatically. Any help appreciated!

 

Fryman

 

 

Link to comment
Share on other sites

Creating auto-responder, although easy, is quite time consuming, so I doubt you'll get snippet of codes here.

 

Basically:

- Create form.php where you ask people's name and email

- Create process1.php where you get those data and put it into (e.g. mysql database) temporary table.

- Process1.php then send an email using mail() to ask for confirmation. Include link to process2.php along with the appropriate parameter (the data).

- Process2.php will be activated when user click the confirmation link.

- Process2.php will then record the data(name and email), plus the time of registration to permanent table.

- Process2.php also erase the data from the temporary table.

- Lastly, process2.php echo the success message to the user. Done.

- Next you create a back-office system where you get all the emails from permanent table and send them one by one. (so that you are able to send emails to them)

- That's it, basically.

 

If you have zero idea what to do, you could get many free autoresponder scripts out there ready made for you. Just install it and you're done. Try google it.

Link to comment
Share on other sites

ok Thanks.... I was hoping this could be done without using mysql.... maybe I can just forward their email to a box with a auto reply since it will be the same message all the time. Who knows.... Thanks for pointing me to some direction. Im surprised a simple txt message back to a user can be so difficult.

 

Fryman

Link to comment
Share on other sites

ok Thanks.... I was hoping this could be done without using mysql.... maybe I can just forward their email to a box with a auto reply since it will be the same message all the time. Who knows.... Thanks for pointing me to some direction. Im surprised a simple txt message back to a user can be so difficult.

 

Fryman

 

Ow, sorry. You mean, simple autoresponder?

 

I'm getting the impression that you want to have a complete autoresponder like GetResponse.com

 

For simple autoresponder, which only sends emails back to the user without storing the data (and nothing else actually), you could just:

 

form.php

<form action="process.php" method="post">
name: <input type="text" name="name" /><br />
email: <input type="text" name="email" /><br />
<input type="submit" />
</form>

 

process.php

if ($_POST)
{
$name=$_POST['name'];
$email=$_POST['email'];
$message_body='Text you want';

mail($email,$message_body);
}

 

Why don't you set it up with your host. I mean most web hosting nowadays have simple autoresponder pre-set. You just type the message and done.

 

Regards,

Link to comment
Share on other sites

lol... Well actually the form in flash already gets the email address and name and sends the info using a php script to an email address. I just have to figure out how to add what you told me... lol Actually I am hosting the websites myself on a T1 line and running apache and hmailserver, so I guess I am the host.. LOL Damn I better get with the program.. hehe

 

Thanks,

 

Fryman

Link to comment
Share on other sites

This thread is more than a year old. Please don't revive it unless you have something important to add.

Join the conversation

You can post now and register later. If you have an account, sign in now to post with your account.

Guest
Reply to this topic...

×   Pasted as rich text.   Restore formatting

  Only 75 emoji are allowed.

×   Your link has been automatically embedded.   Display as a link instead

×   Your previous content has been restored.   Clear editor

×   You cannot paste images directly. Upload or insert images from URL.

×
×
  • Create New...

Important Information

We have placed cookies on your device to help make this website better. You can adjust your cookie settings, otherwise we'll assume you're okay to continue.