Can't get email working

General discussion of Mantis.

Moderators: Contributor, Developer

Can't get email working

Postby j_as » Jul 11, 2011 2:00 pm

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?
j_as
 
Posts: 7
Joined: Jul 11, 2011 1:57 pm

Re: Can't get email working

Postby atrol » Jul 11, 2011 3:04 pm

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
Use Mantis2Go to try MantisBT on Windows or to reproduce issues
atrol
Site Admin
 
Posts: 4749
Joined: Mar 26, 2008 4:37 pm
Location: Germany

Re: Can't get email working

Postby j_as » Jul 11, 2011 4:49 pm

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

Re: Can't get email working

Postby j_as » Jul 12, 2011 1:34 am

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: Jul 11, 2011 1:57 pm

Re: Can't get email working

Postby j_as » Jul 12, 2011 9:07 am

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?
j_as
 
Posts: 7
Joined: Jul 11, 2011 1:57 pm

Re: Can't get email working

Postby atrol » Jul 12, 2011 1:11 pm

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
Use Mantis2Go to try MantisBT on Windows or to reproduce issues
atrol
Site Admin
 
Posts: 4749
Joined: Mar 26, 2008 4:37 pm
Location: Germany

Re: Can't get email working

Postby j_as » Jul 12, 2011 1:28 pm

Ok, but what could be wrong then? Which steps do i have to go through to configure emailing?
j_as
 
Posts: 7
Joined: Jul 11, 2011 1:57 pm

Re: Can't get email working

Postby atrol » Jul 12, 2011 2:43 pm

Please use Search before posting and read the Manual
Use Mantis2Go to try MantisBT on Windows or to reproduce issues
atrol
Site Admin
 
Posts: 4749
Joined: Mar 26, 2008 4:37 pm
Location: Germany

Re: Can't get email working

Postby j_as » Jul 13, 2011 3:45 am

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/';
j_as
 
Posts: 7
Joined: Jul 11, 2011 1:57 pm

Re: Can't get email working

Postby LisaP » Jul 13, 2011 8:44 am

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.
LisaP
 
Posts: 1
Joined: Jul 13, 2011 8:36 am
Location: Dixie

Re: Can't get email working

Postby j_as » Jul 14, 2011 4:14 am

The only change, together of course with the config in config_inc.
j_as
 
Posts: 7
Joined: Jul 11, 2011 1:57 pm


Return to General Discussion

Who is online

Users browsing this forum: Bing [Bot], partymix and 4 guests