Jump to content
  • Checkout
  • Login
  • Get in touch

osCommerce

The e-commerce.

Mail Manager


npn2531

Recommended Posts

Thanks for the excellent documentation etc;

I've run into problem:



HEADING_TITLE	
1146 - Table 'db.mm_responsemail' doesn't exist

select count(*) as total from mm_responsemail

[TEP STOP]

TABLE_HEADING_MAIL	TABLE_HEADING_ID	TABLE_HEADING_TEMPLATE	TABLE_HEADING_STATUS	TABLE_HEADING_ACTION 


When I go to phpmyadmin I see that the tables and data are there...

PS: using 

Server OS: FreeBSD 9.2-RELEASE-p10      Database: MySQL 5.5.37-log

OS Commerce version: 2.3.4

and I used the code modification as mentioned in post #66

otherwise everything as in orginal download version available...

Edited by dlx_82
Link to comment
Share on other sites

  • 1 month later...

I am installing Mail manager but get following error.

 

Parse error: syntax error, unexpected ';', expecting T_PAAMAYIM_NEKUDOTAYIM in/home/corpor15/public_html/supernovadistri.com/catalog/anna/includes/functions/general.php on line 1519

 

This is the line, copied from your app directly:

 

////////////////////////////////////////////////////////start mail manager///////////////////////////////////////////// 

  function tep_mm_set_mailstatus($mail_id, $status) {
  if ($status == '1') {
  return tep_db_query("update " . TABLE_MM_RESPONSEMAIL . " set status = '1' where mail_id = '" . (int)$mail_id . "'");(THIS IS THE LINE)
  } elseif ($status == '0') {<
  return tep_db_query("update " . TABLE_MM_RESPONSEMAIL . " set status = '0' where mail_id = '" . (int)$mail_id . "'");
  } else {
  return -1;
  }
  }
  
  //mail it
  function tep_mm_sendmail($mail, $email_address, $sender_name, $sender, $output_subject, $output_content_html, $output_content_txt) {
  $mimemessage = new emailMailManager(array('X-Mailer: cat/mail_manager.com'));
  // add html and alternative text version 
  $mimemessage->add_html($output_content_html, $output_content_txt);
  $mimemessage->build_message(); // encoding -> 76 character linebreak, replacements must be done before
  $mimemessage->send($mail, $email_address, $sender_name, $sender, $output_subject, $output_content_html, $output_content_txt);
  }
  ///////////////////////////////////////////////////end mail manager////
Link to comment
Share on other sites

  • 7 months later...

I'm getting the following SQL error when performing the sql


	Error
SQL query:
--

-- Add a new field to existing table 'customers'

--

ALTER TABLE `customers` ADD `mmstatus` VARCHAR( 2 ) NOT NULL DEFAULT '0' AFTER `customers_newsletter` -- --------------------------------------------------------

--

-- Table structure for table `mm_bulkmail`

--

CREATE TABLE IF NOT EXISTS `mm_bulkmail` (
`bulkmail_id` int( 11 ) NOT NULL AUTO_INCREMENT ,

`title` varchar( 255 ) NOT NULL ,

`htmlcontent` text NOT NULL ,

`txtcontent` text NOT NULL ,

`date_added` datetime NOT NULL ,

`date_sent` datetime DEFAULT NULL ,

PRIMARY KEY ( `bulkmail_id` )
) ENGINE = MYISAM DEFAULT CHARSET = utf8 AUTO_INCREMENT =1;




MySQL said: 
#1064 - You have an error in your SQL syntax; check the manual that corresponds to your MySQL server version for the right syntax to use near 'CREATE TABLE IF NOT EXISTS `mm_bulkmail` (

  `bulkmail_id` int(11) NOT NULL AUTO' at line 12
Link to comment
Share on other sites

I ended up working around the SQL issue by just running the sections separately without all the comments and it worked.

 

 

Also, the response email for "forgotten password" need to be revamped as all you get in the email are variables that are no longer used in the newer version of OSC.

 

Subject came through as "EMAIL_PASSWORD_REMINDER_SUBJECT"

 

