[SMTP] */
// Developer Note:
// these config variable names has been choosed to maintain compatibility
// with code taken from Mantis.
//
// SMTP server Configuration ("localhost" is enough in the most cases)
$g_smtp_host = '[smtp.peoplecorp.com]'; # SMTP server MUST BE configured
$g_tl_admin_email = '[raghav.swami@peoplecorp.com]'; # for problem/error notification
$g_from_email = '[raghav.swami@peoplecorp.com]'; # email sender
$g_return_path_email = '[raghav.swami@peoplecorp.com]';
$g_smtp_host = '[smtp.peoplecorp.com]';
#$g_smtp_host = '10.20.30.40';
# Urgent = 1, Not Urgent = 5, Disable = 0
$g_mail_priority = 5;
# Taken from mantis for phpmailer config
define ("SMTP_SEND",2);
$g_phpMailer_method = SMTP_SEND;
// Configure only if SMTP server requires authentication
$g_smtp_username = 'raghav.pattaswami'; # user
$g_smtp_password = 'swami1'; # password
but when I reset the users password I getting the error
" The following From address failed: [raghav.swami@peoplecorp.com] "
I'm having a similar TestLink problem with outbound emails when I reset a user password. Has anyone tried to use Gmail as the SMTP server? It's using SSL (port 465) and I can't see where to define the port number.
I've tried both ports, 465 and 587, on the same line as the $g_smtp_host and on a separate line ($g_smtp_port). Neither seem to work, though they are the same as my Mantis settings. I thought I saw somewhere else that the From email address has a length limitation of 30 characters. I'm obviously right on the edge with these email addresses.
Any ideas would be helpful. Even just a confirmation that TestLink does work with Google-hosted email.
[SMTP] */
// Developer Note:
// these config variable names has been choosed to maintain compatibility
// with code taken from Mantis.
//
// SMTP server Configuration ("localhost" is enough in the most cases)
$g_smtp_host = '[smtp.peoplecorp.com]'; # SMTP server MUST BE configured
$g_tl_admin_email = '[raghav.swami@peoplecorp.com]'; # for problem/error notification
$g_from_email = '[raghav.swami@peoplecorp.com]'; # email sender
$g_return_path_email = '[raghav.swami@peoplecorp.com]';
$g_smtp_host = '[smtp.peoplecorp.com]';
#$g_smtp_host = '10.20.30.40';
# Urgent = 1, Not Urgent = 5, Disable = 0
$g_mail_priority = 5;
# Taken from mantis for phpmailer config
define ("SMTP_SEND",2);
$g_phpMailer_method = SMTP_SEND;
// Configure only if SMTP server requires authentication
$g_smtp_username = 'raghav.pattaswami'; # user
$g_smtp_password = 'swami1'; # password
but when I reset the users password I getting the error
" The following From address failed: [raghav.swami@peoplecorp.com] "
I fixed the problem for me but it is a little tricky
1. you need a more recent PHPMailer Version (I used 1.8.1) which supports ssl mail sending
download, unzip PHPMailer from sourceforge
replace third_party/phpmailer in your testlink folder with PHPMailer-ML_v1.8.1_core/_acp-ml/modules/phpmailer from the PHPMailer archive
2. you need to activate ssl in lib/functions/email_api.php
add the following code:
case 2: $mail->IsSMTP();
{
# SMTP collection is always kept alive
#
$mail->SMTPKeepAlive = true;
# @@@ yarick123: It is said in phpMailer comments, that phpMailer::smtp has private access.
# but there is no common method to reset PHPMailer object, so
# I see the smallest evel - to initialize only one 'private'
# field phpMailer::smtp in order to reuse smtp connection.
$mail->SMTPSecure = 'ssl';
if( is_null( $g_phpMailer_smtp ) ) {
register_shutdown_function( 'email_smtp_close' );
} else {
$mail->smtp = $g_phpMailer_smtp;
}
}
break;
this was my quick hack, a nice solution should be made configurable
TL 2.0 will use new PHPMailer (version 5.1) and support new config parameters.
We are going to see if we can also include this update on next fix for 1.9.0 (1.9.1)
I was update the PHPMailer from my Apache server and now when I try to change the user's password appear the following message "Password Reset can not be done. Reason: SMTP Hostname seems to be invalid"
I use the port 587 with user autentication, but without SSL support.
The SMTP section from my config_inc.php is:
'smtp.mailserver.com.br:587' -> you have to remove the port from host.
you need to add a different new config option to manage PORT or FORCE it on existent code, or wait till fix for 1.9.0
function Connect($host,$port=0,$tval=30) {
$this->error = null;
if($this->connected()) {
$this->error =
array("error" => "Already connected to a server");
return false;
}
$port = 587; # Force to use the port 587
if(empty($port)) {
$port = $this->SMTP_PORT;
}
...