Hi, I would like to send an email when somebody write a comment in the gallery, I tryed to set the email address in the Admin, but I still don't send emails
Well, zenphoto is using `zp_mail($subject, $message, $headers, $to)` to send the messages. Not really the same thing. Maybe you can try this function on your page to see if it works.
It might be that your server is not configured for php mailing or it is not allowed. Our mail function uses actually the standard php mail() function as a base.
Comments
when somebody write a comment to a picture, I'd like that an email is sent with a custom text to the author of the gallery and to the Admin.
is it possible?
thanks
If I use the code below in a page, I receive the email in my email address, so I don't understand why I don't get the one from the comment
<?php
$to = "myaddress@ddd.com";
$subject = "Hi!";
$body = "Hi,\n\nHow are you?";
$headers = "From: anotheraddress@ddd.com\r\n" .
"X-Mailer: php";
if (mail($to, $subject, $body, $headers)) {
echo("<p>Message sent!</p>");
} else {
echo("<p>Message delivery failed...</p>");
}
?>
Now, how can I send the email to the owner of the picture or to the person that wrote the previous comment?
You can make modifications to this plugin to do what you wish. At present it will send the mail to everyone who has posted a comment on the image.
thanks