SMTP Email Delivery Unsuccessful

General support regarding TimeTrex, such as
configuring policies/taxes or processing payroll.
Locked
Yajasi
Posts: 108
Joined: Wed Oct 17, 2012 4:48 pm

SMTP Email Delivery Unsuccessful

Post by Yajasi »

I am attempting to activate the Exceptions Policy in Timetrex. To test the functionality of emailing, I have tested sending an email through the Message feature. This is using Timetrex Community Edition 7.1.2. I have configured my timetrex.ini.php file with the following settings:

Code: Select all

;
; Email delivery settings.
;
[mail]
;Least setup, deliver email through TimeTrex's email relay via SOAP (HTTP port 80)
;delivery_method = soap

;Deliver email through local sendmail command specified in php.ini
;delivery_method = mail

;Deliver email through remote SMTP server with the following settings.
delivery_method = smtp
smtp_host=mail.domain.org
smtp_port=465
smtp_username=timetrex_email@domain.org
smtp_password=*****
I get the following results in my log file, but I actually receive the email. It doesn't appear that the log file is indicating a successful send.

Code: Select all

DEBUG [L0212] [195ms]:	<b>TTMail::Send()</b>: Attempting to send email To: Employee_Name@domain.org<br>
DEBUG [L0224] [195ms]:	<b>TTMail::Send()</b>: Sending Email To: Employee_Name@domain.org Body Size: 300 Method: smtp<br>
DEBUG [L0110] [197ms] Array: <b>TTMail::getMailObject()</b>: SMTP Config: 
<pre>array(5) {
  ["host"]=>
  string(14) "mail.domain.org"
  ["port"]=>
  string(3) "465"
  ["user_name"]=>
  string(26) "timetrex_email@domain.org"
  ["password"]=>
  string(5) "*****"
  ["auth"]=>
  bool(true)
}

</pre><br>
DEBUG [L1428] [122594ms]:	<b>Factory::StartTransaction()</b>: StartTransaction(): Transaction Count: 1 Trans Off: 2<br>
DEBUG [L1483] [122594ms]:	<b>Factory::Save()</b>: Calling preSave()<br>
DEBUG [L1521] [122594ms]:	<b>Factory::Save()</b>: Insert ID: 118500<br>
DEBUG [L1406] [122594ms]:	<b>Factory::getInsertQuery()</b>: Insert<br>
DEBUG [L1438] [122629ms]:	<b>Factory::CommitTransaction()</b>: CommitTransaction(): Transaction Count: 1 Trans Off: 3<br>
DEBUG [L0095] [122629ms]:	<b>TTLog::addEntry()</b>: LogDetail Disabled... Object ID: 11 Action ID: 500 Table: message_control Description: Email Message to: Employee_Name@domain.org Bcc: <br>
DEBUG [L1438] [122629ms]:	<b>Factory::CommitTransaction()</b>: CommitTransaction(): Transaction Count: 1 Trans Off: 2<br>
DEBUG [L1438] [122629ms]:	<b>Factory::CommitTransaction()</b>: CommitTransaction(): Transaction Count: 1 Trans Off: 1<br>
DEBUG [L0116] [122675ms]:	<b>ServiceMapper::invokeService()</b>: Returning 5 bytes of data... Response Time: 122.54890394211<br>
DEBUG [L0202] [122676ms]:	<b>[Function]()</b>: Server Response Time: 123.00830411911<br>
Thanks in advance.
Yajasi
Posts: 108
Joined: Wed Oct 17, 2012 4:48 pm

Re: SMTP Email Delivery Unsuccessful

Post by Yajasi »

OOPS - I mistyped. I am actually NOT getting the emails. Also, this is running on Ubuntu 12.04 Server.
shaunw
Posts: 7839
Joined: Tue Sep 19, 2006 2:22 pm

Re: SMTP Email Delivery Unsuccessful

Post by shaunw »

I don't see any errors in sending the email, so as far as TimeTrex is concerned the email was sent successfully.
Yajasi
Posts: 108
Joined: Wed Oct 17, 2012 4:48 pm

Re: SMTP Email Delivery Unsuccessful

Post by Yajasi »

Thanks for looking through my post. I was unable to find any other information as to the reason the SMTP delivery wasn't working, so I switched to using one of the other methods. I changed my timetrex.ini.php file to use the following settings. As you can see, I've enabled delivery_method=mail and disabled SMTP mail delivery.

Code: Select all

; Email delivery settings.
;
[mail]
;Least setup, deliver email through TimeTrex's email relay via SOAP (HTTP port 80)
;delivery_method = soap

;Deliver email through local sendmail command specified in php.ini
delivery_method = mail

;Deliver email through remote SMTP server with the following settings.
;delivery_method = smtp
;smtp_host=mail.domain.org
;smtp_port=465
;smtp_username=timetrex_email@domain.org
;smtp_password=*****
Since we running TimeTrex on Ubuntu Server 12.04, I configured the server to send email using the following tutorial.
http://quietmint.com/linux/postfix-rela ... -port-465/
There are many other tutorials that can be used for setting up mail on a Ubuntu server, but this one fit our requirements and I didn't need to make any changes to our /etc/php5/apache2/php.ini file.

Hope this helps someone else.
Locked