close ad
 
Important WebAssist Announcement
open ad
View Menu

Technical Support Forums

Free, outstanding support from WebAssist and your colleagues

rating

CSS FormBuilder Email functionality...

Thread began 12/03/2010 11:33 am by markhaynes75235 | Last modified 12/17/2010 11:57 am by markhaynes75235 | 4311 views | 14 replies |

markhaynes75235

CSS FormBuilder Email functionality...

I understand that the Universal Email functionality is included in CSS FormBuilder, and I've got a form in a shadowbox page that works fine with validation, it posts to a confirm page which has the same formbuilder simple contact form customized with all the elements hidden, etc. This form inserts data to two tables in my database fine using DataAssist (no redirects) and then it's supposed to send the form data to our development email address to alert us that a visitor has posted a question.

I'm testing on a local environment using the PEAR object and have successfully tested this email script:

<?php
require_once "Mail.php";

$from = "Mark Haynes <myemailaddress@mydomain.org>";
$to = "Mark Haynes <myemailaddress@mydomain.org>";
$subject = "Hi!";
$body = "Hi,\n\nHow are you?";

$host = "smtp.mydomain.org";
$username = "<myUsername>";
$password = "<mypassword>";

$headers = array ('From' => $from,
'To' => $to,
'Subject' => $subject);
$smtp = Mail::factory('smtp',
array ('host' => $host,
'auth' => true,
'username' => $username,
'password' => $password));

$mail = $smtp->send($to, $headers, $body);

if (PEAR::isError($mail)) {
echo("<p>" . $mail->getMessage() . "</p>");
} else {
echo("<p>Message successfully sent!</p>");
}
?>

and everything works with that script (on two machines I've configured), I receive the email and the browser loads a success page.

Using the same server settings in the Universal Email interface, however I'm not getting the email or the redirect page.

I'm using the PEAR Mail using SMTP email object, Latin I(us-ascii) as my Character set, authentication is on with my Username and Password correctly entered, The path to PEAR is set to C:\PHP\PEAR, the smtp server address is properly entered using port 25, my organization name and PHP set as the X-Mailer

Perhaps there's something simple that I've overlooked. Any help would be appreciated.

Thanks!

Sign in to reply to this post

Jason ByrnesWebAssist

if you are not getting the redirect page, then the universal Email script is not triggering.


what trigger did you select?


Please send a copy of your pages so i can examine the code.

Sign in to reply to this post

markhaynes75235

CSS FormBuilder Email functionality...

Hi Jason!

Thanks for getting back to me. I've saved the page in question as a text file on my dropbox account. You can download it at:

question_confirm.txt

The trigger is the submit button on the form. The page has validation from the form on the prior page followed by two insert record server behaviors from DataAssist, then the Universal Email component runs to send an email notification to my address (I changed that in the code) when the form is submitted.

Let me know if you see anything I missed. Up to sending the email and redirecting, everything is working according to plan.

enthusiastically,
mark

Sign in to reply to this post

Jason ByrnesWebAssist

looks like there is a blank space after the closing php tag on line 3:
"?> "

this would cause the redirect to fail due to a headers already sent error.

Sign in to reply to this post

markhaynes75235

CSS FormBuilder Email functionality...

Thanks for catching that - I should have known that - but I was not seeing the ubiquitous "headers already sent" error. But what I'm seeing is a blank shadowbox after submitting the form on the page. When I browse the questions page and fill out the form there, then submit the question_confirm page where the UE script is run, the page processes and then it goes blank. when I view source, the content is empty.

I can now send you a link to the site so you can view it. When I set the PHP.ini file's error reporting by uncommenting E_ALL, the Captcha images no longer showed up on the previous page's form. That was curious. I put the code

<?php
error_reporting(E_ALL);
?>

on the top of the question_confirm page but it still loads blank after I submit the form.

Any other thoughts?

enthusiastically,
mark

Sign in to reply to this post

Jason ByrnesWebAssist

dont forget to turn display_errors on in your code, it's not enough to just set the error level if display_errors is turned off:

<?php
error_reporting(E_ALL);
ini_set('display_errors','on');
?>

Sign in to reply to this post

markhaynes75235

CSS FormBuilder Email functionality...

Thanks Jason - knew I was leaving something out!

Here's what I'm getting:

Warning: require_once(webassist/form_validations/wavt_scripts_php.php) [function.require-once]: failed to open stream: No such file or directory in C:\Program Files (x86)\Apache Software Foundation\Apache2.2\htdocs\ucpntx_prototype\webassist\email\templates\templates_14.php on line 1

Fatal error: require_once() [function.require]: Failed opening required 'webassist/form_validations/wavt_scripts_php.php' (include_path='.;c:\PHP\includes;C:\PHP\PEAR') in C:\Program Files (x86)\Apache Software Foundation\Apache2.2\htdocs\ucpntx_prototype\webassist\email\templates\templates_14.php on line 1

I know that I've got PEAR working on this system because I'm using it to pull an RSS feed into a page - that's working fine.

Any thoughts?

Thanks in advance!

enthusiastically,
Mark

Sign in to reply to this post

Jason ByrnesWebAssist

the error is saying that it cannot open the webassist/form_validations/wavt_scripts_php.php file, make sure that the entire webassist directory is uploaded to the server.

Sign in to reply to this post

markhaynes75235

CSS FormBuilder Email functionality...

I'm testing on localhost as my testing server which is also my local site location. The webassist folder has captcha, database_management, email, form_validations, forms, html_editor and progress_bar folders under it and the required wavt_scripts_php.php is there.

Any other ideas why we're getting this error?

Thanks again!

enthusiastically,
mark

Sign in to reply to this post

Jason ByrnesWebAssist

the webassist\email\templates\templates_14.php should not be trying to connect to the wavt_scripts_php.php file, I think you can delete the require_once line in the webassist\email\templates\templates_14.php file that is trying to attach to the wavt_scripts_php.php file

Sign in to reply to this post
loading

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