This topic is locked

Send a mail to selected records (Again !)

9/12/2012 8:35:16 PM
PHPRunner General questions
N
netmedia59 author

Hello,
In PHPRunner 6.1, is there a way to use the method described at the end of the post

http://www.asprunner.com/forums/topic/14547-send-a-mail-to-selected-users-in-a-list/pagehlSend%20Mail%20Multiplefromsearch1
Example :

use List page: Before delete event
global $dal;
//delete records

if(@$_POST["a"]=="delete")

return true;
//send emails
if(@$_POST["a"]=="email")

{

// send the email

$email=$deleted_values["Email"];

$subject="Sample subject";

$body = "ID: ".$deleted_values["ID"]."\r\n";

$body.= "Password: ".$deleted_values["Password"]."\r\n";

$arr = runner_mail(array('to' => $email, 'subject' => $subject, 'body' => $body));

}

return false;
And, ADD a Button :

<INPUT class=button onclick="var form = $('#frmAdmin1')[0]; form.a.value='email'; form.submit(); return false;" value="Email selected" type=button>
Thanks again
Olivier
Lille (FRANCE)