Forum

Welcome to ProjeQtOr new Forum. We migrated old forum to the new website.
You will find all your posts here, with your usual account.
Just one point : you’ll have to reinitialize your password. Use “Lost password” feature.

configuration d'env...
 
Notifications
Clear all

configuration d'envoi émail

48 Posts
3 Users
0 Reactions
162.3 K Views
ameur
(@timoumi)
Posts: 32
Active Member
Topic starter
 

I change to default rn
But not work
the log file :
///////////////
2013-07-27 00:33:13 ===== TRACE ===== sendMailAnonymous
2013-07-27 00:33:14 ** ERROR ** ERROR **
2013-07-27 00:33:14
** ERROR ** on file 'C:wampwwwprotoolprojector.php' at line (883)
2013-07-27 00:33:14
** ERROR ** cause = mail() [function.mail]: Failed to Receive
2013-07-27 00:33:14
** ERROR ** Error sending mail
2013-07-27 00:33:14
** ERROR ** SMTP Server : smtp.topnet.tn
2013-07-27 00:33:14
** ERROR ** SMTP Port : 25
2013-07-27 00:33:14
** ERROR ** Sendmail path :
2013-07-27 00:33:14
** ERROR ***** Mail stored in Database : #18

//////////////////////////////
the lines on file "projector.php"
///////////////////////////////
876 if ($paramMailSmtpServer!==null) {
877 //$resultMail=mail($to,$title,$message,$headers);
878 debugLog("mail()");
879 debugLog("to=$to");
880 debugLog("title=$title");
881 debugLog("message=$message");
882 debugLog("headers=$headers");
883 $resultMail=mail($to,$title,$message,$headers);
884 debugLog("resultMail=$resultMail");
885
886 } else {
887 errorLog(" SMTP Server not set. Not able to send mail.");
888 }


 
Posted : 27 Jul 2013 2H39
babynus
(@babynus)
Posts: 14952
Member Admin
 

Please read all the posts :S

The log is not as expected.
I expect some debug traces.
You should set logLevel to 3 in parameters.php

$logLevel='3';

Thne try again and post log result.


 
Posted : 27 Jul 2013 2H49
ameur
(@timoumi)
Posts: 32
Active Member
Topic starter
 

After setting logLevel to 3
the log file when sending ùail on project module. I try the new latest version of project'or ria

2013-07-27 10:45:47 ----- DEBUG ----- mail()
2013-07-27 10:45:47 ----- DEBUG ----- to=******@.**
2013-07-27 10:45:47 ----- DEBUG ----- title=[My Own Project'Or RIA] message from admin : Project #1
2013-07-27 10:45:47 ----- DEBUG ----- message=

[My Own Project'Or RIA] message from admin : Project #1

hekko

Project
#1
  id   #1
  name   test
  type   Fixed
Price
  customer   
  bill
contact 
 
  project
code 
 
  contract
code 
 
  is sub-project
of 
 
  manager   admin
  color   
  status   recorded
  health
status 
 
  fix
planning 
 
  done      
  closed      
  description   
Notes

2013-07-27 10:45:47 ----- DEBUG ----- headers=MIME-Version: 1.0
Content-Type: text/html; charset=utf-8
From: ******@.**
Reply-To: ******@.**
Content-Transfer-Encoding: 8bit
X-Mailer: PHP/5.3.10
2013-07-27 10:45:48 ** ERROR ** ERROR **
2013-07-27 10:45:48
** ERROR ** on file 'C:wampwwwprtoolprojector.php' at line (855)
2013-07-27 10:45:48
** ERROR ** cause = mail() [function.mail]: SMTP server response: 451 See http://pobox.com/~djb/docs/smtplf.html.
2013-07-27 10:45:48 ----- DEBUG ----- resultMail=
2013-07-27 10:45:48
** ERROR ** Error sending mail
2013-07-27 10:45:48
** ERROR ** SMTP Server : smtp.**.**
2013-07-27 10:45:48 ** ERROR ** SMTP Port : 25
2013-07-27 10:45:48 ** ERROR ** Sendmail path :
2013-07-27 10:45:48 ** ERROR ** Mail stored in Database : #3


 
Posted : 27 Jul 2013 12H58
babynus
(@babynus)
Posts: 14952
Member Admin
 

Thanks for the log.
The error is 451 again...

1) What is the end of line on the global parameters screen ?
It should be default "rn".

2) Could you please try from user, where it works correctly.

3) Could you also try from another item (ticket for instance)

