J
|
jacques 11/29/2018 |
Hi phprunners, i need some help to resolve this issue: I have a Table for Client's appointments Here is the structure: -AppID -Client-Name -Client-Email -App-Date -App-Time Now I need to create a button on the list page to send an Email to the selected clients. Each client should receive an Email to his own Email address with his own appointment. Any ideas? I'd appreciate any help
|
I
|
itmann author 11/29/2018 |
the example in the manual shows how to send a 1 general message to the selected users. it does not show how to include individual content to each user!! |
admin 11/29/2018 | |
You can see that first code example at https://xlinesoft.com/phprunner/docs/email_to_selected_users.htm uses $button->getNextSelectedRecord() to loop through selected records. |
I
|
itmann author 12/3/2018 |
Hi, |
admin 12/3/2018 | |
You are sending a single email to the list of clients, comma separating email addresses. What you need to do is to send multiple emails, as many emails as the number of selected records. Email sending code needs to stay inside while loop. while( $record = $button->getNextSelectedRecord() ) |
I
|
itmann author 12/3/2018 |
Hi, |
admin 12/3/2018 | |
You didn't follow my suggestion. Do you understand what "// send your email here" means? |
I
|
itmann author 12/3/2018 |
I am afraid not. I am not a professional |
HJB 12/3/2018 | |
Simply speaking, admin advised to let the "send e-mail" code of yours to happen INSIDE the "{" and "}" brackets of the WHILE loop, while yours is currently placed OUTSIDE the while loop brackets ... |
I
|
itmann author 12/3/2018 |
Hi, |
HJB 12/3/2018 | |
Well, rather than aiming to somehow destroy your approach, my understanding on appointment date and time
|
I
|
itmann author 12/3/2018 |
Thanks for your help but this solution does not meet my needs. |
I
|
itmann author 12/3/2018 |
Hey guys |
admin 12/3/2018 | |
For each new email you need to reset the $body variable, you currently just keep adding it. You need to do that in the begging of your loop code. $body.= "...";
$body="...";
|
I
|
itmann author 12/4/2018 |
now it works. |