Body came through as "EMAIL_PASSWORD_REMINDER_SUBJECT / EMAIL_PASSWORD_REMINDER_BODY"

 

I believe OSC does the forgotten password differently now that sends a link to the email for the customer to click on.

Link to comment
Share on other sites

  • 1 month later...

So i thought it was fishy a couple days ago that our local cable providers have banned our ip from sending server side emails to there accounts claiming spamy characteristics. So im getting this error thrown, which is preventing my mail manager from sending out emails on the admin side and think this is maybe the reason for the spamy email characteristics..

 

 

mail(): Multiple or malformed newlines found in additional_header in /***/admin/includes/classes/email.php on line 523

 

I found this link explaining why http://stackoverflow...ditional-header...

 

 

but unsure about implementation of the fix.

 

The specific url when the error reports is ****.com/admin/mm_bulkmail.php?page=1&nID=15&action=test

Link to comment
Share on other sites

So i thought it was fishy a couple days ago that our local cable providers have banned our ip from sending server side emails to there accounts claiming spamy characteristics. So im getting this error thrown, which is preventing my mail manager from sending out emails on the admin side and think this is maybe the reason for the spamy email characteristics..

 

 

mail(): Multiple or malformed newlines found in additional_header in /***/admin/includes/classes/email.php on line 523

 

I found this link explaining why http://stackoverflow...ditional-header...

 

 

but unsure about implementation of the fix.

 

The specific url when the error reports is ****.com/admin/mm_bulkmail.php?page=1&nID=15&action=test

 

 

Never mind, it was because i had line breaks in both my template html and email html. No line breaks people when using bulk mail manager!!!

Link to comment
Share on other sites

  • 4 months later...

I am having an issue where when i try and send email using the system in any way i get a blank page but the email gets sent. it is dying right on the tep_mm_sendmail function but i cant see WHY. i dont see an error long and again i just get a blank page. any ideas?

 

thanks!

Link to comment
Share on other sites

Im having trouble with the forgot password process.

 

after entering my email in the front end it says

 

Please check your e-mail for instructions on how to change your password. The instructions contain a link that is valid only for 24 hours or until your password has been updated.
 
but the email uses the define below
 
define('EMAIL_PASSWORD_REMINDER_BODY', 'A new password was requested from ' . $REMOTE_ADDR . '.' . "\n\n" . 'Your new password to \'' . STORE_NAME . '\' is:' . "\n\n" . ' %s' . "\n\n");
 
so there is not only no link to reset it. it isnt sending a new password.
$new_password isn't even defined there.
 
thanks for any help!
 
Link to comment
Share on other sites

  • 2 months later...

I have the same problem with the password process.

Have changed EMAIL_PASSWORD_REMINDER_BODY to EMAIL_PASSWORD_RESET_BODY in mail manager/password_forgotten.php so now the email sent out has a text, but there is no link?

 

Please help.

 

Perhaps there is a quick way to disable mail manager for password forgotten?

Link to comment
Share on other sites

  • 2 months later...

Anyone know why i get error 403 forbidden when editing a template and then try to save it?

admin/mm_templates.php?page=1&action=update

Getting the Phoenix off the ground

Link to comment
Share on other sites

Still stuck with this

So far i have checked configure.php everything else.

I moved even entire site to top level folder on server

Forbidden

You don't have permission to access /admin/mm_templates.php on this server.

Additionally, a 403 Forbidden error was encountered while trying to use an ErrorDocument to handle the request.

Getting the Phoenix off the ground

Link to comment
Share on other sites

Ok, I see what is going on

PHP security changes and see http://stackoverflow.com/questions/30887610/error-with-php-mail-multiple-or-malformed-newlines-found-in-additional-header

 

Host is PHP Version: 5.6.22

I can see this will become a future issue.

 

Anyone got a fix to this already?

Getting the Phoenix off the ground

Link to comment
Share on other sites

  • 1 month later...

Bump on this.

 

I still only have a small hiccup when updating an order 

 

