AutoEmailer
#141
Posted 03 August 2006, 22:30
TIA
#142
Posted 03 August 2006, 23:53
Jack
Most Important: Header Tags SEO - Ultimate SEO V 2.2d
All SEO Addons: Recommended SEO Addons
Support Links:
Finding relevant link exchanges - Headers Already Sent - What does it cost? -What's my version? - How to change titles? - Preventing HotLinking
#143
Posted 14 August 2006, 13:38
$adjDate = sprintf("%s-%s-%s", $adjYr, substr($customer['date_purchased'], 5, 2),substr($customer['date_purchased'], 8, 2));
// Stop Date Selection
$diff = DifferenceBetween($adjDate, $currentDate);
// Start Date Difference
if ($diff == 5 )
// Stop Date Difference
{
I've introduced date_purchased in the sql query before this. The line 'if ($diff == 5 )' is where I'm having troubles.If you need me to post more of the code to see what's going on, please let me know.
TIA
~bobsi18~
#144
Posted 27 October 2006, 12:21
Firstly, fantastic contribution. This is exactly what I was looking for.
I was wondering though if anyone has any ideas on how to change the price displayed in the automatic orders when it is emailed to me to show the gross price, tax, shipping etc. similar to that of the orders confirmation page. At the moment it only shows the price as the non-taxed price.
I have tried my best to do this but my php skills are lacking a bit. I can't figure out how to call the correct database table to retreive the information I need.
I would appreciate any help and am happy to post this as an update to the contribution when I get it right.
Thanks
Adam Heaney
Fsmtrading.com.au
#145
Posted 27 October 2006, 12:33
Jack
Most Important: Header Tags SEO - Ultimate SEO V 2.2d
All SEO Addons: Recommended SEO Addons
Support Links:
Finding relevant link exchanges - Headers Already Sent - What does it cost? -What's my version? - How to change titles? - Preventing HotLinking
#146
Posted 03 November 2006, 08:11
Jack_mcs, on Oct 27 2006, 11:33 PM, said:
Jack
Thanks for that however I was wondering if anyone would know how to send the final price including shipping etc.? Would that be stored in the database after the customer has purchased the product?
Thanks,
Adam Heaney
Fsmtrading.com.au
#147
Posted 03 November 2006, 13:37
Jack
Most Important: Header Tags SEO - Ultimate SEO V 2.2d
All SEO Addons: Recommended SEO Addons
Support Links:
Finding relevant link exchanges - Headers Already Sent - What does it cost? -What's my version? - How to change titles? - Preventing HotLinking
#148
Posted 04 November 2006, 03:42
Jack_mcs, on Nov 4 2006, 12:37 AM, said:
Jack
Thanks Jack,
Much appreciated and very helpful. I have now got the final price etc.
I am having issues separating the class with ot_tax, ot_shipping etc. into separate columns for the html output.
at the moment I have class='ot_total' I tried using the where class <> 'ot_tax' and class <> 'ot_shipping but it comes out in the html as a separate row which means the totals add up incorrectly. any ideas to have them in columns like the rest??
Thanks
Adam Heaney
Fsmtrading.com.au
#149
Posted 04 November 2006, 04:09
Jack
Most Important: Header Tags SEO - Ultimate SEO V 2.2d
All SEO Addons: Recommended SEO Addons
Support Links:
Finding relevant link exchanges - Headers Already Sent - What does it cost? -What's my version? - How to change titles? - Preventing HotLinking
#150
Posted 08 February 2008, 08:27
PHP Warning: Call-time pass-by-reference has been deprecated; If you would like to pass it by reference, modify the declaration of [runtime function name](). If you would like to enable call-time pass-by-reference, you can set allow_call_time_pass_reference to true in your INI file in /var/www/vhosts/mysite.com/httpdocs/admin/auto_emailer/class.Email.php on line 261 PHP Warning: Call-time pass-by-reference has been deprecated; If you would like to pass it by reference, modify the declaration of [runtime function name](). If you would like to enable call-time pass-by-reference, you can set allow_call_time_pass_reference to true in your INI file in /var/www/vhosts/mysite.com/httpdocs/admin/auto_emailer/class.Email.php on line 265 PHP Warning: Call-time pass-by-reference has been deprecated; If you would like to pass it by reference, modify the declaration of [runtime function name](). If you would like to enable call-time pass-by-reference, you can set allow_call_time_pass_reference to true in your INI file in /var/www/vhosts/mysite.com/httpdocs/admin/auto_emailer/class.Email.php on line 270 PHP Warning: Call-time pass-by-reference has been deprecated; If you would like to pass it by reference, modify the declaration of [runtime function name](). If you would like to enable call-time pass-by-reference, you can set allow_call_time_pass_reference to true in your INI file in /var/www/vhosts/mysite.com/httpdocs/admin/auto_emailer/class.Email.php on line 281 PHP Warning: Call-time pass-by-reference has been deprecated; If you would like to pass it by reference, modify the declaration of [runtime function name](). If you would like to enable call-time pass-by-reference, you can set allow_call_time_pass_reference to true in your INI file in /var/www/vhosts/mysite.com/httpdocs/admin/auto_emailer/class.Email.php on line 292 PHP Warning: Call-time pass-by-reference has been deprecated; If you would like to pass it by reference, modify the declaration of [runtime function name](). If you would like to enable call-time pass-by-reference, you can set allow_call_time_pass_reference to true in your INI file in /var/www/vhosts/mysite.com/httpdocs/admin/auto_emailer/class.Email.php on line 297 PHP Warning: Call-time pass-by-reference has been deprecated; If you would like to pass it by reference, modify the declaration of [runtime function name](). If you would like to enable call-time pass-by-reference, you can set allow_call_time_pass_reference to true in your INI file in /var/www/vhosts/mysite.com/httpdocs/admin/auto_emailer/class.Email.php on line 304 PHP Warning: include(): Unable to access ../../includes/configure.php in /var/www/vhosts/mysite.com/httpdocs/admin/auto_emailer/auto_emailer.php on line 13 PHP Warning: include(../../includes/configure.php): failed to open stream: No such file or directory in /var/www/vhosts/mysite.com/httpdocs/admin/auto_emailer/auto_emailer.php on line 13 PHP Warning: include(): Unable to access ../../includes/configure.php in /var/www/vhosts/mysite.com/httpdocs/admin/auto_emailer/auto_emailer.php on line 13 PHP Warning: include(../../includes/configure.php): failed to open stream: No such file or directory in /var/www/vhosts/mysite.com/httpdocs/admin/auto_emailer/auto_emailer.php on line 13 PHP Warning: include(): Failed opening '../../includes/configure.php' for inclusion (include_path='.:/usr/share/pear:/usr/share/php') in /var/www/vhosts/mysite.com/httpdocs/admin/auto_emailer/auto_emailer.php on line 13 PHP Notice: Use of undefined constant DB_SERVER - assumed 'DB_SERVER' in /var/www/vhosts/mysite.com/httpdocs/admin/auto_emailer/auto_emailer.php on line 15 PHP Notice: Use of undefined constant DB_SERVER_USERNAME - assumed 'DB_SERVER_USERNAME' in /var/www/vhosts/mysite.com/httpdocs/admin/auto_emailer/auto_emailer.php on line 15 PHP Notice: Use of undefined constant DB_SERVER_PASSWORD - assumed 'DB_SERVER_PASSWORD' in /var/www/vhosts/mysite.com/httpdocs/admin/auto_emailer/auto_emailer.php on line 15 PHP Warning: mysql_connect(): Unknown MySQL server host 'DB_SERVER' (1) in /var/www/vhosts/mysite.com/httpdocs/admin/auto_emailer/auto_emailer.php on line 15 Unable to connect to database.
Any ideas?
#151
Posted 08 February 2008, 13:06
Quote
Jack
Most Important: Header Tags SEO - Ultimate SEO V 2.2d
All SEO Addons: Recommended SEO Addons
Support Links:
Finding relevant link exchanges - Headers Already Sent - What does it cost? -What's my version? - How to change titles? - Preventing HotLinking
#152
Posted 21 April 2008, 01:47
#153
Posted 09 May 2008, 09:48
when the birthday email is sent to a customer, the sender's (From:) address is sometimes multiplied by 25 approximately. It looks like:
From: info@mysite.com, info@mysite.com,info@mysite.com,info@mysite.com,info@mysite.com,info@mysite.com,
Any idea what might be causing it?
#154
Posted 09 May 2008, 12:45
Eighteen48, on Apr 20 2008, 09:47 PM, said:
Jack
Most Important: Header Tags SEO - Ultimate SEO V 2.2d
All SEO Addons: Recommended SEO Addons
Support Links:
Finding relevant link exchanges - Headers Already Sent - What does it cost? -What's my version? - How to change titles? - Preventing HotLinking
#155
Posted 09 May 2008, 12:49
mr_absinthe, on May 9 2008, 05:48 AM, said:
when the birthday email is sent to a customer, the sender's (From:) address is sometimes multiplied by 25 approximately. It looks like:
From: info@mysite.com, info@mysite.com,info@mysite.com,info@mysite.com,info@mysite.com,info@mysite.com,
Any idea what might be causing it?
Jack
Most Important: Header Tags SEO - Ultimate SEO V 2.2d
All SEO Addons: Recommended SEO Addons
Support Links:
Finding relevant link exchanges - Headers Already Sent - What does it cost? -What's my version? - How to change titles? - Preventing HotLinking
#156
Posted 12 May 2008, 20:25
Original Message ----- From: info@mysite.com; info@mysite.com; info@mysite.com; info@mysite.com; info@mysite.com; info@mysite.com; info@mysite.com; info@mysite.com; info@mysite.com; info@mysite.com; info@mysite.com; info@mysite.com; info@mysite.com; info@mysite.com; info@mysite.com; info@mysite.com; info@mysite.com; info@mysite.com; info@mysite.com To: markXXXX@comcast.net Sent: Tuesday, May 08, 2007 8:01 AM Subject: Your Birthday Gift from My SiteAs you can see, there is 19 From: email addresses (I just replaced it with mysite obviously). Unfortunately (or fortunately) I do not receive that many replies to those birthday emails. Sometimes it's all fine, but sometimes there was minimum six and maximum 25 copies of the address. Could the number be related to the number of emails sent that day? Very weird... and little bit annoying. What could be causing it? The code that sends it is this, correct?:
$customers_query = mysql_query("select c.customers_id, c.customers_firstname, c.customers_lastname, c.customers_dob, c.customers_email_address, ci.customers_info_date_account_created, ci.customers_info_id from customers c, customers_info ci where c.customers_id = ci.customers_info_id") or die(mysql_error());
$adjYr = substr($currentDate, 0, 4);
$adjMth = (int)substr($currentDate, 5, 2);
$adjMth = str_pad($adjMth, 2, "0", STR_PAD_LEFT);
while ($customer = mysql_fetch_array($customers_query, MYSQL_ASSOC))
{
// Start Date Selection
$adjDate = sprintf("%s-%s-%s", $adjYr, substr($customer['customers_dob'], 5, 2),substr($customer['customers_dob'], 8, 2));
// Stop Date Selection
$diff = DifferenceBetween($currentDate, $adjDate);
// Start Date Difference
if ($diff >= 0 && $diff < 1)
// Stop Date Difference
{
// Start Subject
$Subject = 'Your Birthday Gift from My Site';
// Stop Subject
$Recipiant = $customer['customers_email_address'];
$tmessage = new Email($Recipiant, $Sender, $Subject, $CustomHeaders);
$tmessage->Cc = $Cc;
$tmessage->Bcc = $Bcc;
$message = '
<html>
<head>
<title>Happy birthday</title>
</head>
<body>
<p>Dear ' . $customer['customers_firstname'] . ',<br><br>
<!-- start message //-->
<u>test</u> your <strong>message</strong> here<br /> now
<!-- stop message //-->
</body>
</html>
';
// Mail it
$tmessage->SetHtmlContent($message);
$serverFileMimeType = 'text/html';
$tmessage->SetFileContent($pathToServerFile, $serverFileMimeType);
// $tmessage->Send();
// changed to \n instead of \r\n below - otherwise no html - mr_absinthe
$headers .= 'MIME-Version: 1.0' . "\n";
$headers .= 'Content-type: text/html; charset=iso-8859-1' . "\n";
$headers .= 'From: info@mysite.com' . "\n";
mail($Recipiant, $Subject, $message, $headers);
}
}
?>
#157
Posted 12 May 2008, 22:42
Jack
Most Important: Header Tags SEO - Ultimate SEO V 2.2d
All SEO Addons: Recommended SEO Addons
Support Links:
Finding relevant link exchanges - Headers Already Sent - What does it cost? -What's my version? - How to change titles? - Preventing HotLinking
#158
Posted 12 July 2008, 14:59
/admin/auto_emailer/auto_emailer.php: line 1: ?php: No such file or directory
/admin/auto_emailer/auto_emailer.php: line 2: /aquota.user: Permission denied
/admin/auto_emailer/auto_emailer.php: line 3: $: command not found
/admin/auto_emailer/auto_emailer.php: line 4: AutoEmailer: command not found
/admin/auto_emailer/auto_emailer.php: line 5: osCommerce,: command not found
/admin/auto_emailer/auto_emailer.php: line 6: http://www.oscommerce.com: No such file or directory
/admin/auto_emailer/auto_emailer.php: line 8: syntax error near unexpected token `c'
/admin/auto_emailer/auto_emailer.php: line 8: ` Copyright © 2002 osCommerce'
it is obviously reading the file but something is causing it to not run it as it should, any ideas what I need to do to my set up to make it work??
actual code from /admin/auto_emailer/auto_emailer.php is as follows:
<?php
/*
$Id$
AutoEmailer by Jack_mcs at www.oscommerce-solution.com
osCommerce, Open Source E-Commerce Solutions
http://www.oscommerce.com
Copyright (c) 2002 osCommerce
Released under the GNU General Public License
*/
include('class.Email.php');
include('../includes/configure.php');
$link = mysql_connect(DB_SERVER, DB_SERVER_USERNAME, DB_SERVER_PASSWORD) or die("Could not connect");
mysql_select_db(DB_DATABASE);
//Set some common items
$Sender = 'binky@binkycrafts.com';
$Recipiant = 'test@binkycrafts.com';
$Cc = '';
$Bcc = '';
$currentDate = date('Y-m-d'); //or enter a date in the form of yyyy-mm-dd
include('date_functions.php');
// Start modules
include('auto_newproducts.php');
// Stop modules
mysql_close($link);
?>
#159
Posted 12 July 2008, 15:04
Tony.
#160
Posted 12 July 2008, 15:14
I tried adding this:
$firstname = $customer['customers_firstname'];
before the $message = '.... and then after:
<!-- start message //-->
I had:
<p>Hi <?php echo $firstname ?>,</p>
as my opening line but this only sends "Hi ," in the email
Hope someone can spot the rookie mistake :-D
Thanks,
Tony.














