close ad
 
Important WebAssist Announcement
open ad
View Menu

Technical Support Forums

Free, outstanding support from WebAssist and your colleagues

rating

UE 4 - 11,600+ Live Mass mailing attempt

Thread began 3/25/2010 11:53 am by tom92909 | Last modified 3/29/2010 3:50 pm by tom92909 | 1048 views | 9 replies |

tom92909Beta Tester

UE 4 - 11,600+ Live Mass mailing attempt

Greetings folks.

Yesterday morning I performed a mass mailing of 11,600+ messages using the new Universal Email v.4.0 release.

Background: For the last 2yrs I've used the Linecraft Studio Email Merge Server Object for PHP (Dreamweaver Extension). It has performed this task of sending 9000+ messages consistently on a monthly basis for a client newsletter with some effort and serious babysitting.

My overall satisfaction with the product has been moderate to satisfied. The issues that I have encountered have been frustrating and required great effort to overcome. However, after 24+ real time uses, I have confidence in the process.

Linecraft Studio Email Merge Issues
===========================
1. Babysitting the process for up to 3hrs has been a pain.
2. End users not being able to see HTML version in email client.
3. Failures and process lockups.


With the beta and release of UE4, I was successful in running small blasts of up to 10 addresses and all worked without a hitch. We all did the beta and all seemed to have been worked out before release.


Yesterday I started the process and found that the log file (created by the UE4 script) was working as expected initially. I started getting an error after the 1st few hundred entries. The EmailError (TEXT) field in MySQL filled up as it appears to append all responses collectively.

Current MySQL Mailing List - 11643 records

At the end of 4hrs of running the total record count in the email_log table was 18183 records... ( I bailed on the process before it ended ).

I did a check in MySQL to see what the log had to provide...

WHERE `EmailStatus` != 'Success'
and found that 158 "FAILED" (not unexpected)

However the 6540 record difference is alarming.


==============================
*** Addition that I'd like to see ***
==============================
1. How can I use dynamic data in my message template? Perhaps I want to use a user ID, name or email address in my message to personalize the emailing.


I thought about placing this in the UE 4 forum, but decided that I should initially provide this information here instead.

I hope this creates some useful dialog.


Tom

Sign in to reply to this post

Ray BorduinWebAssist

"However the 6540 record difference is alarming."

that is odd... did you look for repeats in the to list to see if it was looping?

Was that a subset of your database, is it possble the filter wasn't maintained across the submit that initiated the email blast?

"The EmailError (TEXT) field in MySQL filled up as it appears to append all responses collectively. "

That also seems wrong, it should only show the most recent error in the log. I'll have to look into that some more.

Sign in to reply to this post
Did this help? Tips are appreciated...

Ray BorduinWebAssist

You can add recordset references to the email body using the recordset that is looped for the to field.

Sign in to reply to this post
Did this help? Tips are appreciated...

tom92909Beta Tester

Below is the actual file I used to send the messages...

By the way... The progress bar didn't work, but once I got started, I didn't want to stop it to fix it. A nice addition would be a PAUSE button with a Recordset completed / Next Record ID to be submitted tracking system of some sort...

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

