I have not necessarily exhausted all my options with my host but I wanted to get some feedback here before I spend any more time. My host is a Windows Server running PHP 5.x, and I got Drupal to install. But I got the error about failing to connect to the mail server.:
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:\Inetpub\edwardgtalbot\drupal64\includes\mail.inc on line 193.
I am fairly certain that I am not going to be able to touch php.ini on this shared server.
I do understand that the if statement in mail.inc is checking the smtp_library for some sort of setup for an external smtp. The error message sounds like all I have to do is run ini_set(), presumably to set the smtp_library variable. But I can't find anything about what the format of this variable is - I imagine I have to do something more than just:
ini_set('smtp_library','my smtp server name') - at a minimum it needs authentication information as well.
And I saw another post somewhere in the forums that suggested it is way more complicated than that, but not being a php programmer, I need something a little more clear about what this involves. Can anyone give me a step by step on how to configure my drupal to access an external SMTP server - assuming I have no access to anything on the server where the drupal is installed except for the stuff in the drupal folders.
Comments
It doesn't sound like your problem
The host should provide a working PHP configuration for you. Their PHP configuration is broken - they need to fix it.
either by: a) providing an SMTP server listening on localhost, or b) reconfiguring PHP so that it connects to their actual mail server.
Or do they not allow you to send email?
--
Anton
> The host should provide a
> The host should provide a working PHP configuration for you. Their PHP configuration is broken - they need to fix it.
Some Windows hosts require you to use a special wrapper for sending mail. I have one client like that but I don't have the login info handy to check the job for details.
--
Erik
https://twitter.com/erik_smith
I use this
I use this http://drupal.org/project/smtp .
--
Erik
https://twitter.com/erik_smith
Hmm, that may not work
I very much appreciate the response. The problem is that the version of that add-in for Drupal 6.4 requires both some PHP add-ins and PHPMailer to be installed. As I indicated, I don't expect my host to be keen on messing with the PHP setup, although at this point, I'm starting to think that I will not be able to use drupal unless they do. It seems like the version 5 one would have worked, but alas I have drupal 6.
I do understand that for my site to send mail, it has to have some basic configuration to allow it to communicate with an SMTP server. I was hoping that it would simply be a case of plugging in the name of an SMTP server somewhere in the drupal code. At this point I guess I'm ready to contact my host and find out what they are willing to do.
Thanks again
>> At this point I guess I'm
>> At this point I guess I'm ready to contact my host and find out what they are willing to do.
You should definitely ask them about it. Most of the hosting providers I've worked with have a solution already worked out long before I even knew there was a problem.
--
Erik
https://twitter.com/erik_smith
Thank-you, Erik - it is working!
Well, I reread the instructions and I decided that I might as well try getting it to work before contacting my host. They are good and they work with me, but I didn't want to ask them to change settings or install anything less I was sure I needed it. They have very very few drupal installations in their 100,000 domains, but I imagine they've had to deal with other PHP/SMTP needs.
I essentially followed the install instructions for the link you sent me for the 6.x development version that uses PHPMailer and it worked. I hadn't been clear before that PHPMailer could be installed completely within my drupal directory without host involvement.
So thanks again!
- Ed