Jump to content
  • Checkout
  • Login
  • Get in touch

osCommerce

The e-commerce.

Web Host uses SMTP Script for Mail Server - where do I put it?


Guest

Recommended Posts

Posted

My web host uses a script. I am on a shared Linux server tha does not seem to require authentification.

Here is an excerpt from the hosting company

To be able to send mail from scripts and applications you must change the mail server from "mail.your_domain.name" to "scriptmail.intermedia.net".

and sent me this code

-->

<?php

include('Mail.php');

 

$recipients = '"John Doe" <[email protected]>';

$headers['From'] = '"Me" <[email protected]>';

$headers['To'] = '"John Doe" <[email protected]>';

$headers['Cc'] = '"John Bareleycorn" <[email protected]>, "John Bull" <[email protected]>';

$headers['Bcc'] = '"John Collins" <[email protected]>';

$headers['Subject'] = 'test php message subject';

$body = 'Test php message body';

$params['host'] = 'scriptmail.intermedia.net';

 

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

 

if ( $mail_object->send($recipients, $headers, $body) ) {

echo "Mail was successfully sent";

}

else {

echo "Cannot send mail!";

}

?>

 

I do not have access to the php.ini, so I can't add anything to it. I am a bit confused as to where I would actually put this code? I would assume it would go into the email.php, but I don't see anything about the SMTP Server. I tried installing the code in email.php, at line 523 to see what would happen and it didn't do anything.

Did a search but did not see anything that looked like my situation.

Has anyone ever had to do this?

Thanks in advance.

Steve

Posted

Never mind I found it.... The SMTP Authentication contribution had the clue. Emails are a bit trashy but they are working.

Archived

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

×
×
  • Create New...