?
Solved

PHP Email setup

Posted on 2006-10-26
10
Medium Priority
?
5,182 Views
Last Modified: 2009-11-10
Hello,

I've just set up a website using PHP, with an application called Mantis. THis all works. The only trouble i've got is setting up the email functionality (i've never done this before, so it is probably just my ignorance). I assume the Mantis app, uses a PHP script to forward the email?

The setup i have is:
Windows 2003 server, running IIS, PHP, and Mantis
Windows 2003 server, running Exchange 2003 Enterprise.

Any assistance would be appreciated.

Cheers
0
Comment
Question by:rtl_support
[X]
Welcome to Experts Exchange

Add your voice to the tech community where 5M+ people just like you are talking about what matters.

  • Help others & share knowledge
  • Earn cash & points
  • Learn & ask questions
  • 4
  • 4
10 Comments
 
LVL 18

Expert Comment

by:Mark Gilbert
ID: 17810869
I've just had a look at the mantis bug tracker website, and note that there is a configuration page specifically for email available at:

http://manual.mantisbugtracker.com/manual.configuration.email.php

I would recommend looking at using the php mailer classes which are in step $g_use_phpMailer.

These files allow you to configure your email handling to use specific servers, and and as you are using Exchange, I'm assuming you require authentication on that?...if so, you can put all the authentication parameters into the class files.

Hope this helps
0
 

Author Comment

by:rtl_support
ID: 17812185
Thanks for the response, i have tried that, but had no luck(i must be doing something really stupid), i keep getting this error:

Problems Sending mail to: david@radiotaxis.co.uk
Mailer Error: Could not instantiate mail function

No matter what changes I make, i get the same error?
0
 
LVL 18

Expert Comment

by:Mark Gilbert
ID: 17812444
Wow, this is the second time today that someone has had an error like this.  Okay, here's a link to a question I answered earlier on today that I think you will find very helpful:

http://www.experts-exchange.com/Web/Web_Languages/PHP/Q_22038354.html
0
Percona Live Europe 2017 | Sep 25 - 27, 2017

The Percona Live Open Source Database Conference Europe 2017 is the premier event for the diverse and active European open source database community, as well as businesses that develop and use open source database software.

 

Author Comment

by:rtl_support
ID: 17813523
Hi resolved the:

Problems sending mail to: david@ ........... error.

What i did to resolve this was open the "config_defaults_inc.php" file in the mantis folder and change the setting: $g_phpmailer_method = 0, to 2, so now it uses smtp.

Now when i reset the password, it says, message sent, but i'm not receiving it. The only thing i'm not sure about is which file holds the smpt server config, i've found three: "config_defaults_inc.php"(c:\program files\mantis), "class.smtp.php"(c:\php\includes) and "class.phpmailer.php"(c:\php\includes).

I've been using the "config_defaults_inc.php" file, and if i put in an incorrect ip address, it does fail to send the message, and warns me, and if i put the correct one in it seams to work, so i think thats confirmed that my messages are connecting to the mailserver.

I am however sending to port 25, which is our mail filtering gateway, i'd like to configure php/mantis, to send to another port, which is our mailserver, and thats why i need to know which file to use?

Thanks in advance
0
 
LVL 18

Expert Comment

by:Mark Gilbert
ID: 17814664
The file that you should be configuring is class.phpmailer.php.
0
 

Author Comment

by:rtl_support
ID: 17817631
I've tried configuring the class.phpmailer.php file, but it doesn't pick the settings up. If i put in an incorrect smtp address, into the config_defaults_inc.php, it picks it up, and errors upon sending an email, yet if i put in an incorrect address into the class.phpmailer.php file, it doesn't have any effect.

I have edited the config_inc file in the mantis folder, to use phpmailer:

<?php
      $g_hostname = 'localhost';
      $g_db_type = 'mysql';
      $g_database_name = 'bugtracker';
      $g_db_username = 'root';
      $g_db_password = '********';      
      $g_use_phpMailer = ON;
      $g_phpMailer_path = "C:\php\includes";

?>

But its still not working?
0
 

Author Comment

by:rtl_support
ID: 17818112
I've resolved the problem, by not using phpmailer.php. I ran the check.php file in ie, and it gave me two errors, stating that phpmailer is obsolete. So i edited the config_inc.php file, and added:

$g_smtp_host    = "111.40.121.191:97";

And this resolved the problem.

in order for it to work you have to edit the config_defaults_inc.php file, and change the parameter to smpt:

$g_phpMailer_method            = 2;

Thanks for your assistance
0
 
LVL 18

Expert Comment

by:Mark Gilbert
ID: 17818399
Sorry for the delay in getting back to you, but I'm happy to hear that you have resolved the issue.  Interesting points, I'll be sure to add this to my bookmarks for future reference.
0
 
LVL 1

Accepted Solution

by:
Computer101 earned 0 total points
ID: 18032657
PAQed with points refunded (500)

Computer101
EE Admin
0

Featured Post

Get MongoDB database support online, now!

At Percona’s web store you can order your MongoDB database support needs in minutes. No hassles, no fuss, just pick and click. Pay online with a credit card. Handle your MongoDB database support now!

Question has a verified solution.

If you are experiencing a similar issue, please ask a related question

When it comes to security, close monitoring is a must. According to WhiteHat Security annual report, a substantial number of all web applications are vulnerable always. Monitis offers a new product - fully-featured Website security monitoring and pr…
Q&A with Course Creator, Mark Lassoff, on the importance of HTML5 in the career of a modern-day developer.
The viewer will learn how to create and use a small PHP class to apply a watermark to an image. This video shows the viewer the setup for the PHP watermark as well as important coding language. Continue to Part 2 to learn the core code used in creat…
This tutorial will teach you the core code needed to finalize the addition of a watermark to your image. The viewer will use a small PHP class to learn and create a watermark.
Suggested Courses

752 members asked questions and received personalized solutions in the past 7 days.

Join the community of 500,000 technology professionals and ask your questions.

Join & Ask a Question