close ad
 
Important WebAssist Announcement
open ad
View Menu

Technical Support Forums

Free, outstanding support from WebAssist and your colleagues

rating

confirm.php and wa_receipt.php - recipients not receiving e-mails

Thread began 10/28/2014 8:13 am by Nathon Jones Web Design | Last modified 11/14/2014 7:39 am by Jason Byrnes | 1690 views | 7 replies |

Nathon Jones Web Design

confirm.php and wa_receipt.php - recipients not receiving e-mails

On our confirm.php page we have the To field set to:
<?php echo (WA_getSavedFormValue("CheckoutWizard_Sharp_Default","First_Name")); ?>|WA|<?php echo (WA_getSavedFormValue("CheckoutWizard_Sharp_Default","Email_Address")); ?>

We have an e-mail address in the CC field:
sales@ledwarehouseuk.com

...and an e-mail address in the BCC field which we've just added today:
62790-ledwarehouseukcom-en@connect.ekomi.de

When I added the e-mail address into the BCC field, via the "Create Email Message" dialog/wizard window I thought I'd check the code on the page to see where that's inserted, but I can't find any trace of it on that page, nor any trace of the CC e-mail addresses. Which file is this updated in because if we upload confirm.php then nothing is going to change is it?

Also, our client is reporting that they receive some, but not all, of the e-mails sent to the CC address which, to us, sounds unlikely, but I wondered if you'd experienced that before and what I could do to fix it.

Thank you.
NJ

Sign in to reply to this post

Jason ByrnesWebAssist

there is a settings file created in the web assist/email folder for each instance of the UE behavior.

if you look in the UE code block there will be a require line to attach that settings file similar to:
include("webassist/email/waue_confirm_1.php");

look for that line to determine the settings file, and look in the settings file for the CC and BCC addresses.

Where the email is sending sometimes, that would mean that either the email is being trapped as spam or the host is not relaying it to the CC address sometimes. you will need to contact the host to determine why it is not being relayed sometimes but works other times.

Sign in to reply to this post

Nathon Jones Web Design

If it was the server then why do other contact forms and their WA e-mail scripts, on the same site, work every time?
For example, we have a "Dispatch Confirmed" option in the CMS we've built which the client actions when they have sent an order to the customer. This sends a custom message to the customer, and a copy to the client, and has never failed.

NJ

Sign in to reply to this post

Jason ByrnesWebAssist

You say the address receives some of the emails, so the code is working. it is compiling the email and passing it to the SMTP Server.

once passed to the SMTP Server, it is the SMTP Servers job to relay the email to the recipient.

The scenario is that is being relayed sometimes but not other times, it is the SMTP server that is not doing the relay.

As for it working on other scripts, there couple be a difference in settings, the from address could be different, you may be setting the SMTP server and port differently.

But, to get to the cause, you will need to investigate the SMTP server logs for the messages that are not being relayed.

Sign in to reply to this post

Nathon Jones Web Design

To narrow it down...when a customer pays with their credit card, they receive a confirmation e-mail. When a customer pays with their PayPal account, they don't.

Is the PayPal success page different to the Card success page?

Sign in to reply to this post

Jason ByrnesWebAssist

so it sounds like you are using PayPal Payments pro?

And when the customer fills in the CC details on your site it works? I want to clarify this because it is possible to use CC details when going through Express checkout to.

payPal Payments Pro offers 2 services:

1) direct payments: this is when the customer fills in CC details on your site and sends the transaction to paypal

2) Express Checkout: This is when the user is directed to Paypal, on Paypal's site they can pay using the PP account, or they can select to not use a paypal account and enter CC details

When using Direct pay,tents, it goes through the Confirm page then to the checkout success page.

When using Express Checkout, it goes through the pp_confirm.php page, then to the pp_chckout_success.php page.

that could explain the emails not sending if the email settings on the pp_ pages being different from the Direct checkout pages. If you would like me to double check, please provide a link and ftp info in the private message section.

Sign in to reply to this post

Nathon Jones Web Design

It's PayPal Payments Pro, yes. On our site we have pp_confirm.php which has this:

<?php
if (("" == "")) {
//WA Universal Email object="mail"
@session_write_close();
set_time_limit(0);
$EmailRef = "waue_pp_confirm_1";
$BurstSize = 1;
$BurstTime = 200;
$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 ][] = "".(WA_getSavedFormValue("CheckoutWizard_Sharp_Default","First_Name")) ."|WA|".(WA_getSavedFormValue("CheckoutWizard_Sharp_Default","Email_Address")) ."";
$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_pp_confirm_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!="") {
header("Location: ".$GoToPage);
}
}
?>

...and then waue_pp_confirm_1.php which is this:

<?php
$MailAttachments = "";
$MailBCC = "";
$MailCC = "";
$MailTo = "";
$MailBodyFormat = "";
$MailBody = "";
$MailImportance = "";
$MailFrom = "LED Warehouse Ltd|WA|sales@ledwarehouseuk.com";
$MailSubject = "Order Confirmation - LED Warehouse UK";
$_SERVER["QUERY_STRING"] = "";

//Global Variables

$WA_MailObject = WAUE_Definition("smtp.ledwarehouseuk.com","","","","","UTF-8");

if ($RecipientEmail) {
$WA_MailObject = WAUE_AddRecipient($WA_MailObject,$RecipientEmail);
}
else {
//To Entries
}

//Additional Headers

//Attachment Entries

//BCC Entries
$WA_MailObject = WAUE_AddBCC($WA_MailObject,"62790-ledwarehouseukcom-en@connect.ekomi.de");

//CC Entries
$WA_MailObject = WAUE_AddCC($WA_MailObject,"sales@ledwarehouseuk.com");

//Body Format
$WA_MailObject = WAUE_BodyFormat($WA_MailObject,0);

//Set Importance
$WA_MailObject = WAUE_SetImportance($WA_MailObject,"3");

//Start Mail Body
$MailBody = $MailBody . "";
$MailBody = $MailBody . (GetFromPage("templates/wa_receipt.php"));
$MailBody = $MailBody . "";
//End Mail Body

$WA_MailObject = WAUE_SendMail($WA_MailObject,$MailAttachments,$MailBCC,$MailCC,$MailTo,$MailImportance,$MailFrom,$MailSubject,$MailBody,"waue_pp_confirm_1");

if (isset($GLOBALS["waue_pp_confirm_1_Status"])) {
$MailLogBindings = new WAUE_Log_Bindings();
//Start Log Bindings
//End Log Bindings
$MailLogBindings->SuccessOrFailure->MailRef = "waue_pp_confirm_1";
$MailLogBindings->Success->MailRef = "waue_pp_confirm_1";
$MailLogBindings->Failure->MailRef = "waue_pp_confirm_1";
$MailLogBindings->processLog(($GLOBALS["waue_pp_confirm_1_Status"] == "Failure"));
}
$WA_MailObject = null;
?>

waue_pp_confirm_1.php is identical to waue_confirm_1.php apart from, obviously, thee "pp" reference. Login details provided below.

Sign in to reply to this post

Jason ByrnesWebAssist

See PM

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