...

View Full Version : Auto responders



Saz
08-08-2005, 09:38 PM
Looking for some type of auto responder, so that when the sender sends an email or form enquiry, they then get back an email, which includes what they originally sent, but with a pre-worded bit at the beginning of the email.

Any help appreciated.

Saz.

nikkiH
08-08-2005, 10:19 PM
All the (paid) hosts I've had come with these.
Did you check if your host offers autoresponders?

If you (or your company) own the server, you have to set this up in the mail server (Exchange, etc).

As an alternative to an autoresponder, you could have the process that catches a form submit e-mail them back, but this would not catch direct mail from a mail client (mailto, etc).

Pennimus
08-08-2005, 11:38 PM
I've been considering doing this as well. My host does offer it as a feature but I think it's far more interesting to do it myself, and I would do as suggested above, after the mailhandling script has executed the mail to you, have it execute another mail to the form submitter before redirecting to your thank you page.

mark87
08-08-2005, 11:50 PM
Well to do it from a contact form, you could process it in PHP -

I'm not too good at PHP atm, but say you were retrieving a few details, email, first name and last name...

You'd get the values like so -

$email = $_POST['email'];
$firstname = $_POST['firstname'];
$lastname = $_POST['lastname'];

Then create the text to send - ie.

$body = "Thankyou for submitting the following details -<br><br>First Name: " . $firstname . "<br>Last Name: " . $lastname;

Then send an email to them (or you, or both) -

mail($email, "Subject Line", $body);

--------------

Now if you want to respond when you recieve an email, it will depend on your email software (or host - easier) - You may be able to use message rules in Outlook Express to do it.

Hope that helps. :)

Saz
08-09-2005, 08:41 AM
Many thanks for that Mark, (you say you're not too good on php, but I'm a complete beginner on it :) )

Would that work, whether the sender used a form or mailto link?

I've been trying to solve this one for a few months and would love some help from some of the members here.

I didn't know that this could be covered in php, so will try there as well.

Any help appreciated.

Saz.

mark87
08-09-2005, 01:23 PM
It will only work if you're using some kind of form for contact.

Basically the information from the form gets sent to the script which then processes the fields - and in there you can do what I showed you, which is whatever you want really!, including sending them a confirmation email. :)

If you want help writing up a form etc, and the script, I'll help if you like.

Saz
08-09-2005, 01:34 PM
Many thanks for the offer of help - I hope you won't regret it :)

Ok, enquiries come either by email mailto links or by completing a form - one of the problems is that quite a few enquirers don't complete with the correct info, either by email or form, so need to do some sort of autoresponder that includes their enquiry and at the top it asks them to complete the relevant bits.

Hope I've explained that clearly, but if not, just let me know and I'll post more.

Much appreciated.

:thumbsup:

Tristan Gray
08-09-2005, 01:43 PM
You just have to specify that the variables cannot be null and then make it print something letting them know about the required fields using if else statements.

I always get php syntax confused with other languages so I will not offer my attempt at the moment.

mrruben5
08-09-2005, 01:44 PM
http://mylittlehomepage.net/form_mail_script :D

mark87
08-09-2005, 01:46 PM
Try that script which mrruben5 posted, looks like it'll do what you want. :)

Saz
08-09-2005, 02:06 PM
Many thanks for the help on this my friends - the link that mrruben5 kindly put foward, doesn't do what I'm looking for - what I'm looking for is an autoresponder that not only emails back to them, what they emailed or sent by form, but also includes a message from me.

Would it be easier to solve, if I tried to solve the mailto part first and then the form?

Any help appreciated.

mark87
08-09-2005, 02:07 PM
You can use the script, just edit it for your own needs. :)

Hang on I'll download it and try to show you... ;)

mark87
08-09-2005, 02:10 PM
Okay... so they get the form fields like so -

$name = $_POST['name'];
$email = $_POST['email'];
$subject = $_POST['subject'];
$text = $_POST['text'];

So you want to add some text to the text they sent you?

Change $text = $_POST['text']; to -

$yourmessage = "Hi, thanks for sending me the following information, blah etc, your message goes here";

$text = $yourmessage . "<br><br>" . $_POST['text'];

Tristan Gray
08-09-2005, 02:13 PM
Heh my current client does all their own hosting in-house and doesn't even have php support. It is unfortunate because they don't realize that to be up to date with the form technology etc you need to have the server-side support.

Saz
08-09-2005, 02:19 PM
Many thanks Mark, this has got to be one of the most helpful, friendlier boards going :thumbsup:

Is that code for enquirers sending emails or forms? or both?

Saz.

mark87
08-09-2005, 02:24 PM
That's for forms, if you look at the example on -

http://mylittlehomepage.net/demos/form_mail.php

You'll see it's just one file which contains the form and the processing. Just edit the part I showed you to change the message it sends (open form_mail.php in a text editor, after you download it).

Saz
08-09-2005, 02:35 PM
Not my day today - just tried d/loading that and got : :confused:

Message WZ40

The Zip file cannot be opened. If this Zip file is part of a multiple-disk set, please insert the last disk of the set and try again (this is required by the standard Zip multi-disk format). You may subsequently be prompted to insert other disks from the set.
If you downloaded this file, the most likely cause of this problem is a bad download. The best solution is almost always to download the file again. If this does not solve the problem, see the web page http://www.winzip.com/downprob.htm for hints on resolving download problems.

mark87
08-09-2005, 03:37 PM
I downloaded it fine with no probs... ? :confused:

Saz
08-09-2005, 03:55 PM
I think I'll just crack open the brandies and go to bed ;-( Just tried again with winzip and got the same message ;-(



EZ Archive Ads Plugin for vBulletin Copyright 2006 Computer Help Forum