I have a classifieds website and I am making a mod which will mail my users when an ad is posted in the category and in the city where they are subscribed. Now, I have a problem. I have set this file to run once a day with cronjob. In a day, in my website are 50 ads posted per day so the user gets 50 emails a day. I want to include all the 50 emails in a single one, so the user will get 1 email, but I do not know how to do that.
Ex: Each email has one link and 50 emails have 50 links. I want that the users receive only a single email which will have all the 50 links in it.
I have tried so many ways, but I could not do it.
Every suggestion is welcomed.
Thanks
simply gather your ad-information in an array, where you set the email as array-key.
After this, you have an array and each email has a variable number of $row-entries. You just need to add these entries to your mail template using a foreach-loop.