Page 1 of 1
Mail funtion does not seem to work
Posted: 11 Apr 2011, 08:34
by Reindero
Been struggling with this for some time, but I cant seem to get the mail to work in Mantis 1.24

.
Config:
$g_phpMailer_method = PHPMAILER_METHOD_SENDMAIL;
Using Apache as webserver. When trying to send a testmail I get an error.
"Testing Mail - PROBLEMS SENDING MAIL TO:
bla@bla.com. Please check your php/mail server settings."
Do I need to make changes somewhere else? Can anyone PLZ help? Really stuck here

Re: Mail funtion does not seem to work
Posted: 11 Apr 2011, 18:05
by Reindero
I've added in the php.ini file the following line:
[mail function]
sendmail_path = /bin/sendmail
and created the directory /sendmail (was not there).
When testing the mail (trough admin) it said that mail() was succesfull.
But I have the distinct fealing that sendmail should not be a dit. but a file (.php) since I did not recieve any mail. Any ideas?
Re: Mail funtion does not seem to work
Posted: 11 Apr 2011, 21:50
by crp
Reindero wrote:I've added in the php.ini file the following line:
[mail function]
sendmail_path = /bin/sendmail
and created the directory /sendmail (was not there).
When testing the mail (trough admin) it said that mail() was succesfull.
But I have the distinct fealing that sendmail should not be a dit. but a file (.php) since I did not recieve any mail. Any ideas?
What is currently in /bin/sendmail? if the sendmail package is not there, php will not do anything with the email.
I found that MantisBT always reports that email was successful , even when nothing happens.
The MantisBT experts recommend using a php script (/mantis/htdocs/scripts/send_emails.php) in a cron job to send email.
Re: Mail funtion does not seem to work
Posted: 12 Apr 2011, 08:15
by Reindero
Err, what does that mean? That the Sendmail_path should be "/mantis/htdocs/scripts/send_emails.php" ? How do those cron jobs work then?
Currently there is nothing in that folder btw....
Re: Mail funtion does not seem to work
Posted: 12 Apr 2011, 18:08
by Reindero
Finally got the mail to work.....but with an external SMTP from Gmail (which I didnt really want to use).
Can anyone tell me how the SENDMAIL or MAIL option work? What do I need to do in the Mantis Config and the Apache php.ini file to get this to work??
Re: Mail funtion does not seem to work
Posted: 13 Apr 2011, 17:56
by crp
Is sendmail installed on your system? what is the result of
when you enter it at a command prompt?
Re: Mail funtion does not seem to work
Posted: 13 Apr 2011, 18:15
by Reindero
'which'is not recognized as an internal or external command, operable program or batch file.
Any other way I can check if it is installed?
Re: Mail funtion does not seem to work
Posted: 13 Apr 2011, 20:11
by atrol
Reindero wrote:
Any other way I can check if it is installed?
Re: Mail funtion does not seem to work
Posted: 14 Apr 2011, 13:18
by Reindero
The system cannot find the file specified.
so I guess not

Re: Mail funtion does not seem to work
Posted: 15 Apr 2011, 17:44
by crp
Are you running on Windows? which OS ?
Re: Mail funtion does not seem to work
Posted: 18 Apr 2011, 08:37
by Reindero
Yeah, running windows. I believe 2008....(server)
Re: Mail funtion does not seem to work
Posted: 18 Apr 2011, 22:18
by crp
Reindero wrote:Yeah, running windows. I believe 2008....(server)
Then I would use an SMTP setup. There are a few out there, not just gmail, that could do the job for you.
Or you can search for someone willing to help you setup the email server within W2008
Re: Mail funtion does not seem to work
Posted: 23 Apr 2011, 17:48
by Reindero
A, thanks. But creating a gmail account for this purpose seems to be sufficient at this time

Cheers
Re: Mail funtion does not seem to work
Posted: 04 May 2011, 10:27
by crewman
When testing the mail (trough admin) it said that mail() was succesfull.
But I have the distinct fealing that sendmail should not be a dit. but a file (.php) since I did not recieve any mail. Any ideas?
Re: Mail funtion does not seem to work
Posted: 06 May 2011, 17:04
by crp
crewman wrote:When testing the mail (trough admin) it said that mail() was succesfull.
It always says it was successful even when no email actually was sent. It is only checking to see if the function worked not if the process called by the function worked.
crewman wrote:
But I have the distinct fealing that sendmail should not be a dit. but a file (.php) since I did not recieve any mail. Any ideas?
what is a "dit" ?