Not able to sign up

Get help from other users here.

Moderators: Developer, Contributor

Post Reply
priyanka
Posts: 10
Joined: 25 Aug 2010, 06:24

Not able to sign up

Post by priyanka »

I install mantis BT 1.2.2 . When i sign up for an different user ather then administrator. i am not getting any
conformation mail from mantis. my config_inc.php looks like


g_phpMailer_method = PHPMAILER_METHOD_MAIL; # or PHPMAILER_METHOD_SMTP, PHPMAILER_METHOD_SENDMAIL
$g_smtp_host = 'localhost'; # used with PHPMAILER_METHOD_SMTP
$g_smtp_username = ''; # used with PHPMAILER_METHOD_SMTP
$g_smtp_password = ''; # used with PHPMAILER_METHOD_SMTP
$g_administrator_email = 'administrator@example.com';
$g_webmaster_email = 'webmaster@example.com';
$g_from_name = 'Mantis Bug Tracker';
$g_from_email = 'noreply@example.com'; # the "From: " field in emails
$g_return_path_email = 'admin@example.com'; # the return address for bounced mail
$g_email_receive_own = OFF;
atrol
Site Admin
Posts: 8366
Joined: 26 Mar 2008, 21:37
Location: Germany

Re: Not able to sign up

Post by atrol »

Are you able to send mail per command line with program "mail" from your server?
Please use Search before posting and read the Manual
istvanb
Posts: 226
Joined: 22 Aug 2010, 21:00

Re: Not able to sign up

Post by istvanb »

Create a "testmail" folder next to your mantisbt folder, and create an index.php file with the following content below. Fill out the appropriate fields like username with your name. Then open a browser window and type: http://localhost/testmail

if the mail can be sent successfully then it means your PC is configured properly, so it is something with the mantis config (maybe incorrect mail server login etc). This code WORKS with gmail for sure so if you have a gmail account I recommend to start with this script first to narrow down the problem. If you dont have a gmail account then the script needs to be modified. (but you can always create a junk gmail account to test this:)

If you try this we can narrow down your problem and go from there!

istvan



<?php
require_once "Mail.php";

$from = "username@gmail.com";
$to = "username@gmail.com";
$subject = "Hi!";
$body = "Hi,\n\nHow are you?";

$host = "ssl://smtp.gmail.com";
$port = "465";
$username = "username@gmail.com";
$password = "password";

$headers = array ('From' => $from,
'To' => $to,
'Subject' => $subject);
$smtp = Mail::factory('smtp',
array ('host' => $host,
'port' => $port,
'auth' => true,
'username' => $username,
'password' => $password));

$mail = $smtp->send($to, $headers, $body);

if (PEAR::isError($mail)) {
echo("<p>" . $mail->getMessage() . "</p>");
} else {
echo("<p>Message successfully sent!</p>");
}
?>
priyanka
Posts: 10
Joined: 25 Aug 2010, 06:24

Re: Not able to sign up

Post by priyanka »

thanks for reply,

I sent mail with test.php as you said and my message sent successfully.but email conformation from mantis i m still not getting my config_inc_php file like :

g_phpMailer_method = 2; # or PHPMAILER_METHOD_SMTP, PHPMAILER_METHOD_SENDMAIL
$g_smtp_host = 'ssl://smtp.gmail.com'; # used with PHPMAILER_METHOD_SMTP
$g_smtp_username = 'priyanka01031983@gmail.com'; # used with PHPMAILER_METHOD_SMTP
$g_smtp_password = '01031983'; # used with PHPMAILER_METHOD_SMTP
$g_administrator_email = 'priyanka01031983@gmail.com';
$g_webmaster_email = 'webmaster@example.com';
$g_from_name = 'Mantis Bug Tracker';
$g_from_email = 'priyanka01031983@gmail.com'; # the "From: " field in emails
$g_smtp_port = 465;
$g_enable_email_notification = ON;
istvanb
Posts: 226
Joined: 22 Aug 2010, 21:00

Re: Not able to sign up

Post by istvanb »

Hi,

I am not sure about the problem because your setup looks ok. However you can try what you see below. If the cronjob is on, then Mantis wont send mails without triggering an event to send, so just turn it off. (however I am concerned since its of by default in the config_defaults_inc.php). Give it a try and let me know what is the status! (Add the from_name, from_email etc variables as well!)

good luck,
i-


$g_phpMailer_method = PHPMAILER_METHOD_SMTP;
$g_smtp_connection_mode = 'ssl';
$g_smtp_host = 'smtp.gmail.com';
$g_smtp_port = 465;
$g_smtp_username = 'yourusername@gmail.com';
$g_smtp_password = 'yourpassword';
$g_enable_email_notification = ON;
$g_email_send_using_cronjob = OFF;
priyanka
Posts: 10
Joined: 25 Aug 2010, 06:24

