Secure authentication using Active Directory
echo custom field in table on 'time' page?
Successful Upgrade-"Week Total" on Mobile Page
Automatic notifications not working?
// Default sender for mail. // define('SENDER', 'Anuko Time Tracker <no-reply@timetracker.anuko.com>'); // MAIL_MODE - mail sending mode. Can be 'mail' or 'smtp'. // 'mail' - sending through php mail() function. // 'smtp' - sending directly through SMTP server. // define('MAIL_MODE', 'smtp'); define('MAIL_SMTP_HOST', 'localhost'); // For gmail use 'ssl://smtp.gmail.com' instead of 'localhost' and port 465. // define('MAIL_SMTP_PORT', '465'); // define('MAIL_SMTP_USER', 'yourname@yourdomain.com'); // define('MAIL_SMTP_PASSWORD', 'yourpassword'); // define('MAIL_SMTP_AUTH', true); // define('MAIL_SMTP_DEBUG', true);The SENDER constant defines what users see in the From field in emails that Time Tracker sends. For your own domain set the SENDER accordingly, for example:
define('SENDER', '"Mydomain Time Tracker" <noreply@mydomain.com>');Note: If your domain is set with some form of sender authentication using SPF, DKIM, or DMARC then you should comply with the sender authentication policy for good deliverability. In the case of SPF it means that the mail server must be authorized to send mail for your domain (as configured in its DNS records). In other words, mail must originate from a legitimate email server and not necessarily from a machine where Time Tracker application runs.
define('MAIL_MODE', 'mail');If you define MAIL_MODE as mail then mail will go through PHP mail() function as configured in php.ini.
define('MAIL_MODE', 'smtp');In this case mail is sent by connecting to outgoing mail server on TCP port 25 (unless another port is specified) and using SMTP protocol.
define('MAIL_SMTP_HOST', 'my.smtp.relay'); // Name or IP address of outgoing mail server. Usually, localhost. define('MAIL_SMTP_DEBUG', true); // Output debug information if you need to troubleshoot mail sending problems.On Windows platforms, it is usually done via SMTP connection as configured in php.ini.
DEBUG: Recv: 220 localhost.localdomain ESMTP Postfix DEBUG: Send: EHLO localhost DEBUG: Recv: 250-localhost.localdomain DEBUG: Recv: 250-PIPELINING DEBUG: Recv: 250-SIZE 10240000 DEBUG: Recv: 250-VRFY DEBUG: Recv: 250-ETRN DEBUG: Recv: 250-ENHANCEDSTATUSCODES DEBUG: Recv: 250-8BITMIME DEBUG: Recv: 250 DSN DEBUG: Send: MAIL FROM: DEBUG: Recv: 250 2.1.0 Ok DEBUG: Send: RCPT TO: DEBUG: Recv: 554 5.7.1 : Relay access denied DEBUG: Send: RSET DEBUG: Recv: 250 2.0.0 OkAnd here is an example of a Time Tracker screen when MAIL_SMTP_DEBUG is set to true. As you can see, some useful information is available on top of the screen for troubleshooting, in addition to the "Error sending mail" message in the middle.
define('MAIL_MODE', 'smtp'); define('MAIL_SMTP_HOST', 'ssl://smtp.gmail.com'); define('MAIL_SMTP_PORT', '465'); define('MAIL_SMTP_USER', 'yourname@yourdomain.com'); define('MAIL_SMTP_PASSWORD', 'yourpassword'); define('MAIL_SMTP_AUTH', true); // define('MAIL_SMTP_DEBUG', true);For other providers change MAIL_SMTP_HOST and MAIL_SMTP_PORT accordingly. Obtain the values to use from your email provider.
define('MAIL_MODE', 'smtp'); define('MAIL_SMTP_HOST', 'localhost');postfix program runs in the appliance and is capable to deliver Time Tracker emails.