Jump to content
  • Checkout
  • Login
  • Get in touch

osCommerce

The e-commerce.

Emails from osc bouncing


UncleSteve

Recommended Posts

I'm getting messages sent out by my install of OSC bounced. The system has been fine for several years, but I think one scanning companny has changed their scanning proceedure and has decided to reject my emails. The message I get back is...

SMTP error from remote mail server after end of data:

host outbound-mail.xscanner.net [95.172.255.104]:

550 Messages should have one or no To headers, not 2.

 

Has anyone come across this before and what did you do to make good? Alternatively where should I look to make good please?

 

Thanks in advance :)

____________________________________________________________________

____________________________________________________________________

Link to comment
Share on other sites

It seems to be telling you that at least some of the outgoing mail is being address "To:" more that one person.

 

If you want multiple recipients you need to use "Cc:" and/or "Bcc:"

 

One example of how to do that is here

 

You need to do some testing ro find out if it is all mail sent or just mail from one page.

 

If it's all mail I'd suspect the problem would be in /catalog/includes/classes/email.php

 

If it's just the mail sent from one page the problem would be in the code on that particular page.

If I suggest you edit any file(s) make a backup first - I'm not perfect and neither are you.

 

"Given enough impetus a parallelogramatically shaped projectile can egress a circular orifice."

- Me -

 

"Headers already sent" - The definitive help

 

"Cannot redeclare ..." - How to find/fix it

 

SSL Implementation Help

 

Like this post? "Like" it again over there >

Link to comment
Share on other sites

It seems to be telling you that at least some of the outgoing mail is being address "To:" more that one person.

 

If you want multiple recipients you need to use "Cc:" and/or "Bcc:"

 

One example of how to do that is here

I haven't tried to do any CC and or BCC, however I followed your link to the page on editing the create account page and tried it. It has stopped the error message I used to get for that page, but has changed the email page format from HTML to plain text with formatting code. So on one hand an improvement, but the other...

 

Do you have any further suggestions please?

____________________________________________________________________

____________________________________________________________________

Link to comment
Share on other sites

Well, I'm not familiar at all with what it takes to get osC to spit out HTML emails.

 

But from what you've posted it has to be something in /catalog/includes/classes/email.php because the mod to the code bypasses that file altogether.

 

You wouldn't happen to remember what code changes you made would you?

:unsure:

 

I guess if you don't remember you could post the contents of the file and I can probably figure it out.

If I suggest you edit any file(s) make a backup first - I'm not perfect and neither are you.

 

"Given enough impetus a parallelogramatically shaped projectile can egress a circular orifice."

- Me -

 

"Headers already sent" - The definitive help

 

"Cannot redeclare ..." - How to find/fix it

 

SSL Implementation Help

 

Like this post? "Like" it again over there >

Link to comment
Share on other sites

If it's all mail I'd suspect the problem would be in /catalog/includes/classes/email.php

 

If it's just the mail sent from one page the problem would be in the code on that particular page.

