Update of /cvsroot/phpbt/phpbt
In directory sc8-pr-cvs1.sourceforge.net:/tmp/cvs-serv22660/phpbt
Modified Files:
bug.php config-dist.php include.php newaccount.php
Log Message:
RFE #1068977 - Add SMTP Server, User and Password
Index: bug.php
===================================================================
RCS file: /cvsroot/phpbt/phpbt/bug.php,v
retrieving revision 1.141
retrieving revision 1.142
diff -u -r1.141 -r1.142
--- bug.php 22 Aug 2005 20:30:56 -0000 1.141
+++ bug.php 22 Aug 2005 20:50:23 -0000 1.142
@@ -321,7 +321,10 @@
$mail->setSubject("[Bug {$buginfo['bug_id']}] ".
($newbug ? 'New' : 'Changed').' - '.
stripslashes((!empty($cf['title']) ? $cf['title'] : $buginfo['title'])));
- $mail->send($maillist);
+ if (SMTP_EMAIL) {
+ $mail->setSMTPParams(SMTP_HOST, SMTP_PORT, SMTP_HELO, SMTP_AUTH, SMTP_AUTH_USER, SMTP_AUTH_PASS);
+ }
+ $mail->send($maillist, SMTP_EMAIL ? 'smtp' : 'mail');
}
}
Index: config-dist.php
===================================================================
RCS file: /cvsroot/phpbt/phpbt/config-dist.php,v
retrieving revision 1.32
retrieving revision 1.33
diff -u -r1.32 -r1.33
--- config-dist.php 22 Aug 2005 20:30:56 -0000 1.32
+++ config-dist.php 22 Aug 2005 20:50:23 -0000 1.33
@@ -71,4 +71,12 @@
define('PEAR_PATH', '{PEAR_PATH}'); // Set this to '/some/path/' to not use system-wide PEAR
require_once (dirname(__FILE__).'/inc/auth.php');
+define('SMTP_EMAIL', false);
+define('SMTP_HOST', "localhost");
+define('SMTP_PORT', 25);
+define('SMTP_HELO', null);
+define('SMTP_AUTH', false);
+define('SMTP_AUTH_USER', "");
+define('SMTP_AUTH_PASS', "");
+
?>
Index: include.php
===================================================================
RCS file: /cvsroot/phpbt/phpbt/include.php,v
retrieving revision 1.138
retrieving revision 1.139
diff -u -r1.138 -r1.139
--- include.php 22 Aug 2005 20:44:16 -0000 1.138
+++ include.php 22 Aug 2005 20:50:23 -0000 1.139
@@ -193,7 +193,7 @@
qp_mail($email,
translate("phpBugTracker Login"),
sprintf(translate("Your phpBugTracker password is %s"), $password),
- sprintf("From: %s", ADMIN_EMAIL));
+ ADMIN_EMAIL);
$t->assign('loginerror',
'<div class="result">'.translate("Your password has been emailed to you").'</div>');
$emailsuccess = true;
Index: newaccount.php
===================================================================
RCS file: /cvsroot/phpbt/phpbt/newaccount.php,v
retrieving revision 1.33
retrieving revision 1.34
diff -u -r1.33 -r1.34
--- newaccount.php 25 Oct 2004 12:06:58 -0000 1.33
+++ newaccount.php 22 Aug 2005 20:50:23 -0000 1.34
@@ -64,7 +64,7 @@
qp_mail($_POST['email'],
translate("phpBugTracker Login"),
sprintf(translate("Your phpBugTracker password is %s"), $password),
- sprintf("From: %s", ADMIN_EMAIL));
+ ADMIN_EMAIL);
$t->render('newaccountsuccess.html', translate("New account created"));
}
@@ -72,6 +72,8 @@
function show_form($error = '') {
global $t, $_POST;
+ $t->assign('error', $error);
+
if (NEW_ACCOUNTS_DISABLED) {
$t->render('newaccount-disabled.html');
} else {
|