systm;10983097 wrote:
$headers = 'From: '.$from."\r\n".
$headers = "MIME-Version: 1.0\n" ;
Once of these headers ends with CRLF (correct), the other ends with LF (incorrect). Do note that according to the RFCs for SMTP, at least up until 2008, specified that lines (more or less) end with CRLF and that
The receiver will take no action until this sequence is received.
Which means that a conforming agent might treat two or more of your lines as one line possibly leading to being unable to relay your email.
What is e.tech? You should most likely go with laserlights recommendation and use e.employee_id.
Moreover, since the SQL standard specifies that
When a group by clause is present, every field has to be either part of the group by clause or be part of an aggregate function.
and due to this, most SQL implementations will not allow you to violate this, for good reasons. And while MySQL will let you violate this, doing so will often lead to unpredictable results, so you should most definitely
SELECT e.field1, e.field2, e.employee_id, ...
...
GROUP BY e.employee_id, e.field1, e.field2
rather than use SELECT e. GROUP BY one_single_field_from_e. It would obviously suffice to
SELECT e.*, ...
...
GROUP BY e.every, e.single, e.field, e.from, e.table_e
But if you later add a new field to e, your query will once again be invalid SQL.