<?php 
require_once('Connections/email.php'); ?>
<?php 
require_once("webassist/email/mailformatting_php.php"); ?>
<?php
if (!function_exists("GetSQLValueString")) {
function 
GetSQLValueString($theValue$theType$theDefinedValue ""$theNotDefinedValue ""
{
  
$theValue get_magic_quotes_gpc() ? stripslashes($theValue) : $theValue;

  
$theValue function_exists("mysql_real_escape_string") ? mysql_real_escape_string($theValue) : mysql_escape_string($theValue);

  switch (
$theType) {
    case 
"text":
      
$theValue = ($theValue != "") ? "'" $theValue "'" "NULL";
      break;    
    case 
"long":
    case 
"int":
      
$theValue = ($theValue != "") ? intval($theValue) : "NULL";
      break;
    case 
"double":
      
$theValue = ($theValue != "") ? "'" doubleval($theValue) . "'" "NULL";
      break;
    case 
"date":
      
$theValue = ($theValue != "") ? "'" $theValue "'" "NULL";
      break;
    case 
"defined":
      
$theValue = ($theValue != "") ? $theDefinedValue $theNotDefinedValue;
      break;
  }
  return 
$theValue;
}
}

mysql_select_db($database_email$email);
$query_getEmail "SELECT mailmerge.emailaddress FROM mailmerge WHERE mailmerge.active = 'Y' AND mailmerge.html = 'Y' ORDER BY mailmerge.recid ASC";
$getEmail mysql_query($query_getEmail$email) or die(mysql_error());
$row_getEmail mysql_fetch_assoc($getEmail);
$totalRows_getEmail mysql_num_rows($getEmail);
?>
<?php
if (!isset($_SESSION))session_start();
if ((
$_SERVER["REQUEST_METHOD"] == "POST"))     {
  
//WA Universal Email object="mail"
  
set_time_limit(0);
  
$EmailRef "waue_WA_newsletter_March2010_1";
  
$BurstSize 500;
  
$BurstTime 1;
  
$WaitTime 1;
  
$GoToPage "";
  
$RecipArray = array();
  
$StartBurst time();
  
$LoopCount 0;
  
$TotalEmails 0;
  
$RecipIndex 0;
  
// build up recipients array
  
$CurIndex sizeof($RecipArray);
  
$RecipArray[$CurIndex] = array();
  
$RecipArray[$CurIndex][] = $row_getEmail;
  
$RecipArray[$CurIndex][] = $getEmail;
  
$RecipArray[$CurIndex][] = "emailaddress";
  
$TotalEmails += mysql_num_rows($getEmail);
  
$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;
  }
  
$_SESSION[$EmailRef."_Total"] = $TotalEmails;
  
$_SESSION[$EmailRef."_Index"] = 0;
  
$_SESSION[$EmailRef."_Remaining"] = $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 ++;
      
session_commit();
      
session_start();
      
$_SESSION[$EmailRef."_Index"] = $LoopCount;
      
$_SESSION[$EmailRef."_Remaining"] = round($TimeRemaining);
      
session_commit();
      
wa_sleep($WaitTime);
      include(
"webassist/email/waue_WA_newsletter_March2010_1.php");
      
$endtime microtime_float();
      
$TimeTracker[] =$endtime $starttime;
      
$RealWait array_sum($TimeTracker)/sizeof($TimeTracker);
      if (
$LoopCount $BurstSize == 0)  {
        
$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[$EmailRef."_Total"] = 0;
  
$_SESSION[$EmailRef."_Index"] = 0;
  
$_SESSION[$EmailRef."_Remaining"] = 0;
  
session_commit();
  
session_start();
  if (
$GoToPage!="")     {
    
header("Location: ".$GoToPage);
  }
}
?><!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<html xmlns="http://www.w3.org/1999/xhtml">
<head>
<script  src="webassist/progress_bar/jquery-blockui-formprocessing.js" type="text/javascript"></script>
<script  src="webassist/progress_bar/WA_newsletter_March2010_Universal_Email_1_Progress.js" type="text/javascript"></script>
<meta http-equiv="Content-Type" content="text/html; charset=utf-8" />
<title>Untitled Document</title>
<style type="text/css">
<!--
@import url("plugins/webassist/progress_bar/WA_newsletter_March2010_Universal_Email_1_Progress.css");
-->
</style>
</head>
<body>

<div id="START NEWS_ProgressWrapper">
<form method="post" name="START NEWS" id="START NEWS">
<input name="Submit" type="submit" value="START NEWS" id="Submit" />
</form>
</div>
<div id="START NEWS_ProgressMessageWrapper" class="blockUIOverlay" style="display:none;">
<script type="text/javascript">
WADFP_SetProgressToForm('START NEWS', 'START NEWS_ProgressMessageWrapper', WADFP_Theme_Options['WAUE:Slate'], 'WA_newsletter_March2010_Universal_Email_1_Progress');
</script>
<div id="START NEWS_ProgressMessage" >
<?php require_once("webassist/progress_bar/WA_newsletter_March2010_Universal_Email_1_Progress.php"); ?>
</div>

</div>
</body>
</html>
<?php
mysql_free_result
($getEmail);
?>




Tom

Sign in to reply to this post

Ray BorduinWebAssist

I can't see the problem... If you post your phone number I'll call you and help you debug the issues you reported. I'd live to find the fix and figure out what happened.

Sign in to reply to this post
Did this help? Tips are appreciated...

tom92909Beta Tester

Let me know if you want to contact me today.

Tom

Sign in to reply to this post

Ray BorduinWebAssist

yeah, post your contact information or email me with it at ray@webassist.com

Sign in to reply to this post
Did this help? Tips are appreciated...

tom92909Beta Tester

Thanks for your time and assistance Ray! :)

I just remembered one topic we didn't cover in the phone call...is there a way to include the following in the message body and or URL links embedded in the message template.

I'm using the center.php message template.

I have hyperlinks that I want to include specific user data to assist in tracking.

Example:

SQL Query: SELECT * FROM mailmerge WHERE mailmerge.active = 'Y' AND mailmerge.html = 'Y' ORDER BY mailmerge.recid ASC

html:
<h1><a href="http://www.webassist.com/1269325391.php?id=$RecID"><font color="#FFFFFF">March 2010 Features:</font></a></h1>



How are these recordset bindings ported over to the message template?

Same thing for if I wanted to personalize the message and perhaps include either the
message recipients name or email address in the body of the message.


Tom

Sign in to reply to this post

Ray BorduinWebAssist

Please post the syntax that you got working for this problem. Maybe others will benefit from knowing it.

Sign in to reply to this post
Did this help? Tips are appreciated...

tom92909Beta Tester

Once again Ray, thank you very much for your personal attention today. I hope that you were able to take away some ideas that will benefit us all in future releases...

The issue that I was having is that I could not call specific recordset data in my message template. With some examination Ray was able to show me how to call any field from my recordset into my message so that I could personalize my newsletters.

php:
<a href="http://www.webassist.com/example.php?id=<?php echo $GLOBALS['RecipArray'][$GLOBALS['RecipIndex']][0]['recid']; ?>"><http://www.webassist.com/images/forums/webassist_forums_logo.png" border="0"></a>



OR perhaps include the recipients email address in the body of the message...

php:
<b><?php echo $GLOBALS['RecipArray'][$GLOBALS['RecipIndex']][0]['emailaddress']; ?></b>
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...