Script URL: http://www.woodyshaw.com/gbook132/gbook.php
Version of script: 1.3.2
Version of PHP: 4
Hosting company: GoDaddy
Have you searched THIS FORUM for your problem: yes
(if not please do before posting)
If so, what terms did you try: everything!
Write your message below:
What would the PHP code be for making it so that people who leave entries receive a customized email?
Anyone...?
Creating Response emails with PHP (??)
Replying to guest book signers
Hi, here is how to do it, you may want to alter various things yourself.
search gbook code for this string:
if ($settings['notify'] == 1)
{
$char = array('.','@');
$repl = array(".","@");
$email=str_replace($repl,$char,$email);
$message = "Hello!
Someone has just signed your Guest book!
Name: $name
From: $from
E-mail: $email
Website: $url
Message (without smileys):
$comments_nosmileys
Visit the below URL to view your Guest book:
$settings[gbook_url]
End of message
";
mail("$settings[admin_email]","Guest book Signature",$message);
}
and replace with:
if ($settings['notify'] == 1)
{
$char = array('.','@');
$repl = array(".","@");
$email=str_replace($repl,$char,$email);
$message2 = "Hello $name, thank you for signing my guestbook.";
$message = "Hello!
Someone has just signed your Guest book!
Name: $name
From: $from
E-mail: $email
Website: $url
Message (without smileys):
$comments_nosmileys
Visit the below URL to view your Guest book:
$settings[gbook_url]
End of message
";
mail("$settings[admin_email]","Guest book Signature",$message);
mail("$email","Shawoody's Guest Book signature verification",$message2);
}
i tested it and got sent a reply, so it works, just mess around with your reply statement.

search gbook code for this string:
if ($settings['notify'] == 1)
{
$char = array('.','@');
$repl = array(".","@");
$email=str_replace($repl,$char,$email);
$message = "Hello!
Someone has just signed your Guest book!
Name: $name
From: $from
E-mail: $email
Website: $url
Message (without smileys):
$comments_nosmileys
Visit the below URL to view your Guest book:
$settings[gbook_url]
End of message
";
mail("$settings[admin_email]","Guest book Signature",$message);
}
and replace with:
if ($settings['notify'] == 1)
{
$char = array('.','@');
$repl = array(".","@");
$email=str_replace($repl,$char,$email);
$message2 = "Hello $name, thank you for signing my guestbook.";
$message = "Hello!
Someone has just signed your Guest book!
Name: $name
From: $from
E-mail: $email
Website: $url
Message (without smileys):
$comments_nosmileys
Visit the below URL to view your Guest book:
$settings[gbook_url]
End of message
";
mail("$settings[admin_email]","Guest book Signature",$message);
mail("$email","Shawoody's Guest Book signature verification",$message2);
}
i tested it and got sent a reply, so it works, just mess around with your reply statement.

Automated email reply
Hi shawoody, remember ti said do the below, which does work, but you wanted to have it say who the reply was from:
ok undo the code given yesterday, as below remove the two bold lines
$message2 = "Hello $name, thank you for signing my guestbook.";
mail("$settings[admin_email]","Guest book Signature",$message);
mail("$email","Shawoody's Reply",$message2);
now insert this
mail("$settings[admin_email]","Guest book Signature",$message);
mail("$email","Shawoody's Automated Response. Thank You.",
"Hi, $name
Thank You for Your interest in $settings[website_url]
You left the following information.
------------------------------
Name : $name
Email : $email
From : $from
You commented:
------------------------------
$comments_nosmileys
------------------------------
Regards, Shawoody
$settings[website_url]","FROM:$settings[admin_email]");
end code
if you have problems following that i can help you

ok undo the code given yesterday, as below remove the two bold lines
$message2 = "Hello $name, thank you for signing my guestbook.";
mail("$settings[admin_email]","Guest book Signature",$message);
mail("$email","Shawoody's Reply",$message2);
now insert this
mail("$settings[admin_email]","Guest book Signature",$message);
mail("$email","Shawoody's Automated Response. Thank You.",
"Hi, $name
Thank You for Your interest in $settings[website_url]
You left the following information.
------------------------------
Name : $name
Email : $email
From : $from
You commented:
------------------------------
$comments_nosmileys
------------------------------
Regards, Shawoody
$settings[website_url]","FROM:$settings[admin_email]");
end code
if you have problems following that i can help you
