Universal Email Mysqli Recordset loop
Is there a way to use mysqli recordsets as the looping recordset in universal email?
Is there a way to use mysqli recordsets as the looping recordset in universal email?
You would have to code it by hand... Are you referring to any of the data from the recordset in the body of the email or just using it for the list?
Please attach a sample page and I can help you edit it.
Thanks for the reply ray. I was referring to the recordset for the list of emails.
For the time being Ive decided to use the non mysqli recordset to loop through the records as it seemed easy enough to use that method.
How is it done? I've attached my email template that has recordset $rs_order_cart looping in it,
Searching the forum I found that MYSQLi recordsets cannot be included in the email templates. However moving them to the page with the Universal Email Behavior and adding <?php global $recordset_name; ?> at the top of the email template seems to work.
I'm sorry, I don't understand your question. Where are you getting stuck? Including the global reference on the top of the email body should be enough to give that page access to the recordset for looping. Where do you need my help?
... but when I put the email body file in the folder webassit/email/templates/ the email sending worked.
So, the email body file must be in webassit/email/templates/ ? Please confirm and/or clarify so that I can be sure on this. Thanks.
(I didn't see this in any help documentation and the Universal Server Behavior gave me the impression that I could select the email body file from anywhere.)
No the body file can be in any folder. That is just where we created the default templates to begin with. You would just have to make sure any include paths were referencing the correct locations if you moved them.
I got all fouled up with trying to figure out the MYSQli recordset looping by making a lot of permutations ... that's my lame excuse.
It is actually very simple and straightforward.
Sorry to bother you on this one.
Would appreceate some Example of this OR UEmail to be updated to use MySQLi recordsets.
You should be able to wrap your email in a recordset loop and then set the to address to the recordset column value.
Your friends over here at WebAssist! These Dreamweaver extensions will assist you in building unlimited, custom websites.
These out-of-the-box solutions provide you proven, tested applications that can be up and running now. Build a store, a gallery, or a web-based email solution.