Re: Not able to sign up

Post by priyanka »

Thanks for help.I try with your setting of config_inc.php. still not getting email from mantis.
priyanka
Posts: 10
Joined: 25 Aug 2010, 06:24

Re: Not able to sign up

Post by priyanka »

I even try with my yahoo mailid with following setting

$g_smtp_host = 'smtp.mail.yahoo.com';
$g_smtp_port = '25';
$g_smtp_username = 'mymail@yahoo.com';
$g_smtp_password = 'mypass';
$g_enable_email_notification = ON;
$g_email_send_using_cronjob = OFF;
$g_phpMailer_method = PHPMAILER_METHOD_SMTP;

but not getting mail. kindly help me.

. actully anyhow user can able to login. so can admin change password of particular user.or maintain it.
if admin can do it mannualy. it solve my problem and i can start using mantis.
istvanb
Posts: 226
Joined: 22 Aug 2010, 21:00

Re: Not able to sign up

Post by istvanb »

Now I am a little bit confused. You wrote you dont receive an email if you sign up for an account different than admin. But how can you do that? Normally you sign up for a reporter account. Does this means you RECEIVE some of the emails, but not all of them? Because if the answer is yes to this question than the email settings in the config_inc.php is correct and something is wrong the mantis. I guess the problem is that you dont receive any emails at all. let me know.

Actually the code looks just fine and PHP looks fine since you were able to send mails by the code I have posted. I have ran out of ideas. I use 1.2.2 as well.
priyanka
Posts: 10
Joined: 25 Aug 2010, 06:24

Re: Not able to sign up

Post by priyanka »

I am not getting any mail at all.
istvanb
Posts: 226
Joined: 22 Aug 2010, 21:00

Re: Not able to sign up

Post by istvanb »

I am sorry mate, I have ran out of ideas. Your PHP config is fine because you were able to send mails with php, so something is wrong with your mantis setup. Just copy your config_inc.php AS IT IS to the forum, and I can see if I can spot an error (which I am doubt).
abf
Posts: 1
Joined: 06 Sep 2010, 08:05

Re: Not able to sign up

Post by abf »

hello
Please help me, I can not send a mail from a mantis and even with the testmail its not working I get an error "This error (HTTP 500 Internal Server Error) means that the Web site you visit has met Please help me, I can not send a mail from a mantis and even with the testmail its not working I get an error "This error (HTTP 500 Internal Server Error) means that the Web site you visit has met a server problem which prevented the display of the webpage. "
below the script index.php testmail:

<?php
require_once "Mail.php";

$from = "abf@gmail.com";
$to = "abf@yahoo.fr";
$subject = "Hi!";
$body = "Hi,\n\nHow are you?";

$host = "ssl://smtp.gmail.com";
$port = "465";
$username = "abf@gmail.com";
$password = "*********";

$headers = array ('From' => $from,
'To' => $to,
'Subject' => $subject);
$smtp = Mail::factory('smtp',
array ('host' => $host,
'port' => $port,
'auth' => true,
'username' => $username,
'password' => $password));

$mail = $smtp->send($to, $headers, $body);

if (PEAR::isError($mail)) {
echo("<p>" . $mail->getMessage() . "</p>");
} else {
echo("<p>Message successfully sent!</p>");
}
?>

It is required to install phpmailer? If yes how to install?
Thank you for helping me.
istvanb
Posts: 226
Joined: 22 Aug 2010, 21:00

Re: Not able to sign up

Post by istvanb »

Hi,

Do you have your http and sql server running? Where did you copied the testmail folder? Can open the mantis login page in your browser?

i-
smidgin
Posts: 1
Joined: 16 Sep 2010, 22:21

Re: Not able to sign up

Post by smidgin »

Check that your email reader is not sending your emails to the spam folder. I setup my email to go my yahoo account and they were all marked as spam.
jmarcosfilho
Posts: 1
Joined: 21 Sep 2010, 17:02

Re: Not able to sign up

Post by jmarcosfilho »

require_once "Mail.php";

Where do I find this file?

My error is :

Warning: require_once(Mail.php) [function.require-once]: failed to open stream: No such file or directory in C:\wamp\www\testemail\index.php on line 2

Fatal error: require_once() [function.require]: Failed opening required 'Mail.php' (include_path='.;C:\php5\pear') in C:\wamp\www\testemail\index.php on line 2
Post Reply