Can't get email working

General discussion of Mantis.

Moderators: Developer, Contributor

Post Reply
j_as
Posts: 7
Joined: 11 Jul 2011, 18:57

Can't get email working

Post 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?
atrol
Site Admin
Posts: 8366
Joined: 26 Mar 2008, 21:37
Location: Germany

Re: Can't get email working

Post by atrol »

You have to end each line with a ;
For example

Code: Select all

$g_smtp_host = 'smtp.vevida.com';
Please use Search before posting and read the Manual
j_as
Posts: 7
Joined: 11 Jul 2011, 18:57

Re: Can't get email working

Post by j_as »

Ha, of course. Just like the other lines. Not so smart of me. Thanks!
j_as
Posts: 7
Joined: 11 Jul 2011, 18:57

Re: Can't get email working

Post 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.
j_as
Posts: 7
Joined: 11 Jul 2011, 18:57

Re: Can't get email working

Post 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?
atrol
Site Admin
Posts: 8366
Joined: 26 Mar 2008, 21:37
Location: Germany

Re: Can't get email working

Post 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
Please use Search before posting and read the Manual
j_as
Posts: 7
Joined: 11 Jul 2011, 18:57

Re: Can't get email working

Post by j_as »

Ok, but what could be wrong then? Which steps do i have to go through to configure emailing?
atrol
Site Admin
Posts: 8366
Joined: 26 Mar 2008, 21:37
Location: Germany

Re: Can't get email working

Post by atrol »

Please use Search before posting and read the Manual
j_as
Posts: 7
Joined: 11 Jul 2011, 18:57

Re: Can't get email working

Post 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/';
LisaP
Posts: 1
Joined: 13 Jul 2011, 13:36
Location: Dixie
Contact:

Re: Can't get email working

Post 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.
Interested in Phlebotomy Classes? Click here to learn more.
j_as
Posts: 7
Joined: 11 Jul 2011, 18:57

Re: Can't get email working

Post by j_as »

The only change, together of course with the config in config_inc.
Post Reply