Page 1 of 1

Can't get email working

Posted: 11 Jul 2011, 19:00
by j_as
I want to make emailing in Mantis work. So I wanted to config the the config_inc file. I put in
$g_smtp_host = 'smtp.vevida.com'

Mantis works after I put that in. But when I type in any of the following rules Mantis doesn't work anymore:

$g_smtp_port = '587'
$g_smtp_connection_mode = 'tls'
$g_smtp_username 'jeffrey@axxxxxx.nl'
$g_smtp_password 'xxxxxxxx'

Parse error: syntax error, unexpected T_VARIABLE in C:\xampp\htdocs\mantis\config_inc.php on line 8

Guess I have done something wrong but I can't figure out what?

Re: Can't get email working

Posted: 11 Jul 2011, 20:04
by atrol
You have to end each line with a ;
For example

Code: Select all

$g_smtp_host = 'smtp.vevida.com';

Re: Can't get email working

Posted: 11 Jul 2011, 21:49
by j_as
Ha, of course. Just like the other lines. Not so smart of me. Thanks!

Re: Can't get email working

Posted: 12 Jul 2011, 06:34
by j_as
After getting the following error:

SYSTEM WARNING: stream_socket_enable_crypto() [streams.crypto]: this stream does not support SSL/crypto

And spending some time trying to resolve it (besides a lot of custom solutions that were of no use to me, I find some things I could edit in php.ini but it didn't work), I decided to download and install phpMailer. But I'm not really sure how to install it? On their website there is no guide either. So I was wondering how to do that. I use XAMPP and the standard Mantis installation.

Re: Can't get email working

Posted: 12 Jul 2011, 14:07
by j_as
Guess I downloaded the wrong phpMailer download. I have put the class files for phpMailer in \XAMPP\php\PEAR and added the following line to the config file, removed the rest:
$g_phpMailer_method = 1;

I've tried all three options and they do not work. Also tried with firewall off. Of course for smtp I filled in host/username/password/port/tls/authentication=true. Filled in the smtp server and port in php.ini. Anyone know what might be the problem? Does Mantis have some sort of log file to see what might be wrong?

Re: Can't get email working

Posted: 12 Jul 2011, 18:11
by atrol
j_as wrote:Guess I downloaded the wrong phpMailer download.
You don't have to download phpMailer
phpMailer is delivered with MantisBT, check directory library/phpmailer of your download

Re: Can't get email working

Posted: 12 Jul 2011, 18:28
by j_as
Ok, but what could be wrong then? Which steps do i have to go through to configure emailing?

Re: Can't get email working

Posted: 12 Jul 2011, 19:43
by atrol

Re: Can't get email working

Posted: 13 Jul 2011, 08:45
by j_as
Ok got it working, found out that apparently openssl.dll wasn't in php.ini with xampp, not even in a comment. Only thing now is that when I want to reset someones password through the web interface on the server itself the supplied url contains localhost instead of my servers ip address. Putting my ip address in config_inc doesn't work, it takes away most of the make up like colors and font from Mantis. This is what I used:
$g_path = 'http://xxx.xxx.xxx.xxx/mantis/';

and

$g_path = 'http://xxx.xxx.xxx.xxx/';

Re: Can't get email working

Posted: 13 Jul 2011, 13:44
by LisaP
j_as wrote:Ok got it working, found out that apparently openssl.dll wasn't in php.ini with xampp, not even in a comment.
j_as, Is that the only change (php.ini) you had to make to get it working? Thanks for posting this. I think it's going to help me too.

Re: Can't get email working

Posted: 14 Jul 2011, 09:14
by j_as
The only change, together of course with the config in config_inc.