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

Add CMS area to email script?

Thread began 1/05/2017 9:09 am by MagsW | Last modified 3/30/2021 2:05 pm by MagsW | 329 views | 13 replies

MagsW

Hi Ray

Looking at this again, I can see that because Universal Email has updated the way it works too, this is now set up differently. Previously I included the above line in the email script but now the body of the email is contained in a separate file, so the script looks like this:

$Email->BodyFile = "webassist/email/email-confirmation.php";

However if I try to include a PowerCMS area in the email-confirmation.php file it throws up errors. I tried including the full line from the developer notes:

<?php echo(require_once("/var/www/vhosts/mydomain.co.uk/httpdocs/WA_CMS/WA_CMS.php")); ?>
<?php echo(WA_getCMSContent($database_PowerCMSConnection, $PowerCMSConnection, 'Shared Email Text', 'Text', false)); ?>

Also tried including the full path to the db connection file: <?php require_once('/var/www/vhosts/mydomain.co.uk/httpdocs/Connections/PowerCMSConnection_i.php'); ?>

Example of errors below:

Deprecated: filter_var(): explicit use of FILTER_FLAG_SCHEME_REQUIRED and FILTER_FLAG_HOST_REQUIRED is deprecated in /var/www/vhosts/mydomain.co.uk/httpdocs/webassist/email/phpmailer/src/PHPMailer.php on line 3632

Deprecated: filter_var(): explicit use of FILTER_FLAG_SCHEME_REQUIRED and FILTER_FLAG_HOST_REQUIRED is deprecated in /var/www/vhosts/mydomain.co.uk/httpdocs/webassist/email/phpmailer/src/PHPMailer.php on line 3632

Deprecated: filter_var(): explicit use of FILTER_FLAG_SCHEME_REQUIRED and FILTER_FLAG_HOST_REQUIRED is deprecated in /var/www/vhosts/mydomain.co.uk/httpdocs/webassist/email/phpmailer/src/PHPMailer.php on line 3632

Deprecated: filter_var(): explicit use of FILTER_FLAG_SCHEME_REQUIRED and FILTER_FLAG_HOST_REQUIRED is deprecated in /var/www/vhosts/mydomain.co.uk/httpdocs/webassist/email/phpmailer/src/PHPMailer.php on line 3632

Deprecated: filter_var(): explicit use of FILTER_FLAG_SCHEME_REQUIRED and FILTER_FLAG_HOST_REQUIRED is deprecated in /var/www/vhosts/mydomain.co.uk/httpdocs/webassist/email/phpmailer/src/PHPMailer.php on line 3632

Deprecated: filter_var(): explicit use of FILTER_FLAG_SCHEME_REQUIRED and FILTER_FLAG_HOST_REQUIRED is deprecated in /var/www/vhosts/mydomain.co.uk/httpdocs/webassist/email/phpmailer/src/PHPMailer.php on line 3632

Notice: Undefined variable: PowerCMSConnection in /var/www/vhosts/mydomain.co.uk/httpdocs/WA_Globals/WA_Globals.php on line 42

Fatal error: Uncaught Error: Call to a member function query() on null in /var/www/vhosts/mydomain.co.uk/httpdocs/webassist/mysqli/rsobj.php:213 Stack trace: #0 /var/www/vhosts/mydomain.co.uk/httpdocs/WA_Globals/WA_Globals.php(44): WA_MySQLi_RS->execute() #1 /var/www/vhosts/mydomain.co.uk/httpdocs/WA_CMS/WA_CMS.php(5): require_once('/var/www/vhosts...') #2 /var/www/vhosts/mydomain.co.uk/httpdocs/webassist/email/email-confirmation.php(7): require_once('/var/www/vhosts...') #3 /var/www/vhosts/mydomain.co.uk/httpdocs/webassist/email/WA_Email.php(315): require('/var/www/vhosts...') #4 /var/www/vhosts/mydomain.co.uk/httpdocs/webassist/email/WA_Email.php(476): WA_Email->getFromPage('webassist/email...') #5 /var/www/vhosts/mydomain.co.uk/httpdocs/shared/email-script.php(97): WA_Email->send(0) #6 /var/www/vhosts/mydomain.co.uk/httpdocs/counselling.php(11): include('/var/www/vhosts...') #7 {main} thrown in /var/www/vhosts/mydomain.co.uk/httpdocs/webassist/mysqli/rsobj.php on line 213

I've attached the current email script and also the email content file. I've had to put everything back the way it was on the site because it's a live site, but let me know if you still need access, or I'm hoping there might be something obvious in the above or the attached files that I've missed!

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

Content

rating

Layout

rating

Ease of use

rating

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...