close ad
 
Important WebAssist Announcement
open ad
View Menu

Technical Support Forums

Free, outstanding support from WebAssist and your colleagues

rating

Universal email returns blank page with no errors

Thread began 3/22/2014 7:07 am by Base5 Designs | Last modified 9/11/2014 11:34 am by Jason Byrnes | 1535 views | 5 replies |

Base5 Designs

Universal email returns blank page with no errors

hi I am experiencing a problem with universal mail, where it just returns a blank page, no email is ent no information is stored in the database with the error, i get no php errors displayed either.

I have stripped out all the html and have just the php code on the page,

i have tested that pear mail is installed and working on the system and it is.

this is the code for the mail handler page the mail form submits to this page.

<?php
ini_set("display_errors", 1);
ini_set("track_errors", 1);
ini_set("html_errors", 1);
error_reporting(E_ALL);
?>
<?php require_once("webassist/email/PEAR_Mail_using_SMTP_php.php"); ?>
<?php require_once("webassist/email/mailformatting_php.php"); ?>
<?php
if (((((isset($_POST["KT_Custom1"]))?$_POST["KT_Custom1"]:"") != ""))) {
//WA Universal Email object="PEAR Mail using SMTP"
@session_write_close();
set_time_limit(0);
$EmailRef = "waue_contact_handler_1";
$BurstSize = 200;
$BurstTime = 1;
$WaitTime = 1;
$GoToPage = "message";
$RecipArray = array();
$StartBurst = time();
$LoopCount = 0;
$TotalEmails = 0;
$RecipIndex = 0;
// build up recipients array
$CurIndex = sizeof($RecipArray);
$RecipArray[$CurIndex] = array();
$RecipArray[$CurIndex ][] = "wozisname@aol.com";
$TotalEmails += sizeof($RecipArray[$CurIndex]);
$RealWait = ($WaitTime<0.25)?0.25:($WaitTime+0.1);
$TimeTracker = Array();
$TotalBursts = floor($TotalEmails/$BurstSize);
$AfterBursts = $TotalEmails % $BurstSize;
$TimeRemaining = ($TotalBursts * $BurstTime) + ($AfterBursts*$RealWait);
if ($TimeRemaining < ($TotalEmails*$RealWait) ) {
$TimeRemaining = $TotalEmails*$RealWait;
}
writeUEProgress($EmailRef,0,$TotalEmails,$TimeRemaining);
while ($RecipIndex < sizeof($RecipArray)) {
$EnteredValue = is_string($RecipArray[$RecipIndex][0]);
$CurIndex = 0;
while (($EnteredValue && $CurIndex < sizeof($RecipArray[$RecipIndex])) || (!$EnteredValue && $RecipArray[$RecipIndex][0])) {
$starttime = microtime_float();
if ($EnteredValue) {
$RecipientEmail = $RecipArray[$RecipIndex][$CurIndex];
} else {
$RecipientEmail = $RecipArray[$RecipIndex][0][$RecipArray[$RecipIndex][2]];
}
$EmailsRemaining = ($TotalEmails- $LoopCount);
$BurstsRemaining = ceil(($EmailsRemaining-$AfterBursts)/$BurstSize);
$IntoBurst = ($EmailsRemaining-$AfterBursts) % $BurstSize;
if ($AfterBursts<$EmailsRemaining) $IntoBurst = 0;
$TimeRemaining = ($BurstsRemaining * $BurstTime * 60) + ((($AfterBursts<$EmailsRemaining)?$AfterBursts:$EmailsRemaining)*$RealWait) - (($AfterBursts>$EmailsRemaining)?0:($IntoBurst*$RealWait));
if ($TimeRemaining < ($EmailsRemaining*$RealWait) ) {
$TimeRemaining = $EmailsRemaining*$RealWait;
}
$CurIndex ++;
$LoopCount ++;
writeUEProgress($EmailRef,$LoopCount,$TotalEmails,round($TimeRemaining));
wa_sleep($WaitTime);
include("webassist/email/waue_contact_handler_1.php");
$endtime = microtime_float();
$TimeTracker[] =$endtime - $starttime;
$RealWait = array_sum($TimeTracker)/sizeof($TimeTracker);
if ($LoopCount % $BurstSize == 0 && $CurIndex < sizeof($RecipArray[$RecipIndex])) {
$TimePassed = (time() - $StartBurst);
if ($TimePassed < ($BurstTime*60)) {
$WaitBurst = ($BurstTime*60) -$TimePassed;
wa_sleep($WaitBurst);
}
else {
$TimeRemaining = ($TotalEmails- $LoopCount)*$RealWait;
}
$StartBurst = time();
}
if (!$EnteredValue) {
$RecipArray[$RecipIndex][0] = mysql_fetch_assoc($RecipArray[$RecipIndex][1]);
}
}
$RecipIndex ++;
}
@session_start();
$_SESSION[$EmailRef."_Status"] = $GLOBALS[$EmailRef."_Status"];
$_SESSION[$EmailRef."_Index"] = $GLOBALS[$EmailRef."_Index"];
$_SESSION[$EmailRef."_From"] = $GLOBALS[$EmailRef."_From"];
$_SESSION[$EmailRef."_To"] = $GLOBALS[$EmailRef."_To"];
$_SESSION[$EmailRef."_Subject"] = $GLOBALS[$EmailRef."_Subject"];
$_SESSION[$EmailRef."_Body"] = $GLOBALS[$EmailRef."_Body"];
$_SESSION[$EmailRef."_Header"] = $GLOBALS[$EmailRef."_Header"];
$_SESSION[$EmailRef."_Log"] = $GLOBALS[$EmailRef."_Log"];
if (function_exists("rel2abs")) $GoToPage = $GoToPage?rel2abs($GoToPage,dirname(__FILE__)):"";
if ($GoToPage="message") {
if($_SESSION[$EmailRef."_Status"] == 'Success'){
$mailResult1 = 'A copy has been sent to you at:'. $_POST['email'].'<br>';
}else{
$mailResult1 = $mailResult1.'There was an error sending a copy of the message to you at'. $GLOBALS[$EmailRef."_To"].' , please try again later.<br>';
$mailResult1 = $mailResult1.'Error Details: '.$GLOBALS[$EmailRef."_Log"].'<br>';
}
}
}

?>

i have included a zip with the other filles

Sign in to reply to this post

Jason ByrnesWebAssist

I'll need to troubleshoot directly, see the private message section.

Sign in to reply to this post

Jared

Same issue

Hey I am having the same issue with one of my pages. What was the problem you discovered and did you find a solution to it? Thanks for any help you can provide.

Jared

Sign in to reply to this post

Jason ByrnesWebAssist

a blank page means that a php error is occurring but error reporting is turned off.

to turn error reporting on, add the following code at line 1:

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



once we know what the error is, we will be able to troubleshoot the cause.

Sign in to reply to this post

Jared

The following are the error messages I received

Warning: require_once(../../php/pear/Mail.php): failed to open stream:

No such file or directory in /var/www/vhosts/jcjc.edu/httpdocs/webassist/email/PEAR_Mail_using_SMTP_php.php on line 113

Fatal error: require_once(): Failed opening required '../../php/pear/Mail.php' (include_path='.:') in /var/www/vhosts/jcjc.edu/httpdocs/webassist/email/PEAR_Mail_using_SMTP_php.php on line 113

Sign in to reply to this post

Jason ByrnesWebAssist

this means that the path to pear you entered in the Universal Email settings is not correct.

If you are not sure of the correct path to pear to use, contact your host.

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