npn2531 Posted November 11, 2011 Author Share Posted November 11, 2011 Spongeobob bhbilbao, thanks for the work on account_notifications.php. I should have incorporated that in the first place. Is it something you can post here? Quote Oscommerce site: OSC to CSS, http://addons.oscommerce.com/info/7263 -Mail Manager, http://addons.oscommerce.com/info/8120 Link to comment Share on other sites More sharing options...
npn2531 Posted November 11, 2011 Author Share Posted November 11, 2011 As far as getting to work with the attachments contribution, you should be able to do it. After a quick look, I'm not real sure how the variable $attachment is generated but once you define it, you can add to the mail msg string in mm_email.php like so: change: $output_content_html = $template['htmlheader'].tep_db_prepare_input($HTTP_POST_VARS['message'].$template['htmlfooter']); $output_content_txt = strip_tags($template['txtheader'].tep_db_prepare_input($HTTP_POST_VARS['message'].$template['txtfooter'])); to something like this: $output_content_html = $template['htmlheader'].tep_db_prepare_input($HTTP_POST_VARS['message'].$attachment. $template['htmlfooter']); $output_content_txt = strip_tags($template['txtheader'].tep_db_prepare_input($HTTP_POST_VARS['message'].$attachment.$template['txtfooter'])); Quote Oscommerce site: OSC to CSS, http://addons.oscommerce.com/info/7263 -Mail Manager, http://addons.oscommerce.com/info/8120 Link to comment Share on other sites More sharing options...
Sironet Posted December 10, 2011 Share Posted December 10, 2011 Hello all. I have installed the bulk mail manager contribution which work fine for me and i wonder if someone can help me with this. This contribution has a test button which send the mail to the store owner to see the result, at the moment i'm only receiving this test email in plain text instead of html and i'm not sure if this has to do with coding problem or i had to change anything in the admin oscommerce. In addition to this i need to set the bulk mail manager to send the test mail to an additional email recipient, the reason is because we are two administrators and want to receive the test email both of us. Is this possible? any help on how to will be much apreciated. Thank you. Quote Link to comment Share on other sites More sharing options...
dsolutions Posted January 4, 2012 Share Posted January 4, 2012 I am trying to figure out how to query the people that have not ever ordered between two dates and send them an email. I am sure it is like the sales_followup.php file but for the life of me I cannot think of how to change it around to make it query people that have not ordered. Anyone have this already created or can help me create a file that would perform this query. Thanks Evan Quote Link to comment Share on other sites More sharing options...
dsolutions Posted January 5, 2012 Share Posted January 5, 2012 (edited) Jase- I am trying to create a cron job for the sales_followup.php file, but I cannot get it to work. What would one need to do to get it to work? Thanks Evan Edited January 5, 2012 by dsolutions Quote Link to comment Share on other sites More sharing options...
Rachael w. Posted January 7, 2012 Share Posted January 7, 2012 I must have missed something but I have no clue where to look. My order status update email has this in it, Order Number: 3822 Date Ordered: Friday 06 January, 2012 EMAIL_TEXTHTML_STATUS_UPDATE Order History: https://www.blahblahblah.com/account_history_info.php?order_id=3822 Where did I miss something to make that EMAIL_TEXTHTML_STATUS_UPDATE show up? Thanks in advance! Quote Link to comment Share on other sites More sharing options...
pctekcomponents Posted February 20, 2012 Share Posted February 20, 2012 Hi, Don't know whereI'm going wrong with this but I can't seem to get a new placeholder added. I've tried the method below but when I try to edit the email content, the placeholder is not shown. open includes/modules/mail_manager/order_confirm.php to the list under '//define values for placeholder variables' add this: $moneyorder_comments = MODULE_PAYMENT_MONEYORDER_TEXT_EMAIL_FOOTER; Then change this: //define placeholders $placeholders=array('$storeurl', '$storename','$storeemail','$separator','$orderno','$orderdate','$invoiceurl','$productsorderedhead','$productsordered','$deliveryaddresshead','$deliveryaddress','$billingaddresshead', '$billingaddress', '$paymentmethodhead', '$paymentmethod', '$paymentclass','$ordercomments', '$ordertotalhead', '$ordertotal'); $values=array(HTTP_SERVER,STORE_NAME,STORE_OWNER_EMAIL_ADDRESS,EMAIL_SEPARATOR, $order_no,$order_date, $invoice_url,EMAIL_TEXT_PRODUCTS,$products_ordered, EMAIL_TEXT_DELIVERY_ADDRESS,$delivery_address, EMAIL_TEXT_BILLING_ADDRESS, $billing_address, EMAIL_TEXT_PAYMENT_METHOD, $method_of_payment,$payment_class, $order_comments,$ordertotal_head,$ordertotal); to this: $placeholders=array('$storeurl', '$storename','$storeemail','$separator','$orderno','$orderdate','$invoiceurl','$productsorderedhead','$productsordered','$deliveryaddresshead','$deliveryaddress','$billingaddresshead', '$billingaddress', '$paymentmethodhead', '$paymentmethod', '$paymentclass','$ordercomments', '$ordertotalhead', '$ordertotal', '$moneyordercomments'); $values=array(HTTP_SERVER,STORE_NAME,STORE_OWNER_EMAIL_ADDRESS,EMAIL_SEPARATOR, $order_no,$order_date, $invoice_url,EMAIL_TEXT_PRODUCTS,$products_ordered, EMAIL_TEXT_DELIVERY_ADDRESS,$delivery_address, EMAIL_TEXT_BILLING_ADDRESS, $billing_address, EMAIL_TEXT_PAYMENT_METHOD, $method_of_payment,$payment_class, $order_comments,$ordertotal_head,$ordertotal, $moneyorder_comments); This adds a new placeholder, $moneyordercomments, that you can use in the order_confirm email. Note that the \n in the money order language file are 'text' line breaks, you may have to replace them with html line breaks <br>. If it does not work then run this test to see if it is all the punctuation in that langauge definition that is a issue. in the language file change: define('MODULE_PAYMENT_MONEYORDER_TEXT_EMAIL_FOOTER', "Make Payable To:\nBank: ". OWNER_BANK_NAME . "\nOwner of an account: ". OWNER_BANK_ACCOUNT . "\nBank code number: ". STORE_OWNER_BLZ . "\nAccount number: ". OWNER_BANK . "\nSWIFT Code: ". OWNER_BANK_SWIFT . "\nIBAN: ". OWNER_BANK_IBAN . "\n\nnSend To:\n" . STORE_NAME_ADDRESS . "\n\n" . 'Your order will not ship until we receive payment.'); to this: define('MODULE_PAYMENT_MONEYORDER_TEXT_EMAIL_FOOTER', 'It is the stuff in the language file that is an issue'); Im trying to integrate the Bank details from this Bank Transfer contrib: http://addons.oscommerce.com/info/285 Any help would be appreciated. Steven Quote Link to comment Share on other sites More sharing options...
SSinc Posted April 5, 2012 Share Posted April 5, 2012 I am a bit confused, could use some help. seems like the addon is working in admin - and processes through the store yet emails are sent blank really could use some help Quote Link to comment Share on other sites More sharing options...
dailce Posted June 18, 2012 Share Posted June 18, 2012 Can this be used with 2.3.1 ? Quote Link to comment Share on other sites More sharing options...
dailce Posted June 19, 2012 Share Posted June 19, 2012 Installed successfully on 2.3.1 with very little modifications. What's the best way to remove Tell a Friend? Quote Link to comment Share on other sites More sharing options...
vampirehunter Posted August 9, 2012 Share Posted August 9, 2012 does this work on 2.3.2? Quote Link to comment Share on other sites More sharing options...
sammedit Posted August 16, 2012 Share Posted August 16, 2012 does this work on 2.3.2? I use it on 2.3.2. I had to modify some of the admin files to make it show up properly in the admin like you have to do on most contribs written for 2.2. But aside from that it is fully functional. Quote Link to comment Share on other sites More sharing options...
vampirehunter Posted August 17, 2012 Share Posted August 17, 2012 does this work in conjunction with the defalt newsletter signup thing? Quote Link to comment Share on other sites More sharing options...
sammedit Posted August 18, 2012 Share Posted August 18, 2012 does this work in conjunction with the defalt newsletter signup thing? I'm not really sure what you mean. It comes with it's own newsletter mailer called bulkmail manager. If a customer signs up for the default newsletter when they create an account, you can choose to send them a newsletter through the bulkmail manager just like you can with the default newsletter setup. Quote Link to comment Share on other sites More sharing options...
♥14steve14 Posted August 18, 2012 Share Posted August 18, 2012 I use it on 2.3.2. I had to modify some of the admin files to make it show up properly in the admin like you have to do on most contribs written for 2.2. But aside from that it is fully functional. Why not add your modifications to the addon area then for others to use. Quote REMEMBER BACKUP, BACKUP AND BACKUP Link to comment Share on other sites More sharing options...
sammedit Posted August 20, 2012 Share Posted August 20, 2012 Try this. If it works for you, I will add it to the contribution area. replace all contents of admin/includes/boxes/mail_manager.php with: <?php /* $Id: tools.php 1739 2007-12-20 00:52:16Z hpdl $ osCommerce, Open Source E-Commerce Solutions http://www.oscommerce.com Copyright (c) 2002 osCommerce Released under the GNU General Public License */ $cl_box_groups[] = array( 'heading' => BOX_HEADING_MAIL_MANAGER, 'apps' => array( array( 'code' => FILENAME_MM_RESPONSEMAIL, 'title' => BOX_MM_RESPONSEMAIL, 'link' => tep_href_link(FILENAME_MM_RESPONSEMAIL) ), array( 'code' => FILENAME_MM_BULKMAIL, 'title' => BOX_MM_BULKMAIL, 'link' => tep_href_link(FILENAME_MM_BULKMAIL) ), array( 'code' => FILENAME_MM_TEMPLATES, 'title' => BOX_MM_TEMPLATES, 'link' => tep_href_link(FILENAME_MM_TEMPLATES) ), array( 'code' => FILENAME_MM_EMAIL, 'title' => BOX_MM_EMAIL, 'link' => tep_href_link(FILENAME_MM_EMAIL) ) ) ); $box = new box; echo $box->menuBox($heading, $contents); ?> In admin/mm_bulkmail.php, admin/mm_email.php, admin/mm_responsemail.php, admin/mm_templates.php: find: <!-- header //--> <?php require(DIR_WS_INCLUDES . 'header.php'); ?> <!-- header_eof //--> <!-- body //--> <table border="0" width="100%" cellspacing="2" cellpadding="2"> <tr> <td width="<?php echo BOX_WIDTH; ?>" valign="top"><table border="0" width="<?php echo BOX_WIDTH; ?>" cellspacing="1" cellpadding="1" class="columnLeft"> <!-- left_navigation //--> <?php require(DIR_WS_INCLUDES . 'column_left.php'); ?> <!-- left_navigation_eof //--> </table></td> and replace with: <?php require(DIR_WS_INCLUDES . 'template_top.php'); ?> Then find: <!-- body_eof //--> <!-- footer //--> <?php require(DIR_WS_INCLUDES . 'footer.php'); ?> <!-- footer_eof //--> <br> </body> </html> <?php require(DIR_WS_INCLUDES . 'application_bottom.php'); ?> and replace with: </body> </html> <?php require(DIR_WS_INCLUDES . 'template_bottom.php'); require(DIR_WS_INCLUDES . 'application_bottom.php'); ?> And that should do it. Let me know if it works for you. Quote Link to comment Share on other sites More sharing options...
thecia Posted September 13, 2012 Share Posted September 13, 2012 Anyone else having problems with Å Ä Ö comming out all messed up i some emails using this? looking in thunderbird subject will show ? ? ? instead of å ä ö in the mail list, but fine in mail view. on iphone it comes out even wores :P any thoughts Regards Carlos Quote Link to comment Share on other sites More sharing options...
sammedit Posted September 17, 2012 Share Posted September 17, 2012 (edited) @@npn2531 Are you having any trouble with the sales follow up dates not showing the correct time? When I go to send a sales follow up email, here is what I see: email orders older than (<=): 2012-09-16 11:09:45 but no older than (>): 2012-08-17 11:08:45 The times are always a minute off from each other and the minute hand on both NEVER move. They always stay and 08 and 09. The hour changes and the seconds change but not the minutes. Does it work correctly on your store? Edited September 17, 2012 by sammedit Quote Link to comment Share on other sites More sharing options...
npn2531 Posted September 17, 2012 Author Share Posted September 17, 2012 You guys should post the changes to the contribution, it's open. The admin does need some help with display. The time issue is something I would never have spotted. Quote Oscommerce site: OSC to CSS, http://addons.oscommerce.com/info/7263 -Mail Manager, http://addons.oscommerce.com/info/8120 Link to comment Share on other sites More sharing options...
sammedit Posted September 18, 2012 Share Posted September 18, 2012 @@npn2531 Hey, I would post the changes but I am not a coder and I am working on a custom template. But as I stated above, if someone tries my code and it works without any issues, then I will post it. And regarding the time issue, for anyone who is interested, on admin/includes/modules/mail_manager/sales_followup.php change: date('Y-m-d h:m:s') to date('Y-m-d h:i:s') Now, regarding the unsubscribe issue. I will put the code together and email it to you. But you will definitely need to test it and possibly make some changes. I use 2.3.3 but will send files for 2.2. Let me know how it works. Quote Link to comment Share on other sites More sharing options...
sammedit Posted September 18, 2012 Share Posted September 18, 2012 @@npn2531 For some reason this site won't let me email you. So here it is: Mail Manager Newsletter Unsubscribe Add On Add these two files to your catalog directory: unsubscribe.php <?php //////////////////////////////////////////////////////////////////////////// // $Id: Newsletter Unsubscribe, v 1.0 (/catalog/unsubscribe.php) 2003/01/24 // Programed By: Christopher Bradley (www.wizardsandwars.com) // // Developed for osCommerce, Open Source E-Commerce Solutions // http://www.oscommerce.com // Copyright (c) 2003 osCommerce // // Released under the GNU General Public License // /////////////////////////////////////////////////////////////////////////// require('includes/application_top.php'); require(DIR_WS_LANGUAGES . $language . '/' . FILENAME_UNSUBSCRIBE); if (isset($HTTP_GET_VARS['email'])) { $email_to_unsubscribe = ereg_replace('[^0-9A-Za-z@._-]', '', $HTTP_GET_VARS['email']); } else { $email_to_unsubscribe = ''; } $breadcrumb->add(NAVBAR_TITLE, tep_href_link(FILENAME_UNSUBSCRIBE, '', 'NONSSL')); ?> <!doctype html public "-//W3C//DTD HTML 4.01 Transitional//EN"> <html <?php echo HTML_PARAMS; ?>> <head> <meta http-equiv="Content-Type" content="text/html; charset=<?php echo CHARSET; ?>"> <base href="<?php echo (getenv('HTTPS') == 'on' ? HTTPS_SERVER : HTTP_SERVER) . DIR_WS_CATALOG; ?>"> <link rel="stylesheet" type="text/css" href="stylesheet.css"> </head> <body marginwidth="0" marginheight="0" topmargin="0" bottommargin="0" leftmargin="0" rightmargin="0"> <!-- header //--> <?php require(DIR_WS_INCLUDES . 'header.php'); ?> <!-- header_eof //--> <!-- body //--> <table border="0" width="100%" cellspacing="3" cellpadding="3"> <tr> <td width="<?php echo BOX_WIDTH; ?>" valign="top"><table border="0" width="<?php echo BOX_WIDTH; ?>" cellspacing="0" cellpadding="2"> <!-- left_navigation //--> <?php require(DIR_WS_INCLUDES . 'column_left.php'); ?> <!-- left_navigation_eof //--> </table></td> <!-- body_text //--> <td width="100%" valign="top"><table border="0" width="100%" cellspacing="0" cellpadding="0"> <tr> <td><table border="0" width="100%" cellspacing="0" cellpadding="0"> <tr> <td class="pageHeading"><?php echo HEADING_TITLE; ?></td> </tr> </table></td> </tr> <tr> <td><?php echo tep_draw_separator('pixel_trans.gif', '100%', '10'); ?></td> </tr> <tr> <td><table border="0" width="100%" cellspacing="0" cellpadding="2"> <tr> <td class="main"><?php echo UNSUBSCRIBE_TEXT_INFORMATION; ?></td> </tr> </table></td> </tr> <tr> <td align="center" class="main"><br><?php echo '<a href="' . tep_href_link(FILENAME_UNSUBSCRIBE_DONE, 'email=' . $email_to_unsubscribe, 'NONSSL') . '">' . tep_image_button('button_unsubscribe.gif', IMAGE_BUTTON_CONTINUE) . '</a>'; ?></td> </tr> </table></td> <!-- body_text_eof //--> <td width="<?php echo BOX_WIDTH; ?>" valign="top"><table border="0" width="<?php echo BOX_WIDTH; ?>" cellspacing="0" cellpadding="2"> <!-- right_navigation //--> <?php require(DIR_WS_INCLUDES . 'column_right.php'); ?> <!-- right_navigation_eof //--> </table></td> </tr> </table> <!-- body_eof //--> <!-- footer //--> <?php require(DIR_WS_INCLUDES . 'footer.php'); ?> <!-- footer_eof //--> <br> </body> </html> <?php require(DIR_WS_INCLUDES . 'application_bottom.php'); ?> unsubscribe_done.php <?php //////////////////////////////////////////////////////////////////////////// // $Id: Newsletter Unsubscribe, v 1.0 (/catalog/unsubscribe_done.php) 2003/01/24 // Programed By: Christopher Bradley (www.wizardsandwars.com) // // Developed for osCommerce, Open Source E-Commerce Solutions // http://www.oscommerce.com // Copyright (c) 2003 osCommerce // // Released under the GNU General Public License // /////////////////////////////////////////////////////////////////////////// /////////////////////////////////////////////////////////////////////////////////////////// /////////////////////////////////////////////////////////////////////////////////////////// require('includes/application_top.php'); require(DIR_WS_LANGUAGES . $language . '/' . FILENAME_UNSUBSCRIBE); if (isset($HTTP_GET_VARS['email'])) { $email_to_unsubscribe = ereg_replace('[^0-9A-Za-z@._-]', '', $HTTP_GET_VARS['email']); } else { $email_to_unsubscribe = ''; } $breadcrumb->add(NAVBAR_TITLE, tep_href_link(FILENAME_UNSUBSCRIBE, '', 'NONSSL')); // Check and see if the email exists in the database, and is subscribed to the newsletter. $cus_subscribe_raw = "select 1 from " . TABLE_CUSTOMERS . " where customers_newsletter = '1' and customers_email_address = '" . $email_to_unsubscribe . "'"; $cus_subscribe_query = tep_db_query($cus_subscribe_raw); $cus_subscribe = tep_db_fetch_array($cus_subscribe_query); ?> <!doctype html public "-//W3C//DTD HTML 4.01 Transitional//EN"> <html <?php echo HTML_PARAMS; ?>> <head> <meta http-equiv="Content-Type" content="text/html; charset=<?php echo CHARSET; ?>"> <base href="<?php echo (getenv('HTTPS') == 'on' ? HTTPS_SERVER : HTTP_SERVER) . DIR_WS_CATALOG; ?>"> <link rel="stylesheet" type="text/css" href="stylesheet.css"> </head> <body marginwidth="0" marginheight="0" topmargin="0" bottommargin="0" leftmargin="0" rightmargin="0"> <!-- header //--> <?php require(DIR_WS_INCLUDES . 'header.php'); ?> <!-- header_eof //--> <!-- body //--> <table border="0" width="100%" cellspacing="3" cellpadding="3"> <tr> <td width="<?php echo BOX_WIDTH; ?>" valign="top"><table border="0" width="<?php echo BOX_WIDTH; ?>" cellspacing="0" cellpadding="2"> <!-- left_navigation //--> <?php require(DIR_WS_INCLUDES . 'column_left.php'); ?> <!-- left_navigation_eof //--> </table></td> <!-- body_text //--> <td width="100%" valign="top"><table border="0" width="100%" cellspacing="0" cellpadding="0"> <tr> <td><table border="0" width="100%" cellspacing="0" cellpadding="0"> <tr> <td class="pageHeading"><?php echo HEADING_TITLE; ?></td> </tr> </table></td> </tr> <tr> <td><?php echo tep_draw_separator('pixel_trans.gif', '100%', '10'); ?></td> </tr> <tr> <td><table border="0" width="100%" cellspacing="0" cellpadding="2"> <tr> <?php // If we found the customers email address, and they currently subscribe if ($cus_subscribe) { // Unsubscribe them tep_db_query("update " . TABLE_CUSTOMERS . " set customers_newsletter = '0' where customers_email_address = '" . $email_to_unsubscribe . "'"); ?> <td class="main"><?php echo UNSUBSCRIBE_DONE_TEXT_INFORMATION . $email_to_unsubscribe; ?></td> <?php // Otherwise, we want to display an error message (This should never occur, unless they try to unsubscribe twice) } else { ?> <td class="main"><?php echo UNSUBSCRIBE_ERROR_INFORMATION . $email_to_unsubscribe; ?></td> <?php } ?> </tr> </table></td> </tr> <tr> <td align="center" class="main"><br><?php echo '<a href="' . tep_href_link(FILENAME_DEFAULT, '', 'NONSSL') . '">' . tep_image_button('button_continue_shopping.gif', IMAGE_BUTTON_CONTINUE) . '</a>'; ?></td> </tr> </table></td> <!-- body_text_eof //--> <td width="<?php echo BOX_WIDTH; ?>" valign="top"><table border="0" width="<?php echo BOX_WIDTH; ?>" cellspacing="0" cellpadding="2"> <!-- right_navigation //--> <?php require(DIR_WS_INCLUDES . 'column_right.php'); ?> <!-- right_navigation_eof //--> </table></td> </tr> </table> <!-- body_eof //--> <!-- footer //--> <?php require(DIR_WS_INCLUDES . 'footer.php'); ?> <!-- footer_eof //--> <br> </body> </html> <?php require(DIR_WS_INCLUDES . 'application_bottom.php'); ?> Then add catalog/includes/languages/english/unsubscribe.php <?php //////////////////////////////////////////////////////////////////////////// // $Id: Newsletter Unsubscribe, (/catalog/includes/languages/english/unsubscribe.php)v 1.2 2004/04/29 // Programed By: Christopher Bradley (www.wizardsandwars.com) // Modified by Jim Keebaugh // // Developed for osCommerce, Open Source E-Commerce Solutions // http://www.oscommerce.com // Copyright (c) 2003 osCommerce // // Released under the GNU General Public License // /////////////////////////////////////////////////////////////////////////// define('NAVBAR_TITLE', 'Unsubscribe'); define('HEADING_TITLE', 'Unsubscribe from our Newsletter'); define('UNSUBSCRIBE_TEXT_INFORMATION', '<br>We\'re sorry to hear that you wish to unsubscribe from our newsletter. If you have concerns about your privacy, please see our <a href="' . FILENAME_PRIVACY . '"><u>privacy notice</u></a>.<br><br>Subscribers to our newsletter are kept notified of new products, price reductions, and site news.<br><br>If you still do not wish to receive your newsletter, please click the button below. '); define('UNSUBSCRIBE_DONE_TEXT_INFORMATION', '<br>Your email address, listed below, has been removed from our Newsletter Subscription list, as per your request. <br><br>'); define('UNSUBSCRIBE_ERROR_INFORMATION', '<br>The email address listed below was not found in our newsletter database, or has already been removed from our newletter subscription list. <br><br>'); ?> Then create an unsubscribe button and post as catalog/includes/languages/english/images/buttons/button_unsubscribe.gif or draw your own and change applicable code. EDITS: admin/includes/modules/newsletters/newsletter.php Find: $mimemessage = new email(array('X-Mailer: osCommerce bulk mailer')); $mimemessage->add_text($this->content); $mimemessage->build_message(); while ($mail = tep_db_fetch_array($mail_query)) { $mimemessage->send($mail['customers_firstname'] . ' ' . $mail['customers_lastname'], $mail['customers_email_address'], '', EMAIL_FROM, $this->title); } Change to: // Begin Unsubscribe $mimemessage = new email(array('X-Mailer: osCommerce bulk mailer')); while ($mail = tep_db_fetch_array($mail_query)) { $mimemessage->add_html($this->content . TEXT_UNSUBSCRIBE . '<a href="' . HTTP_CATALOG_SERVER . DIR_WS_CATALOG . FILENAME_UNSUBSCRIBE . "?email=" . $mail['customers_email_address'] . '">' . HTTP_CATALOG_SERVER . DIR_WS_CATALOG . FILENAME_UNSUBSCRIBE . "?email=" . $mail['customers_email_address'] . '</a>'); $mimemessage->build_message(); $mimemessage->send($mail['customers_firstname'] . ' ' . $mail['customers_lastname'], $mail['customers_email_address'], '', EMAIL_FROM, $this->title); } // End Unsubscribe In /catalog/includes/filenames.php Add: /// Begin Unsubscribe define('FILENAME_UNSUBSCRIBE', 'unsubscribe.php'); define('FILENAME_UNSUBSCRIBE_DONE', 'unsubscribe_done.php'); /// End Unsubscribe In admin/includes/languages/english/modules/newsletters/newsletter.php and admin/includes/languages/english/mm_bulkmail.php Add: /// Begin Unsubscribe define('TEXT_UNSUBSCRIBE', "\n\nTo unsubscribe from this newsletter, just click on the following link:\n"); /// End Unsubscribe In admin/includes/filenames.php Add: //// Begin Unsubscribe define('FILENAME_UNSUBSCRIBE', 'unsubscribe.php'); //// End Unsubscribe Then in admin/mm_bulkmail.php Find: // compile mailpiece $output_content_html= $template['htmlheader'].$newsletter['content'].$template['htmlfooter']; $output_content_txt= $template['txtheader'].$newsletter['txtcontent'].$template['txtfooter']; // placeholders $placeholders=array('storeurl', 'storeowner','storeemail'); $values=array(HTTP_SERVER,STORE_OWNER,STORE_OWNER_EMAIL_ADDRESS); $output_content_html=str_replace($placeholders, $values, $output_content_html); // get customer selection criteria and additional content from module require(DIR_WS_MODULES . 'mail_manager/' . $newsletter['module'] . substr($PHP_SELF, strrpos($PHP_SELF, '.'))); and replace with: // compile mailpiece $output_content_html= $template['htmlheader'].$newsletter['content'].$template['htmlfooter']; $output_content_txt= $template['txtheader'].$newsletter['txtcontent'].$template['txtfooter']; require(DIR_WS_MODULES . 'mail_manager/' . $newsletter['module'] . substr($PHP_SELF, strrpos($PHP_SELF, '.'))); $unsubscribe = TEXT_UNSUBSCRIBE . '<a href="' . HTTP_CATALOG_SERVER . DIR_WS_CATALOG . FILENAME_UNSUBSCRIBE . "?email=" . $mail['customers_email_address'] . '">' . HTTP_CATALOG_SERVER . DIR_WS_CATALOG . FILENAME_UNSUBSCRIBE . "?email=" . $mail['customers_email_address'] . '</a>'; // placeholders $placeholders=array('storeurl', 'storeowner','storeemail', '$unsubscribe'); $values=array(HTTP_CATALOG_SERVER,STORE_OWNER,STORE_OWNER_EMAIL_ADDRESS, $unsubscribe); $output_content_html=str_replace($placeholders, $values, $output_content_html); Then add $unsubscribe into your newsletter or into the template. I think that is it. It will also add an unsubscribe link to your stock newsletter setup. Let me know if you get it to work. sammedit npn2531 1 Quote Link to comment Share on other sites More sharing options...
sammedit Posted September 18, 2012 Share Posted September 18, 2012 FYI: I have not been able to get the unsubscribe add on to work on the sales_followup emails. Quote Link to comment Share on other sites More sharing options...
npn2531 Posted September 18, 2012 Author Share Posted September 18, 2012 (edited) Thanks! I will post the time fix on the contribution. I will test out the unsubscribe feature. The sales followup email is a bit different from the other emails, a bit more involved. Edited September 18, 2012 by npn2531 Quote Oscommerce site: OSC to CSS, http://addons.oscommerce.com/info/7263 -Mail Manager, http://addons.oscommerce.com/info/8120 Link to comment Share on other sites More sharing options...
SharperJacks Posted September 25, 2012 Share Posted September 25, 2012 We installed this contribution on Oscommerce version 2.3 and everything works fine except with the response emails such as when we tested out the tell a friend page we received this error "Fatal error: Call to undefined function tep_mm_sendmail()" We wonder if we need to create some kind of class file for this to define the function. Any ideas on how to define this function so that it can operate properly? Thanks for any help. Quote Link to comment Share on other sites More sharing options...
sammedit Posted September 25, 2012 Share Posted September 25, 2012 @@SharperJacks Did you make changes on both admin/includes/functions/general.php and catalog/includes/functions/general.php? There is code in the instructions to add to both of those pages. That is likely your problem. Quote Link to comment Share on other sites More sharing options...
Recommended Posts
Join the conversation
You can post now and register later. If you have an account, sign in now to post with your account.