Jump to content
  • Checkout
  • Login
  • Get in touch

osCommerce

The e-commerce.

Some email functions not working


Guest

Recommended Posts

Posted

Hello all,

 

First I want to appreciate any help you may give. This is my first store as we all have gone through and i am able to send emails to clients from tools section -> send email, but when updating an order status it is giving me this error.....

 

SMTP Error: The following recipients failed: [email protected]

Warning: Cannot modify header information - headers already sent by (output started at E:\Sites\Single4\clermany2\webroot\tpsbb2\trastienda\includes\classes\phpmailer\class.phpmailer.php:586) in E:\Sites\Single4\clermany2\webroot\tpsbb2\trastienda\includes\functions\general.php on line 22

 

In line 22 this is the text....

 

<?php

/*

$Id: general.php,v 1.160 2003/07/12 08:32:47 hpdl Exp $

 

osCommerce, Open Source E-Commerce Solutions

http://www.oscommerce.com

 

Copyright © 2007 osCommerce

 

Released under the GNU General Public License

*/

 

////

// Redirect to another page or site

function tep_redirect($url) {

global $logger;

 

if ( (strstr($url, "\n") != false) || (strstr($url, "\r") != false) ) {

tep_redirect(tep_href_link(FILENAME_DEFAULT, '', 'NONSSL', false));

}

 

header('Location: ' . $url);

 

----------------------------------------------------------

in line 586 fo the class.phpmailer.php it says.....

----------------------------------------------------------

 

/////////////////////////////////////////////////

// METHODS, MAIL SENDING

/////////////////////////////////////////////////

 

/**

* Creates message and assigns Mailer. If the message is

* not sent successfully then it returns false. Use the ErrorInfo

* variable to view description of the error.

* @return bool

*/

public function Send() {

try {

if ((count($this->to) + count($this->cc) + count($this->bcc)) < 1) {

throw new phpmailerException($this->Lang('provide_address'), self::STOP_CRITICAL);

}

 

// Set whether the message is multipart/alternative

if(!empty($this->AltBody)) {

$this->ContentType = 'multipart/alternative';

}

 

$this->error_count = 0; // reset errors

$this->SetMessageType();

$header = $this->CreateHeader();

$body = $this->CreateBody();

 

if (empty($this->Body)) {

throw new phpmailerException($this->Lang('empty_message'), self::STOP_CRITICAL);

}

 

// digitally sign with DKIM if enabled

if ($this->DKIM_domain && $this->DKIM_private) {

$header_dkim = $this->DKIM_Add($header,$this->Subject,$body);

$header = str_replace("\r\n","\n",$header_dkim) . $header;

}

 

// Choose the mailer and send through it

switch($this->Mailer) {

case 'sendmail':

return $this->SendmailSend($header, $body);

case 'smtp':

return $this->SmtpSend($header, $body);

default:

return $this->MailSend($header, $body);

}

 

} catch (phpmailerException $e) {

$this->SetError($e->getMessage());

if ($this->exceptions) {

throw $e;

}

echo $e->getMessage()."\n";

 

 

PLEASE ENLIGHTEN ME, I HAVE NO IDEA OF PHP AND SENDING INDIVIDUAL EMAILS IS GETTING TEDIOUS.

 

MANY THANKS

 

;) :'( :'( :'(

Posted

the warning tells you where the problem originates from

Warning: Cannot modify header information - headers already sent by (output started at E:\Sites\Single4\clermany2\webroot\tpsbb2\trastienda\includes\classes\phpmailer\class.phpmailer.php:586

file trastienda\includes\classes\phpmailer\class.phpmailer.php

Line 586

im guessing its white space before the ?> or usually its at the top of the file, check your file for this space its usually a space then the <?php opening that cuases it, or at the end of the file with the closing ?>

Nic

Sometimes you're the dog and sometimes the lamp post

[/url]

My Contributions

Archived

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

×
×
  • Create New...