Mail server settings in PHP

My php site is trying to send a simple email but I'm getting the following error:

Warning: mail() [function.mail]: Failed to connect to mailserver at "localhost" port 25, verify your "SMTP" and "smtp_port" setting in php.ini or use ini_set() in D:\hshome\qcsitter\qcsitter.com\newsletter.php on line 86

I believe the php.ini for my domain needs to be modified by the JodoHost team with the right settings. Do I have access to this file through the CP or must the support team take care of it for me?
 
it would be best to use ini_set to point to your mail server for proper SMTP Auth mail.
As I remember it you are on w2k8 server where we are not able to provide custom php.ini to this point, and we edited the global ini for your mysql connection.
 
Yes, that was me and I really appreciate you changing that setting for me as it is working great now! However, my application cannot send email because there is no localhost smtp service and I can't use mail.qcsitter.com because PHP on IIS doesn't support authentication using the native php mail() function.

That is, I'm unable to authenticate using ini_set as smtp auth isn't supported on IIS. There are two options that can be had from here though:

1. Modify the php.ini to my mail server settings (or your own) and tell the mail server to allow relay from my domain locally (something you'd have to do Stephen).

or

2. I could try to use Pear's functionality in PHP and I see that you've included Pear in the PHP setup but I'm unsure if it will function as I need.

Is option 1 a possibilty Stephen? Thanks for your help.
 
Update: I created a test script quick to try to use Pear and it failed to find Mail.php which would be in the Pear directory. So looks like both will have to be handled on your side to resolve this.
 
I will check it, about local SMTP, it is actually on and set to allow relay, so it may be attempting to go through the firewall in some manner, I'll check that log, but it should not do this.

As for two, I'll work on pear libs, they are needed certainly, which version of php are you using I remember working on the matter but was trying for php4 and 5, I will need to do the same here, but you can confirm if one works.

Actually PEAR libs can be referenced from another path, since just classes, they don't require a server side install. However I'll work to make it a little easier if possible.
 
I think your app should be able to use localhost now, let me know if any issue continues.
 
Back
Top