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

rating

Remember the old days?

Thread began 3/20/2019 8:56 pm by Steve | Last modified 3/21/2019 2:12 pm by Ray Borduin | 53 views | 7 replies |

Steve

Remember the old days?

Is there a simple way to convert the prior Email format that allowed a fully custom format composed like this:

//Start Mail Body
$MailBody = $MailBody . "<html><head>\r\n";
$MailBody = $MailBody . "<style type=\"text/css\">\r\n";
$MailBody = $MailBody . "#wrapper {\r\n";
$MailBody = $MailBody . " padding: 4px;\r\n";
$MailBody = $MailBody . " height: auto;\r\n";
$MailBody = $MailBody . " width: 700px;\r\n";
$MailBody = $MailBody . " margin-right: auto;\r\n";
$MailBody = $MailBody . " margin-left: auto;\r\n";
$MailBody = $MailBody . " background-color: #FFF;\r\n";
$MailBody = $MailBody . "}\r\n";
$MailBody = $MailBody . "body {\r\n";
$MailBody = $MailBody . " font-family: Arial, Helvetica, sans-serif;\r\n";
$MailBody = $MailBody . " background-color: #CCC;\r\n";
$MailBody = $MailBody . "}\r\n";
$MailBody = $MailBody . ".pageTitle {\r\n";
$MailBody = $MailBody . " font-family: \"Trebuchet MS\", Arial, Helvetica, sans-serif;\r\n";
$MailBody = $MailBody . " font-style: italic;\r\n";
$MailBody = $MailBody . " font-weight: bold;\r\n";
$MailBody = $MailBody . " color: #690;\r\n";
$MailBody = $MailBody . "}\r\n";
$MailBody = $MailBody . ".style1 { color: #FFFFFF\r\n";
$MailBody = $MailBody . "}\r\n";
$MailBody = $MailBody . "</style>\r\n";
$MailBody = $MailBody . "</head><body>\r\n";
$MailBody = $MailBody . "<div id=\"wrapper\">\r\n";
$MailBody = $MailBody . " <p><strong>Website Application Submission:</strong><br>\r\n";
$MailBody = $MailBody . " </p>\r\n";
$MailBody = $MailBody . " <table width=\"100%\" border=\"0\" cellpadding=\"4\" cellspacing=\"1\">\r\n";
$MailBody = $MailBody . " <tr class=\"Body\">\r\n";
$MailBody = $MailBody . " <td colspan=\"3\" bgcolor=\"#596B0E\"><span class=\"adminHeader style1\">Residential Application</span></td>\r\n";
$MailBody = $MailBody . " </tr>\r\n";
$MailBody = $MailBody . " <tr class=\"Body\">\r\n";
$MailBody = $MailBody . " <td colspan=\"3\" bgcolor=\"#596B0E\"><span class=\"adminHeader style1\">A</span></td>\r\n";
$MailBody = $MailBody . " </tr>\r\n";
$MailBody = $MailBody . " <tr class=\"Body\">\r\n";
$MailBody = $MailBody . " <td colspan=\"3\" bgcolor=\"#FFFFFF\">Date: ";
$MailBody = $MailBody . ((isset($_POST["Date"]))?$_POST["Date"]:"");
$MailBody = $MailBody . "</td>\r\n";
$MailBody = $MailBody . " </tr>\r\n";
$MailBody = $MailBody . " <tr class=\"Body\">\r\n";
$MailBody = $MailBody . " <td colspan=\"3\" bgcolor=\"#FFFFFF\">Your name in full: ";
$MailBody = $MailBody . ((isset($_POST["FullName"]))?$_POST["FullName"]:"");
Etc
Etc



into something that works with the current version?

Sign in to reply to this post

Ray BorduinWebAssist

Does the open and re-apply method not work? It should. Send me the page you are working on and the email include and I'll test with it to see why it doesn't upgrade properly.

Sign in to reply to this post

Steve

Hi Ray,
Yes, the conversion worked perfectly. Though this include should be removed automatically as it will throw an error if still present in the new email converted page:

<?php require_once("webassist/email/mailformatting_php.php"); ?>

To clarify after looking at the conversion results, we no longer need to use $_SESSION values to transfer form results to an email? I guess this was an issue when the email template was an additional step away from the parent page?
And now the $Email->BodyFile = "webassist/email/waue_fullapplication2_1_body.php"; works like an Include to bring the email template into the scope of the page requesting to send the email?

Sign in to reply to this post

Ray BorduinWebAssist

$_SESSION, $_POST, and $_GET always have a global scope and can be referred to in the email body without any alterations. Anything else, like recordsets or connections have to be added to the global scope in the email body file like:

php:
<?php

global $RecordsetName$etc;
?>
Sign in to reply to this post

Steve

I'm trying to sort this new error that showed up after conversion:

Fatal error: Uncaught Error: Class 'WA_Email' not found in \fullapplicationx.php:34 Stack trace: #0 {main} thrown in E:\Websites\Mankowskihomes.com\fullapplicationx.php on line 34



The conversion created the following:

php:
...

      <td width="37%" bgcolor="#FFFFFF">Cit:y <?php echo ((isset($_POST["City"]))?$_POST["City"]:"")?></td>
      <td width="33%" bgcolor="#FFFFFF">State: <?php echo ((isset($_POST["state"]))?$_POST["state"]:"")?></td>
      <td bgcolor="#FFFFFF">Zip: <?php echo ((isset($_POST["zip"]))?$_POST["zip"]:"")?></td>
...



Which is probably the cause of the fatal error showing?

Sign in to reply to this post

Ray BorduinWebAssist

It looks like the WA_Email.php include file may be too low on the fullapplicationx.php page. The include is below line 34, but it is referred to on that line.

Sign in to reply to this post

Steve

mail_php.php is the third line down after the display errors code...

Sign in to reply to this post

Ray BorduinWebAssist

That is the old include... it can be deleted. The new one is: WA_Email.php.

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

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