This topic is locked

Multiple emails

7/13/2007 10:32:58 AM
PHPRunner General questions
F
funkfish author

Hello,
I got the event after add to send an email successfully but it seems to be sending 3 emails everytime....

Here's the code I am using, and perhaps it's not the code but if you have any ideas let me know.
<?php

{

// ** Send simple email ****
$email="address@domain.com,address1@domain.com";

$mailfrom="server@domain.com";

$subject="Test from Database";

$message="Testing 1,2,3..."."\n\n";
mail($email, $subject, $message, "From: server@domain.com\nReply-To: server@domain.com\nReturn-Path: server@domain.com\n");

}
?>
Thanks very much!

Sergey Kornilov admin 7/13/2007

Do you mean this code is executed three times or it sends three emails to three different addresses?

F
funkfish author 7/16/2007

Do you mean this code is executed three times or it sends three emails to three different addresses?



I mean the code is executing 3 times....

Thanks

F
funkfish author 7/16/2007



I mean the code is executing 3 times....

Thanks



FYI...
OK, what I did was entered the code above in the Table Events/Add Page/After record added - Send simple email. When I did this, I would get 3 duplicate emails sent out.

When I place the same code under Table Events/Add Page/After record added - Custom code everything works fine.
Thanks...