I've checked my file against an original copy and they're identical, so need to look elsewhere :(

____________________________________________________________________

____________________________________________________________________

Link to comment
Share on other sites

What version of osC do you use?

:unsure:

 

If you are unsure read this

If I suggest you edit any file(s) make a backup first - I'm not perfect and neither are you.

 

"Given enough impetus a parallelogramatically shaped projectile can egress a circular orifice."

- Me -

 

"Headers already sent" - The definitive help

 

"Cannot redeclare ..." - How to find/fix it

 

SSL Implementation Help

 

Like this post? "Like" it again over there >

Link to comment
Share on other sites

What version of osC do you use?

:unsure:

 

If you are unsure read this

Hi,

 

I'm running a very modified osCommerce 2.2-MS2.

 

I've now got someone looking at the problem as its getting frustrating not being able to solve the issue.

 

I've been told this is a two fold issue, first the server needs to be set up differently and second the email sending system needs to be modified. That's all I know at present.

____________________________________________________________________

____________________________________________________________________

Link to comment
Share on other sites

I have a MS2 site on a server I can use to debug things.

 

I did a test and changed the setting in the admin to tell it to use HTML emails but it still doesn't.

 

There are other changes (in the file I recently mentioned) required to truely send HTML emails.

 

My guess is either you have a template and the code in the file has been wrong all along.

 

Or, whomever made the changes required for HTML email made a slight error when modifying the file.

 

Unless you want to post the file I mentioned (or PM it to me) there's nothing more I can do.

 

And even if you do post/PM the file I can't guarantee anything other than I'll try to figure out the problem.

 

I suppose the problem could be elsewhere but I can't imagine where.

If I suggest you edit any file(s) make a backup first - I'm not perfect and neither are you.

 

"Given enough impetus a parallelogramatically shaped projectile can egress a circular orifice."

- Me -

 

"Headers already sent" - The definitive help

 

"Cannot redeclare ..." - How to find/fix it

 

SSL Implementation Help

 

Like this post? "Like" it again over there >

Link to comment
Share on other sites

As this didn't seem to be an easy problem to solve I asked www.systemsmanager.net to make good the problems I had been experiencing. The result of their work is that my emails are now going out correctly and I'm also getting a copy of the customers order conformation email in to my in box.

 

The following files were changed to solve my problems

checkout_process.php

includes/functions/general.php

includes/classes.email.php

 

The changes consisted of...

checkout_process.php - original file/code

Approx line 542....

 tep_mail($order->customer['firstname'] . ' ' . $order->customer['lastname'], $order->customer['email_address'], EMAIL_TEXT_YOUR_PURCHASE_ORDER_REF_NUMBER
. ' ' . $insert_id . ' ' .
_
, $email_order, STORE_OWNER, STORE_OWNER_EMAIL_ADDRESS);

  tep_mail('', SEND_EXTRA_ORDER_EMAILS_TO, EMAIL_TEXT_YOUR_PURCHASE_ORDER_REF_NUMBER . ' ' . $insert_id . ' ' .__, $email_order, STORE_OWNER, STORE_OWNER_EMAIL_ADDRESS);

checkout_process.php - new code

 tep_mail($order->customer['firstname'] . ' ' . $order->customer['lastname'], $order->customer['email_address'], EMAIL_TEXT_YOUR_PURCHASE_ORDER_REF_NUMBER . ' ' . $insert_id . ' ', $email_order, STORE_OWNER, STORE_OWNER_EMAIL_ADDRESS);

  tep_mail('', SEND_EXTRA_ORDER_EMAILS_TO, EMAIL_TEXT_YOUR_PURCHASE_ORDER_REF_NUMBER . ' ' . $insert_id . ' ', $email_order, STORE_OWNER, STORE_OWNER_EMAIL_ADDRESS);

 

/includes/classes/email.php - original file/code

Approx line 159....

$this->html = tep_convert_linefeeds(array("\r\n", "\n", "\r"), '<br>', $html);

Approx line 520....

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));

/includes/classes/email.php - new code

Approx line 159....

$this->html = tep_convert_linefeeds(array("\r\n", "\n", "\r"), '<br />', $html);

 

Approx line 520...

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

 

/includes/functions/general.php - original file/code

Approx line 1384...

 // function tep_mail($to_name, $to_email_address, $email_subject, $email_text, $from_email_name, $from_email_address) {

 function tep_mail($to_name, $to_email_address, $email_subject, $email_text, $from_email_name) {

/includes/functions/general.php - new

Approx line 1384...

function tep_mail($to_name, $to_email_address, $email_subject, $email_text, $from_email_name, $from_email_address) {

 //function tep_mail($to_name, $to_email_address, $email_subject, $email_text, $from_email_name) {

 

 

Do remember when comparing my code and line numbers, my site has has many updates, contributions and tweaks over the years, so may be totally different from your own, but the reason for posting is to aid others with the same or similar problems.

 

Thanks must go to Peter McGarth at systemsmanager.net

____________________________________________________________________

____________________________________________________________________

Link to comment
Share on other sites

Archived

This topic is now archived and is closed to further replies.

×
×
  • Create New...