Mantis Bug Tracker
 

View Issue Details Jump to Notes ] Wiki ] Related Changesets ] Issue History ] Print ]
IDProjectCategoryView StatusDate SubmittedLast Update
0008369mantisbtemailpublic2007-09-17 16:392008-04-19 04:10
ReporterTomSpilman 
Assigned Togiallu 
PrioritynormalSeverityfeatureReproducibilityalways
StatusclosedResolutionfixed 
PlatformOSOS Version
Product Version 
Target VersionFixed in Version1.2.0a1 
Summary0008369: Making phpMail work with Gmail
DescriptionBy default phpMail doesn't work with gmail smtp servers. This is a fix to make this work properly in Mantis.
Additional InformationTo avoid STARTTLS issues you can use SSL to send via gmail via the following config:

$g_phpMailer_method = 2;
$g_smtp_host = 'ssl://smtp.gmail.com:465'; [^]
$g_smtp_username = 'address@mydomain.com';
$g_smtp_password = 'myPassword';

... then class.phpmailer.php needs the SmtpConnect() function fixed to deal with both the protocol and port being in the host string (it assumes only one colon in the host string). I've attached a fixed version of class.phpmailer.php to this bug report.
TagsNo tags attached.
Attached Files? file icon class.phpmailer.php [^] (46,758 bytes) 2007-09-17 16:39 [Show Content]

- Relationships

-  Notes
User avatar (0015669)
vboctor (administrator)
2007-09-20 02:29

I would like to avoid changing PHPMailer implementation. I suggest that you report a feature request for PHPMailer. Although it seems that lately PHPMailer project hasn't been active and hence we may consider moving to another library.

However, what we can do is the following:

1. Add $g_smtp_port configuration option and default it to 25.
2. Rather than using the PHPMailer class default port (which is 25), use the configured port.

This will work perfectly except in the scenario where an admin wants to configure multiple SMTP servers with a different port for each one. This enhancement should only require changing config_defaults_inc.php and core/email_api.php.

Let me know if this makes sense.
User avatar (0016948)
giallu (developer)
2008-02-04 19:38

PHPMailer 2.0 added support for tls/ssl connections, so now gmail SMTP is accessible using:

$g_smtp_host = 'smtp.gmail.com:465';
$g_smtp_connection_mode = 'ssl';

plus, of course, login and password...

- Related Changesets
MantisBT: master e966f469
Timestamp: 2008-02-05 00:34:52
Author: giallu
Details ] Diff ]
Fix 8369: Making phpMail work with Gmail

git-svn-id: http://mantisbt.svn.sourceforge.net/svnroot/mantisbt/trunk@4957 [^] /?p=mantisbt.git;a=object;h=f5dc347c-c33d-0410-90a0-b07cc1902cb9
mod - config_defaults_inc.php Diff ] File ]
mod - core/email_api.php Diff ] File ]

- Issue History
Date Modified Username Field Change
2007-09-17 16:39 TomSpilman New Issue
2007-09-17 16:39 TomSpilman File Added: class.phpmailer.php
2007-09-17 16:39 TomSpilman Issue Monitored: TomSpilman
2007-09-20 02:29 vboctor Note Added: 0015669
2008-02-04 19:38 giallu Status new => resolved
2008-02-04 19:38 giallu Fixed in Version => 1.2.0
2008-02-04 19:38 giallu Resolution open => fixed
2008-02-04 19:38 giallu Assigned To => giallu
2008-02-04 19:38 giallu Note Added: 0016948
2008-04-19 04:10 vboctor Status resolved => closed
2008-10-21 11:45 Changeset attached master 1d2053c9 =>
2008-11-11 08:34 giallu Changeset attached master e966f469 =>
2008-11-11 08:47 giallu Changeset attached master e966f469 =>


MantisBT 1.2.2 git master-1.2.x[^]
Copyright © 2000 - 2010 MantisBT Group
Time: 0.2440 seconds.
memory usage: 1,994 KB
Powered by Mantis Bugtracker