Jump to content
  • Checkout
  • Login
  • Get in touch

osCommerce

The e-commerce.

Need some help in setting email settings


cybat

Recommended Posts

Hi all,

 

I need some help with setting up the emailing part of my newly installed osCommerce installation.

 

Here is the problem I am currently facing.

 

My ISP is blocking port 25, so I can't run a SMTP server, but my ISP does provide a SMTP server but it needs authentication.

 

I wish to use my ISP's SMTP server for the outgoing mail. Right now I don't know how to make it so it logs into the SMTP server and sends the emails. When it tries to send any email it says that authentication is required.

 

I've put in my SMTP settings in the PHP.ini file and changed the osCommerce setting from sendmail to SMTP, but I couldn't find any place to put in the authentication settings.

 

I've read in earlier posts that this can be accomplished by doing the Mail Factory method, but as a PHP newbie I couldn't make any use of it.

 

So if the Mail factory method is the way to go, can any PHP guru out there help guide a PHP newbie to the right way in pasting the code and such.

 

Thank you for taking the time reading my post, and any help will be appriciated.

 

P.S. this is the code that I've took in one of the earlier posts

 

<?

include("Mail.php");

 

$user_contact = '[email protected]';

$to_addr = '[email protected]';

$subject = 'Mail factory test';

$email_body 'This is just a test to see if the mail::factory method works';

 

$headers["From"] = $user_contact;

$headers["To"] = $to_addr;

$headers["Subject"] = $subject;

 

$params["host"] = "localhost.yoursite.com";

$params["port"] = "25";

$params["auth"] = true;

$params["username"] = "user";

$params["password"] = "password";

 

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

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

return $mail_object->send($to_addr, $headers, $email_body);

 

//return $mail_object->send($to_addr, $headers, $this->output);

?>

Link to comment
Share on other sites

Archived

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

×
×
  • Create New...