close ad
Databridge V2 with MySQLi support IS Now Available!
open ad
View Menu

Technical Support Forums

Free, outstanding support from WebAssist and your colleagues


Recordset-based email not sending

Thread began 12/09/2018 8:53 pm by mrs | Last modified 12/10/2018 8:26 pm by Ray Borduin | 26 views | 2 replies |


Recordset-based email not sending

I've created an email template with a couple of recordsets, and I have a page that sends/triggers the email and this also has the same recordsets, so I think the email template is set up correctly to receive the correct database records. I have tried to test by dumping/printing the session, but nothing is being printed to the screen. Therefore I assume that the email isn't sending for some reason.

I've attached the trigger page and the email template page; any thoughts on what I've done wrong?


Attached Files
Sign in to reply to this post


Right, I've tried again with two new pages and the original email template (because it took ages to create and don't want to have to do it again).

zzz.php is the trigger email page (a user needs to be signed in to populate the recordset which is filtered on SecurityAssist_UserID). This has an update behaviour (which works) and error reporting switched on and produces this error:

Notice: Undefined variable: conn_mrs in /home/blah/blah/email-your-details.php on line 5

Fatal error: Uncaught Error: Call to a member function query() on null in /home/blah/blah/webassist/mysqli/rsobj.php:195 Stack trace: #0 /home/blah/blah/email-your-details.php(8): WA_MySQLi_RS->execute() #1 /home/blah/blah/webassist/email/WA_Email.php(306): require('/home/hp3-linc4...') #2 /home/blah/blah/webassist/email/WA_Email.php(465): WA_Email->getFromPage('email-your-deta...') #3 /home/blah/blah/zzz.php(42): WA_Email->send(0) #4 {main} thrown in /home/blah/blah/webassist/mysqli/rsobj.php on line 195

zzzz.php has the session dump in it to print the contents of the email being sent to screen, but it's not getting to this page because the send email page is erroring.

email-your-details.php is attached again, but I don't think there is an issue with this page either because if I am signed in as a user and manually type this page address in, it loads with the correct data.

So my assumption is that the issue lies with the trigger page (zzz.php), but I have no idea what it could be!

Any help would be greatly appreciated.


Attached Files
Sign in to reply to this post

Ray BorduinWebAssist

Try adding this to the top of your email-your-details.php page:


global $conn_mrs;

Since the email body page is included from the main page, the require_once() referencing the connection is ignored because it was already added before.

But since it is referenced from a function, the variables defined (the connection) is out of scope and can't be referenced.

Adding the global declaration will bring the variable back into scope. Another solution would be to change the require_once() around the connection reference to require(), but that is less efficient since it will open a new connection when one is already available from the original page.

Sign in to reply to this post

Build websites with a little help from your friends

Your friends over here at WebAssist! These Dreamweaver extensions will assist you in building unlimited, custom websites.

Build websites from already-built web applications

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.

Want your website pre-built and hosted?

Close Windowclose

Rate your experience or provide feedback on this page

Account or customer service questions?
Please user our contact form.

Need technical support?
Please visit support to ask a question





Ease of use


security code refresh image

We do not respond to comments submitted from this page directly, but we do read and analyze any feedback and will use it to help make your experience better in the future.

Close Windowclose

We were unable to retrieve the attached file

Close Windowclose

Attach and remove files

add attachmentAdd attachment
Close Windowclose

Enter the URL you would like to link to in your post

Close Windowclose

This is how you use right click RTF editing

Enable right click RTF editing option allows you to add html markup into your tutorial such as images, bulleted lists, files and more...

-- click to close --

Uploading file...