and post here again log result.
Thanks.


 
Posted : 27 Jul 2013 14H09
ameur
(@timoumi)
Posts: 32
Active Member
Topic starter
 

1) The end of line on the global parameters screen "rn".
2) Send mail from user works correctly
3) send mail from ticket not works
Log file:
//////////////
/////////////////////////////
Log Mail send from user module
/////////////////////////////
2013-07-27 12:29:29 ----- DEBUG ----- mail()
2013-07-27 12:29:29 ----- DEBUG ----- to=******@**.**
2013-07-27 12:29:29 ----- DEBUG ----- title=[My Own Project'Or RIA] message from : Your account information
2013-07-27 12:29:29 ----- DEBUG ----- message=You are welcome to My Own Project'Or RIA at http://localhost/pr .
Your login is admin.
Your password is initialized to admin
You will have to change it on first connection.

In case of an issue contact your administrator at ******@**.**.
2013-07-27 12:29:29 ----- DEBUG ----- headers=MIME-Version: 1.0
Content-Type: text/html; charset=utf-8
From: ******@**.**
Reply-To: ******@**.**
Content-Transfer-Encoding: 8bit
X-Mailer: PHP/5.3.10
2013-07-27 12:29:30 ----- DEBUG ----- resultMail=1
////////////////////////
Log Mail send from ticket module
///////////////////////
2013-07-27 12:30:30 ----- DEBUG ----- mail()
2013-07-27 12:30:30 ----- DEBUG ----- to=******@yahoo.fr
2013-07-27 12:30:30 ----- DEBUG ----- title=[My Own Project'Or RIA] message from admin : Ticket #1
2013-07-27 12:30:30 ----- DEBUG ----- message=

[My Own Project'Or RIA] message from admin : Ticket #1

test

Ticket
#1
Description
  id   #1   -INC-1
  project   test
  ticket
type 
 Incident
  name   test
  external
reference 
 
  urgency   
  creation
date/time 
 27/07/2013
12:25
  issuer   admin
  requestor   
  origin   
  duplicate
ticket 
 
  context         
  product   
  original
version 
 
  description   
Treatment
  planning
activity 
 
  status   recorded
  responsible   
  criticality   
  priority   
  initial due
date/time 
 
  actual due
date/time 
 
  handled      
  done      
  closed      
  target
version 
 
  result   
Notes

2013-07-27 12:30:30 ----- DEBUG ----- headers=MIME-Version: 1.0
Content-Type: text/html; charset=utf-8
From: ***@**.**
Reply-To: ******@**.**
Content-Transfer-Encoding: 8bit
X-Mailer: PHP/5.3.10
2013-07-27 12:30:31 ** ERROR ** ERROR **
2013-07-27 12:30:31
** ERROR ** on file 'C:wampwwwprtoolprojector.php' at line (855)
2013-07-27 12:30:31
** ERROR ** cause = mail() [function.mail]: Failed to Receive
2013-07-27 12:30:31 ----- DEBUG ----- resultMail=
2013-07-27 12:30:31
** ERROR ** Error sending mail
2013-07-27 12:30:31
** ERROR ** SMTP Server : smtp.***.tn
2013-07-27 12:30:31
** ERROR ** SMTP Port : 25
2013-07-27 12:30:31
** ERROR ** Sendmail path :
2013-07-27 12:30:31
** ERROR ***** Mail stored in Database : #8


 
Posted : 27 Jul 2013 14H39
babynus
(@babynus)
Posts: 14952
Member Admin
 

So, it confirms that headers are identical in both cases (working and not working).

The only significant difference is the message body.

So please, could you try 2 tests :

1) In /model/persistence/SqlElement.php, add 1 line after line 2473, this way :

  public function getMailDetail () {
    return "OK";

and test sending mail.

2) copy the attaches SqlElement.php file into /model/persistence
and test again.

Thanks.


 
Posted : 27 Jul 2013 16H50
ameur
(@timoumi)
Posts: 32
Active Member
Topic starter
 

I added line " return "OK";" after public function getMailDetail () { (Line 2743)
the message error in log file :

2013-07-27 16:27:28 ----- DEBUG ----- mail()
2013-07-27 16:27:28 ----- DEBUG ----- to=************@gmail.com
2013-07-27 16:27:28 ----- DEBUG ----- title=[My Own Project'Or RIA] message from admin : Project #1
2013-07-27 16:27:28 ----- DEBUG ----- message=

[My Own Project'Or RIA] message from admin : Project #1

test

OK

2013-07-27 16:27:28 ----- DEBUG ----- headers=MIME-Version: 1.0
Content-Type: text/html; charset=utf-8
From: ********@***.tn
Reply-To:
*********@****.tn
Content-Transfer-Encoding: 8bit
X-Mailer: PHP/5.3.10
2013-07-27 16:27:31
** ERROR ** ERROR **
2013-07-27 16:27:31 ** ERROR ** on file 'C:wampwwwprtoolprojector.php' at line (855)
2013-07-27 16:27:31 ** ERROR ** cause = mail() [function.mail]: SMTP server response: 451 See http://pobox.com/~djb/docs/smtplf.html.
2013-07-27 16:27:31 ----- DEBUG ----- resultMail=
2013-07-27 16:27:31 ** ERROR ** Error sending mail
2013-07-27 16:27:31 ** ERROR ** SMTP Server : smtp.*****.tn
2013-07-27 16:27:31
** ERROR ** SMTP Port : 25
2013-07-27 16:27:31
** ERROR ** Sendmail path :
2013-07-27 16:27:31
** ERROR ***** Mail stored in Database : #12

To resolve this issue ,would you mind to tell me about your web-container (easyphp, wamp, xampp, version, and your project'or ria version ... :silly:


 
Posted : 27 Jul 2013 18H34
babynus
(@babynus)
Posts: 14952
Member Admin
 

Can you try to copy the attached SqlElement.php file into /model/persistence
and test again (after unziping it !).
Thanks.


 
Posted : 27 Jul 2013 19H30
ameur
(@timoumi)
Posts: 32
Active Member
Topic starter
 

always the same error on project module when i try to send mail.
log file:
2013-07-27 18:04:59 ----- DEBUG ----- mail()
2013-07-27 18:04:59 ----- DEBUG ----- to=*********@**.**
2013-07-27 18:04:59 ----- DEBUG ----- title=[My Own Project'Or RIA] message from admin : Project #1
2013-07-27 18:04:59 ----- DEBUG ----- message=[My Own Project'Or RIA] message from admin :<br /> Project #1google

Project
#1
  id   #1
  name   test
  type   Fixed
Price
  customer   
  bill
contact 
 
  project
code 
 
  contract
code 
 
  is sub-project
of 
 
  manager   admin
  color   
  status   recorded
  health
status 
 
  fix
planning 
 
  done      
  closed      
  description   
Notes

2013-07-27 18:04:59 ----- DEBUG ----- headers=MIME-Version: 1.0
Content-Type: text/html; charset=utf-8
From: *********@**.**
Reply-To: *********@**.**
Content-Transfer-Encoding: 8bit
X-Mailer: PHP/5.3.10
2013-07-27 18:04:59 ** ERROR ** ERROR **
2013-07-27 18:04:59
** ERROR ** on file 'C:wampwwwprtoolprojector.php' at line (855)
2013-07-27 18:04:59
** ERROR ** cause = mail() [function.mail]: SMTP server response: 451 See http://pobox.com/~djb/docs/smtplf.html.
2013-07-27 18:04:59 ----- DEBUG ----- resultMail=
2013-07-27 18:04:59
** ERROR ** Error sending mail
2013-07-27 18:04:59
** ERROR ** SMTP Server : smtp.**.tn
2013-07-27 18:04:59 ** ERROR ** SMTP Port : 25
2013-07-27 18:04:59 ** ERROR ** Sendmail path :
2013-07-27 18:04:59 ** ERROR ** Mail stored in Database : #19


 
Posted : 27 Jul 2013 20H15
babynus
(@babynus)
Posts: 14952
Member Admin
 

Another try : always with the provided SqlElement.php, change /tool/projector.php and add

	$messageBody = wordwrap($messageBody, 70);

at line 589.
It should give :

function sendMail($to, $subject, $messageBody, $object=null, $headers=null, $sender=null, $boundary=null)  {
	$paramMailSmtpUsername = Parameter::getGlobalParameter('paramMailSmtpUsername');
	$paramMailSmtpPassword = Parameter::getGlobalParameter('paramMailSmtpPassword');
	$messageBody = wordwrap($messageBody, 70);
	if (! $paramMailSmtpUsername or ! $paramMailSmtpPassword) {
	  return sendMailAnonymous($to, $subject, $messageBody, $object, $headers, $sender, $boundary);	
	} else {
	  return sendMailAuthentified($to, $subject, $messageBody, $object, $headers, $sender, $boundary);
	}
}

and try again...


 
Posted : 27 Jul 2013 20H34
ameur
(@timoumi)
Posts: 32
Active Member
Topic starter
 

thank you very much for your attention but there are the same error :woohoo:


 
Posted : 28 Jul 2013 0H16
babynus
(@babynus)
Posts: 14952
Member Admin
 

Hi,

I don't have any more idea on Project'Or RIA side.
My last advice is to try another smtp server.
You can for instance try gmail smtp.
You just need a google account.

Parameters are :
smtp host : ssl://smtp.gmail.com
smtp port : 465
smtp login : your google account (a gmail address)
smtp password : your google password


 
Posted : 28 Jul 2013 0H38
ameur
(@timoumi)
Posts: 32
Active Member
Topic starter
 

I want to ask a question, is that sending email is activated in different modules for your personel Project'or ria :angry:


 
Posted : 28 Jul 2013 2H50
ameur
(@timoumi)
Posts: 32
Active Member
Topic starter
 

Hello friend
the problem has no relation with the SMTP server, simply because when i changed the variable "$ message" with 'hello' that is defined in projector.php :
Line code :

$ resultMail = mail ($ to, $ title, $ message, $ headers);

, the mail transfer with OK. 👿

Please could you help me
🙁


 
Posted : 28 Jul 2013 4H03
babynus
(@babynus)
Posts: 14952
Member Admin
 

Hi,

I suggested to try another smtp server because I never faced this issue, nor was it reported.
I send emails with no issue through several SMTP servers :
- smtp.free.fr
- ssl://smtp.gmail.com (worth a try)
- local sendMail on linux
The issue does not appear to be PHP stack dependant, as I have instances running correctly under :
- EasyPHP (windows)
- WAMP (windows)
- Zend (Linux)
- Default PHP on Ubuntu (Linux)

Really it is worth a try for you to test another SMTP server.
I think your smtp server has some limitations that I cannot identify.
The different tests I advised you were to remove any common limitations :
- remove all break lines in Message
- format all break lines in headers as nr
- truncate Message to 70 characters per line


 
Posted : 28 Jul 2013 22H14
ameur
(@timoumi)
Posts: 32
Active Member
Topic starter
 

I'm blocked, 🙁 could you send me a stable version of project'or ria with positive test of send mail.


 
Posted : 30 Jul 2013 3H26
babynus
(@babynus)
Posts: 14952
Member Admin
 

You can download a packaged version here :
projectorria.toolware.fr/files/EasyPHP.1...ojectOrRIA.3.4.0.zip

You just have to
- unzip archive
- run EasyPHP-12.1.exe (accept configuration changes as proposed)
- access to http://localhost/projectorria
- connect as admin/admin

But I don't think this will solve your issue.
You'll have to configure the smtp server, and if you continue with same server, issue won't be solved.

Please try another smtp server as previously suggested (for instance smtp.gmail.com).


 
Posted : 30 Jul 2013 12H36
ameur
(@timoumi)
Posts: 32
Active Member
Topic starter
 

Hello
Url :projectorria.toolware.fr/files/EasyPHP.1...ojectOrRIA.3.4.0.zip !!!
The requested URL /files/EasyPHP.1...ojectOrRIA.3.4.0.zip was not found on this server.


 
Posted : 31 Jul 2013 15H55
babynus
(@babynus)
Posts: 14952
Member Admin
ameur
(@timoumi)
Posts: 32
Active Member
Topic starter
 

Finally It Works !

:woohoo: :woohoo:
:woohoo: :woohoo:
:woohoo: :woohoo:
:woohoo:
:woohoo: :woohoo:
:woohoo: :woohoo:
:woohoo: :woohoo:
:woohoo:
:woohoo: :woohoo:
:woohoo: :woohoo:
:woohoo: :woohoo:
:woohoo:


 
Posted : 02 Aug 2013 12H58
babynus
(@babynus)
Posts: 14952
Member Admin
 

So, what was wrong ?


 
Posted : 02 Aug 2013 14H03
ameur
(@timoumi)
Posts: 32
Active Member
Topic starter
 

send mail for projects or tickets, only works on ssl mode. so the configuration depend on web container, and the Path directory.
:whistle:


 
Posted : 04 Aug 2013 3H29
babynus
(@babynus)
Posts: 14952
Member Admin
 

only works on ssl mode

Not so sure.
I just think your inital smtp server has some typical restriction.
Trying another one solves the issue, but not because of ssl, just because of other smpt server.
I use a smtp server in no ssl mode without any issue since several years with Project'Or RIA with no issue, and so do many community members.


 
Posted : 04 Aug 2013 4H15
Page 2 / 2
Share:

Scroll to Top