Jump to content
  • Checkout
  • Login
  • Get in touch

osCommerce

The e-commerce.

php Mail Compatibility Issues


JohnCoates

Recommended Posts

Hi everyone, I hope the community is ready for a good challange? It will be a great contribution!

 

This is the skinny. I installed oscommerce to freeservers, everything works great but the mail features. It does not work if I use the Tell A Friend or email from Admin or anything to do with mail -

 

These are the warnings I get when using any oscommerce mail operation

 

Warning: Could not execute mail delivery program in /www/cgi/oscommerce/catalog/includes/classes/email.php on line 502

 

Warning: Cannot add header information - headers already sent by (output started at /www/cgi/oscommerce/catalog/includes/classes/email.php:502) in /www/cgi/oscommerce/catalog/includes/functions/general.php on line 29

It was suggested that I use simpler php mail form to locate where the problem was " the server or my code" Well it's kind of neither ones fault. My PHP code is the way is should be, but freeservers is using differnet tags and path to their mail server.

 

 

 

Here is the php mail script that does work on the freeservers server (my Host)

 

example of sending mail in PHP with on freeservers.com

 

NOTE: By default (PEAR) Pear/Mail.php is installed on my server at freeservers. Find details at http://www.pear.php.net - working example follows:

 

<?php

include('Mail.php');

 

$recipients = '[email protected]';

 

$headers['From'] = '[email protected]';

$headers['To'] = '[email protected]';

$headers['Subject'] = 'Test message 1';

 

$body = 'Test message 2 with the body.';

 

$params['host'] = '127.0.0.1';

 

// Create the mail object using the Mail::factory method

$mail_object =& Mail::factory('smtp', $params);

 

$mail_object->send($recipients, $headers, $body);

print "Sent Mail message to $recipients";

?>

 

A few million webmasters use Freservers hosting, and I being one of them cant want to use oscommerce!

 

Please give it a shot - its over my head

 

I need help bad with this one!

 

Thanks again everyone

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...