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

Emailing a Receipt ... Not Doing It

Thread began 11/29/2009 8:52 pm by B Tonkin | Last modified 11/30/2009 4:15 pm by Jason Byrnes | 1052 views | 3 replies |

B Tonkin

Emailing a Receipt ... Not Doing It

Using PowerStore 2, Dreamweaver CS3 on a Mac, with Universal Mail installed.

Checkout process is working fine. Had a bit of an issue with it but it's working fine now.

However, it's not emailing receipts. Was thinking it was the SMTP Mail Server I've told it to use (pop.buywineonline.com.au), but it sends off a Lost Password without any issues (with or without the SMTP server set) so I'm assuming the issue isn't that.

From the confirm page (confirm.php), lines 841 to 852 are as follows ...

<?php
if ((isset($_POST["Submit_order"]))) {
//WA Universal Email object="mail"
//Send Loop Once Per Entry
$RecipientEmail = "".((isset($_POST["email"]))?$_POST["email"]:"") ."";include("WA_Universal_Email/WAUE_confirm_1.php");

//Send Mail All Entries
if (""!="") {
header("Location: ");
}
}
?>

... the WAUE_confirm_1.php page uses the receipt.php page (in the Email_Templates directory) to build the body of the page. The WAUE_confirm_1.php page is as follows ...

<?php
$MailAttachments = "";
$MailBCC = "";
$MailCC = "";
$MailTo = "";
$MailBodyFormat = "";
$MailBody = "";
$MailImportance = "";
$MailFrom = "Buy Wine Online|WA|".($WAGLOBAL_Receipt_Email_FROM) ."";
$MailSubject = "".($WAGLOBAL_Receipt_Email_Subject) ."";
$_SERVER["QUERY_STRING"] = "";

//Global Variables

$WA_MailObject = WAUE_Definition("".($WAGLOBAL_Email_Server) ."","25","","","","");

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

//Attachment Entries

//BCC Entries
$WA_MailObject = WAUE_AddBCC($WA_MailObject,"".($WAGLOBAL_Receipt_Email_BCC) ."");

//CC Entries
$WA_MailObject = WAUE_AddCC($WA_MailObject,"".($WAGLOBAL_Receipt_Email_CC) ."");

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

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

//Start Mail Body
$MailBody = $MailBody . "";

ob_start();
require_once(dirname(__FILE__) . ("/Email_Templates/receipt.php"));
$contents = ob_get_clean();

$MailBody = $MailBody . "";
//End Mail Body

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

$WA_MailObject = null;
?>

... that's all "out of the box", except for the necessary alterations to replace PayPal with our local (Australian) Payment Gateway (eWay).

Any thoughts on why it won't email a receipt?

The trigger to send the email is set to "Button: Submit_order pressed" and comes after the Store Cart Details in Db section, which, when complete, does the redirection to checkout_success.php. That's just a thought, but once again, the "out of the box" version does the same thing and in that order.

Sign in to reply to this post

Office Guy-172461

Did you apply this fix from the sticky?
Known issue (and solution) with Order Verification Emails - PowerStore Version 2

Sign in to reply to this post

B Tonkin

Oops / Blank Email

Overlooked that. Thanks for pointing that out.

I'm one step forward now, and although I got it to the point where it's generating an email it's not decking it out with any content for some reason.

The confirm page (confirm.php) calls on WA_Universal_Email/WAUE_confirm_1.php to generate the email, which in turn calls on the receipt.php file from the Email_Templates folder to lay it out.

If I open the confirm.php, open Universal Email 1 (mail) from the Server Behaviours, select the Body tab, choose DW Edit (HTML), within the body tag of my email is the following code ...

<?php
ob_start();
require_once(dirname(__FILE__) . ("/Email_Templates/receipt.php"));
$contents = ob_get_clean();
?>

Once again it's "out of the box", but it doesn't seem to be decking out my email with content. Thoughts on why? I've checked that all files have been uploaded.

For the record the WAUE_confirm_1.php page looks like this ...

<?php
$MailAttachments = "";
$MailBCC = "";
$MailCC = "";
$MailTo = "";
$MailBodyFormat = "";
$MailBody = "";
$MailImportance = "";
$MailFrom = "".($WAGLOBAL_Receipt_Email_FROM) ."";
$MailSubject = "".($WAGLOBAL_Receipt_Email_Subject) ."";
$_SERVER["QUERY_STRING"] = "";

//Global Variables

$WA_MailObject = WAUE_Definition("".($WAGLOBAL_Email_Server) ."","25","","","","");

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

//Attachment Entries

//BCC Entries
$WA_MailObject = WAUE_AddBCC($WA_MailObject,"".($WAGLOBAL_Receipt_Email_BCC) ."");

//CC Entries
$WA_MailObject = WAUE_AddCC($WA_MailObject,"".($WAGLOBAL_Receipt_Email_CC) ."");

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

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

//Start Mail Body
$MailBody = $MailBody . "";
ob_start();
require_once(dirname(__FILE__) . ("/Email_Templates/receipt.php"));
$contents = ob_get_clean();
$MailBody = $MailBody . "<multipartbreak><html><head></head><body>\r\n";

ob_start();
require_once(dirname(__FILE__) . ("/Email_Templates/receipt.php"));
$contents = ob_get_clean();

$MailBody = $MailBody . "\r\n";
$MailBody = $MailBody . "</body></html>";
//End Mail Body

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

$WA_MailObject = null;
?>

Sign in to reply to this post

Jason ByrnesWebAssist

The code in your copy of the WAUE_confirm_1.phpoage is not the same as an out of the box version. the code should be:

php:
<?php

  $MailAttachments 
"";
  
$MailBCC         "";
  
$MailCC          "";
  
$MailTo          "";
  
$MailBodyFormat  "";
  
$MailBody        "";
  
$MailImportance  "";
  
$MailFrom        "".($WAGLOBAL_Receipt_Email_FROM)  ."";
  
$MailSubject     "".($WAGLOBAL_Receipt_Email_Subject)  ."";
  
$_SERVER["QUERY_STRING"] = "";

  
//Global Variables

  
$WA_MailObject WAUE_Definition("".($WAGLOBAL_Email_Server)  ."","25","","","","");

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

  
//Attachment Entries

  //BCC Entries
  
$WA_MailObject WAUE_AddBCC($WA_MailObject,"".($WAGLOBAL_Receipt_Email_BCC)  ."");

  
//CC Entries
  
$WA_MailObject WAUE_AddCC($WA_MailObject,"".($WAGLOBAL_Receipt_Email_CC)  ."");

  
//Body Format
  
$WA_MailObject WAUE_BodyFormat($WA_MailObject,2);

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

  
//Start Mail Body

$MailBody $MailBody "";

ob_start();
require_once(
dirname(__FILE__) . ("/Email_Templates/receipt.php"));
$contents ob_get_clean();

$MailBody $MailBody .  ($contents);
$MailBody $MailBody "";
  
//End Mail Body

  
$WA_MailObject WAUE_SendMail($WA_MailObject,$MailAttachments,$MailBCC,$MailCC,$MailTo,$MailImportance,$MailFrom,$MailSubject,$MailBody);
  
  
$WA_MailObject null;
?>





the difference in your code is that there are two instances of:

php:
ob_start();

require_once(dirname(__FILE__) . ("/Email_Templates/receipt.php"));
$contents = ob_get_clean();




and both are missing:

php:
$MailBody = $MailBody .  ($contents);
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...