View Issue Details

IDProjectCategoryView StatusLast Update
0003079mantisbtemailpublic2003-12-13 04:36
Reporterfwuensche Assigned Tovboctor  
PrioritynormalSeveritytweakReproducibilityalways
Status closedResolutionopen 
Summary0003079: Error when using phpMailer
Description

with your fix for the error 0003021 my mailing via phpMailer was broken in 0.18.0a4. I have the phpMailer classes in the php includepath.

Additional Information

I just copied the files class.phpmailer.php and class.smtp.php to the core folder and it works fine. But since these files are shared with other applications i would prefer them to be in the include path

TagsNo tags attached.

Activities

vboctor

vboctor

2003-03-25 08:50

manager   ~0004053

There is several ways to handle this issue:

  1. Lookup under core/ and if not found, assume it is in the include_path.
  2. Remove the full path (i.e. rever 0003021) and assume it will always be in the include_path.
  3. Add phpMailer path to the configs.
  4. Use symbolic links on Unix/Linux systems to phpMailer.
  5. Just copy phpMailer files as suggested in the "additional information".
vboctor

vboctor

2003-04-22 02:24

manager   ~0004223

I found a related problem where if a path is used to include class.phpmailer.php, and SMTP is used, an error is generated where class.smtp.php can not be included (assuming it is not in the include path). The possible fixes to this error are:

  • Set the PluginDir attribute on the phpmailer class to the path that has class.smtp.php.
  • Or include the path in the include_path.
gingi

gingi

2003-07-23 16:57

reporter   ~0004430

Last edited: 2003-07-23 16:58

The phpmailer files should be assumed to be in the include path. It is up to the end-user to make sure that 'include_path' is set correctly in php.ini. This is true about every 3rd party library or header-file that is required by any software package. The line in email_api.php should be:

include_once('class.phpmailer.php');

In other words, in the first bugnote, only solution 2 is viable. The other alternative solutions are hacks. If a user cannot set the include_path correctly (e.g. no write permissions) then symlinking these files, is, I guess, acceptable.

edited on: 07-23-03 16:58

aarjona

aarjona

2003-07-24 18:25

reporter   ~0004437

I think we should go with option 1. The user may not have access to changing php.ini (shared hosting), and there must be a way for them to still use phpMailer.

vboctor

vboctor

2003-07-26 09:40

manager   ~0004445

I am starting to think that option 3 (adding a new config option) is the way to go. The configuration option will be used as follows:

include_once( config_get('phpmailer_path') . 'class.phpmailer.php' );
$mail = new phpmailer;
$mail->PluginDir = config_get('phpmailer_path');
.....

The default value for the path can be:

  1. Empty (i.e. use include path by default)
    or
  2. Core path (for backward compatability).

comments?

vboctor

vboctor

2003-07-27 05:18

manager   ~0004451

Last edited: 2003-07-27 05:19

Fixed in CVS. Will be available in 0.18.0a5. See my last bugnote for details about the fix.

edited on: 07-27-03 05:19

Related Changesets

MantisBT: master 41af43a6

2003-07-26 23:17

vboctor


Details Diff
Fix 0003079: Error when using phpMailer.

M config_defaults_inc.php
- Added $g_phpMailer_path configuration option for specifying the phpMailer directory. If left empty, it is assumed that phpMailer is in the include path.

M core/email_api.php
- (email_send): Use the new config option to include phpMailer files. Also use it to set the plugin directory for phpMailer.

git-svn-id: http://mantisbt.svn.sourceforge.net/svnroot/mantisbt/trunk@2195 <a class="text" href="/?p=mantisbt.git;a=object;h=f5dc347c">f5dc347c</a>-c33d-0410-90a0-b07cc1902cb9
Affected Issues
0003079
mod - config_defaults_inc.php Diff File
mod - core/email_api.php Diff File
mod - doc/ChangeLog Diff File