Textpattern CMS support forum
You are not logged in. Register | Login | Help
- Topics: Active | Unanswered
Pages: 1
#1 2006-01-20 04:27:25
- shifter
- New Member
- From: Australia
- Registered: 2006-01-20
- Posts: 8
Mail trouble
Hey guys and girls.
I just tried to add a new (test) author to my site. But it didn’t email the new password. i got this error:
Warning: 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 C:\Program Files\Apache Group\Apache2\htdocs\textpattern4\textpattern\lib\txplib_misc.php on line 793
My settings should be fine in the php.ini file, as I’d recently been using Drupal and that had been sending emails.
Also i looked through the txplib_misc.php file. At line 793 there’s this:
.“Content-Type: text/plain; charset=\”$charset\”$sep”);
which is part of the mail() function which gets returned from the txpMail() function. the ini_set() function is not on that line or in that function.
Also, “localhost” is the name of my MySQL server, not my mail server. for some reason it seems like it’s trying to send email from my MySQL server.
so i’m guessing I have to get it to start sending emials from my email server. any ideas how?
I got no idea how to fix this one. everything else has been working wonderfully.
What is and what should never be
Offline
#2 2006-01-20 04:29:19
- zem
- Developer Emeritus
- From: Melbourne, Australia
- Registered: 2004-04-08
- Posts: 2,579
Re: Mail trouble
The error message tells you exactly what to do:
verify your “SMTP” and “smtp_port” setting in php.ini
There’s a FAQ entry about mail problems.
Last edited by zem (2006-01-20 04:31:13)
Alex
Offline
#3 2006-01-20 04:33:05
- shifter
- New Member
- From: Australia
- Registered: 2006-01-20
- Posts: 8
Re: Mail trouble
yeah. i did. it’s correct. my SMTP = SVREMAIL and my smtp_port = 25
I haven’t changed either of these since my initial setup and it worked for Drupal.
What is and what should never be
Offline
#4 2006-01-20 04:40:40
- shifter
- New Member
- From: Australia
- Registered: 2006-01-20
- Posts: 8
Re: Mail trouble
i just tried changing SMTP = localhost
didn’t work
then i tried putting quotes around it and the smtp_port
didn’t work
then i tried going back to what i had (SMTP = SVREMAIL) and putting quotes around that
didn’t work
and the FAQ hasn’t helped yet (apologies, i must have missed that one before posting here)
so any ideas? am I doing things right?
Last edited by shifter (2006-01-20 04:57:16)
What is and what should never be
Offline
#5 2006-01-20 05:04:36
- zem
- Developer Emeritus
- From: Melbourne, Australia
- Registered: 2004-04-08
- Posts: 2,579
Re: Mail trouble
Have you verified that the smtp server address and port that you’re using are actually correct? (i.e. talk to your tech support people, and/or send mail using those values with a mail client) Also check that you’re editing the correct php.ini file.
There’s nothing special about mail settings for Textpattern. If the PHP settings are correct, it’ll work; if not, it won’t.
The PHP manual page linked from the FAQ has some more info.
Alex
Offline
#6 2006-01-20 05:31:42
- shifter
- New Member
- From: Australia
- Registered: 2006-01-20
- Posts: 8
Re: Mail trouble
ok. Got it working. I WAS editing the wrong php.ini file. I have one in my Apache2 dir, and i thought that was the one pointed to by my PHPIniDir setting in the httpd.conf file. however it was pointing to my PHP4 dir.
Thanks for the help and the quick replies :)
What is and what should never be
Offline
Re: Mail trouble
While using XAMPP, I was facing the same problem until I learnt from shifter’s response (above) that there could be multiple php.ini files.
The correct php.ini while using XAMPP to edit is the one under <code>/apache/bin/php.ini</code>
In a typical XAMPP Windows installation, it should be here: <code>C:\Program Files\xampp\apache\bin\php.ini</code>
Just edit this particular php.ini for the correct SMTP and smtp_port and it works. In my case, it was:
SMTP = company_proxy_server_ip*
smtp_port = 25
(* replace it with your actual proxy server IP address)
Last edited by chetan (2006-01-24 08:32:49)
Offline
Pages: 1