Jump to content
Sign in to follow this  

php Mail Compatibility Issues

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:





$recipients = 'webmaster@rfsafe.com';


$headers['From'] = 'webmaster@rfsafe.com';

$headers['To'] = 'webmaster@rfsafe.com';

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


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


$params['host'] = '';


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

Share this post

Link to post
Share on other sites

Create an account or sign in to comment

You need to be a member in order to leave a comment

Create an account

Sign up for a new account in our community. It's easy!

Register a new account

Sign in

Already have an account? Sign in here.

Sign In Now
Sign in to follow this