PDA

View Full Version : Autoresponder For Specific "Subject" Only


Deb
11-03-1999, 02:33 PM
Just pondering (I'm only a techy wannabe)...

What about a PHP3 mail form with a pull down menu for subject obtions...

"Just Sending Mail"
"Need Info About ...."
"Want a real human"
"Other"

if "need Info About Numbers"
then Send this email to them@theirplace.com

if "anything else"
then send this email to me@myplace.com

This is concept -- now once I have this much figured out I head over to the developers and ask them how :)

Deb

elite
11-03-1999, 03:25 PM
I have seen a way to do this but only if its from a link on your site not them physically typing it in email program. I think it was a cgi program at cgi-resources.com

Justin
11-03-1999, 03:47 PM
You could do this via .qmail-command files... simply writing a Perl script to look for certain keywords and sending a reply if those words are found...

For example:


#!/usr/bin/perl

# Pull in the message:
$msg = <>;

# Strip CR's:
$msg =~ s/\r//isg;

# Separate header from body:
($head, $body) = split (&quot;\n\n&quot;, $msg);

# Find the subject line - quick 'n' dirty method:
if ($head =~ /\nsubject: ?(.+?)\n/i) {
[nbsp][nbsp] $subject = $1;

}

if ($subject =~ /<font color=#FF0000>keyword</font>/) {
[nbsp][nbsp] &amp;sendreply;

}

sub sendreply {

# Send your response here

}

exit;


This is just an example... I won't go any further into it than this though... for more info see http://www.qmail.org/ and look for the words &quot;.qmail-command&quot;.

Hope this helps.

------------------
Justin Nelson
FutureQuest Support

Cheryl
11-03-1999, 04:07 PM
I appreciate the help, but unfortunately at this point in time I have no experience in writing Perl scripts or the time to learn.[nbsp][nbsp]If there's a &quot;ready made&quot; solution out there or something that doesn't require writing a new script , I'm all &quot;ears&quot;.

elite
11-03-1999, 04:42 PM
sorry I looked at cgi-resources and those links are defunct :( Oh well I would recomend you get an email alias setup for just this perpose and then make a auto reply message on this (note I am not sure that this will work)

Oh well just an easy suggestion.

Cheryl
11-04-1999, 12:28 AM
I asked this in another forum but didn't get much response so I'm trying here. . .

Is there a way to set up an autoresponder to respond only to an email sent with a specific subject line?[nbsp][nbsp]I don't want to[nbsp][nbsp]dedicate an email address solely to an autoresponder -- I'd[nbsp][nbsp]like to be able to send an automated response when mail is recieved that has a specific &quot;subject&quot; (as defined in the form's hidden &quot;subject&quot; field) and still be able to use the email address for other communication.[nbsp]