Forum

[SOLVED] Email feat...
 
Notifications
Retirer tout

[SOLVED] Email feature is not working Kindly help

9 Posts
2 Utilisateurs
0 Reactions
12 K Vu
(@rakesh4java)
Posts: 6
Active Member
Début du sujet
 
[#4022]

Hi ,

Email Feature is not working.


Projeqtor log file (projeqtor_20170119.log)


2017-01-19 19:50:26.683 ** ERROR ** ERROR **
2017-01-19 19:50:26.685
** ERROR ** on file 'C:inetpubwwwrootprojeqtorexternalPHPMailerclass.smtp.php' at line (981)
2017-01-19 19:50:26.686
** ERROR ** cause = fwrite(): send of 6 bytes failed with errno=10054 An existing connection was forcibly closed by the remote host.

2017-01-19 19:43:29.171 ** ERROR ** Error sending mail
2017-01-19 19:43:29.172
** ERROR ** SMTP Server : XX.X.X.XX
2017-01-19 19:43:29.174
** ERROR ** SMTP Port : 25
2017-01-19 19:43:29.175
** ERROR ** Mail stored in Database : #89
2017-01-19 19:43:29.177
** ERROR ** PHPMail error : SMTP connect() failed. https://github.com/PHPMailer/PHPMailer/wiki/Troubleshooting
2017-01-19 19:43:29.179
** ERROR ***** PHPMail debug :


(Note Actual IP Address was used)

Environment Details:-
Projeqtor version is V6.0.4 (155)
Dojo 1.10.6 (718461a)
App Server : IIS
PHP Details :-
PHP Version : 5.6.28
Compiler MSVC11 (Visual C++ 2012)
Architecture x86
Server API CGI/FastCGI
PHP API 20131106
PHP Extension 20131226
Zend Extension 220131226
Zend Extension Build API220131226,TS,VC11
PHP Extension Build API20131226,TS,VC11
Registered PHP Streams php, file, glob, data, http, ftp, zip, compress.zlib, https, ftps, phar
Registered Stream Socket Transports tcp, udp, ssl, sslv3, tls, tlsv1.0, tlsv1.1, tlsv1.2
SMTP smtpm02.org.com
smtp_port 25


Can you please help in this regard...?

Needless to say:- Thanks for the Coolest project.


 
Posté : 19/01/2017 6:02 pm
(@babynus)
Posts: 14952
Membre Admin
 

It is an issue to connect to your smtp server.
Mybe it requires authenticated connection or access through SSL ou TLS (then port should not be 25)
Check with your smtp provider


 
Posté : 19/01/2017 6:09 pm
(@rakesh4java)
Posts: 6
Active Member
Début du sujet
 

Below test page works well:-

<?php
         $to = "rakesh1084@gmail.com";
         $subject = "This is subject";         
         $message = "This is HTML message.";
         $message .= "

This is headline.

"; $header = "From:rakesh1084@gmail.com rn"; $header .= "Cc:rakesh1084@gmail.com rn"; $header .= "MIME-Version: 1.0rn"; $header .= "Content-type: text/htmlrn"; $retval = mail ($to,$subject,$message,$header); if( $retval == true ) { echo "Message sent successfully..."; }else { echo "Message could not be sent..."; } ?>

Note: since php.ini is configured with smtp is configured above code is working.

Can you help:-


 
Posté : 19/01/2017 6:25 pm
(@babynus)
Posts: 14952
Membre Admin
 

I this works, just set smtp server to localhost.


 
Posté : 19/01/2017 6:40 pm
(@rakesh4java)
Posts: 6
Active Member
Début du sujet
 

Tried as per your suggestions:-
Changed to localhost

2017-01-19 21:12:27.980 ** ERROR ** ERROR **
2017-01-19 21:12:27.983 ** ERROR ** on file 'C:inetpubwwwrootprojeqtorexternalPHPMailerclass.smtp.php' at line (286)
2017-01-19 21:12:27.986 ** ERROR ** cause = stream_socket_client(): unable to connect to localhost:25 (No connection could be made because the target machine actively refused it.
)
2017-01-19 21:12:27.988 ** ERROR ** Error sending mail
2017-01-19 21:12:27.991 ** ERROR **    SMTP Server : localhost
2017-01-19 21:12:27.993 ** ERROR **    SMTP Port : 25
2017-01-19 21:12:27.996 ** ERROR **    Mail stored in Database : #93
2017-01-19 21:12:27.998 ** ERROR **    PHPMail error : SMTP connect() failed.  https://github.com/PHPMailer/PHPMailer/wiki/Troubleshooting 
2017-01-19 21:12:28.000 ** ERROR *****    PHPMail debug : 

Additional Information:-
have mantisBT also setup in place.

$g_phpMailer_method = PHPMAILER_METHOD_SMTP;
$g_smtp_host = 'sm02.org.com';
$g_smtp_port = 25;
$g_smtp_username = 'userid';
$g_smtp_password = 'secret';
$g_enable_email_notification='ON';

it is working.

have kanboard also in place where emails are working:-

// Mail transport available: "smtp", "sendmail", "mail" (PHP mail function), "postmark", "mailgun", "sendgrid"
define('MAIL_TRANSPORT', 'smtp');
// SMTP configuration to use when the "smtp" transport is chosen
define('MAIL_SMTP_HOSTNAME', 'sm02.org.com');
define('MAIL_SMTP_PORT', 25);
define('MAIL_SMTP_USERNAME', 'userid');
define('MAIL_SMTP_PASSWORD', 'secret);
define('MAIL_SMTP_ENCRYPTION', null); // Valid values are "null", "ssl" or "tls"

What could be the reason..?


 
Posté : 19/01/2017 6:42 pm
(@babynus)
Posts: 14952
Membre Admin
 

All should work fine with same parameters as for Mantis.
But we use phpMailer and I think that for authenticated connection (when user/password is provided) it automatically switched to secured connection (ssl I guess) to avoid to transfer login data unencrypted.

Possibly you can try to define

$paramMailerType='mail';

in your file parameters.php.
This will switch to standard php mail feature (less secured)


 
Posté : 20/01/2017 11:15 am
(@rakesh4java)
Posts: 6
Active Member
Début du sujet
 

Worked well.
Thanks for the same.


 
Posté : 20/01/2017 1:26 pm
(@rakesh4java)
Posts: 6
Active Member
Début du sujet
 

Suggestion:- Can this be a configuration via Global Parameters itself.


 
Posté : 20/01/2017 1:27 pm
(@babynus)
Posts: 14952
Membre Admin
 

Request recorded as Ticket #2513


 
Posté : 20/01/2017 1:31 pm
Share:
Retour en haut