When you add comments for a customer and you enter for a space between lines then getting error: Multiple or malformed newlines found in additional_header in admin/includes/classes/email.php on line 522

the line 522 - 

return mail($to, $subject, $this->output, 'From: '.$from.$this->lf.implode($this->lf, $this->headers).$this->lf.implode($this->lf, $xtra_headers)); 

Just one single comment order update is fine

 

So now checked and changed to

return mail($to, $subject, $this->output, 'From: '.$from.$this->lf.implode($this->lf, $this->headers));

 

works, however the comments line breaks is removed to give one line of comments

 

Anyone knows a solution?

Edited by Peper

Getting the Phoenix off the ground

Link to comment
Share on other sites

  • 1 year later...
On 8/27/2016 at 9:51 AM, Peper said:

Bump on this.

 

I still only have a small hiccup when updating an order 

 

When you add comments for a customer and you enter for a space between lines then getting error: Multiple or malformed newlines found in additional_header in admin/includes/classes/email.php on line 522

the line 522 - 


return mail($to, $subject, $this->output, 'From: '.$from.$this->lf.implode($this->lf, $this->headers).$this->lf.implode($this->lf, $xtra_headers)); 

Just one single comment order update is fine

 

So now checked and changed to

return mail($to, $subject, $this->output, 'From: '.$from.$this->lf.implode($this->lf, $this->headers));

 

works, however the comments line breaks is removed to give one line of comments

 

Anyone knows a solution?

Peper, I was wondering if you had ever made any headway on this.  I have run into the same issue.  I'm running php 5.6.37.  But It's the same with later versions.

I have removed the $xtra_headers and it seems to work ok, except for the issue you called out where there aren't any new lines, and comment lines aren't separated any more.  I have changed the function implode($this->lf, $xtra_headers) to implode(" ", $xtra_headers), and it seems to work in the one scenario I tried.  What I don't know is, whether the $xtra_headers will be populated with information that needs line breaks in certain scenarios, and then be rejected by the mail servers.

Link to comment
Share on other sites

Hello @fourmat

This was a while back and is working fine for me at least (Admin-E-Mail Transport Method = sendmail)

Will have a look this weekend again on the SMTP side(my preferred way)

      if (EMAIL_TRANSPORT == 'smtp') {
        return mail($to_addr, $subject, $this->output, 'From: ' . $from . $this->lf . 'To: ' . $to . $this->lf . implode($this->lf, $this->headers) . $this->lf . implode($this->lf, $xtra_headers));
      } else {
        return mail($to, $subject, $this->output, 'From: '.$from.$this->lf.implode($this->lf, $this->headers));
		//return mail($to, $subject, $this->output, 'From: '.$from.$this->lf.implode($this->lf, $this->headers).$this->lf.implode($this->lf, $xtra_headers));
      }
    }

 

Getting the Phoenix off the ground

Link to comment
Share on other sites

  • 2 weeks later...
  • 2 months later...

Hello All,

Having used this for years testing on PHP 7.2 does pick up an error :

"Warning: Use of undefined constant title - assumed 'title' (this will throw an Error in a future version of PHP) in xxx/catalog/admin/mm_responsemail.php on line 228"

Easy to fix :

Find  around line 228 (244 in the original file):

$output_subject = $mail[title];

 CHANGE TO  (missing the quotes around title): 
    $output_subject = $mail['title'];

 

Also for those having error "Headers already sent" the easiest way to fix it is to go to the templates in the database and take out all the white space in each one. Works like a charm.

 

Bobbee
 

Link to comment
Share on other sites

Join the conversation

You can post now and register later. If you have an account, sign in now to post with your account.

Guest
Unfortunately, your content contains terms that we do not allow. Please edit your content to remove the highlighted words below.
Reply to this topic...

×   Pasted as rich text.   Paste as plain text instead

  Only 75 emoji are allowed.

×   Your link has been automatically embedded.   Display as a link instead

×   Your previous content has been restored.   Clear editor

×   You cannot paste images directly. Upload or insert images from URL.

×
×
  • Create New...