HOWTO: insert message body in email of cron

congkai

Verified User
Joined
Dec 12, 2005
Messages
142
Location
Singapore
We do email crons and we always receive subject "New Message: An error occurred during the backup." (maybe a FTP error).

And in order to know whats wrong, we have to login to our admin panel and check the message system. Thats so troublesome.

And thanks to John from DA Support, he told me a way to attach the body of the message in the email.

cd /usr/local/directadmin/data/templates/custom
cp ../message_user.txt .
nano message_user.txt

insert |MESSAGE| where desired.

for example

|?SUBJECT=New Message: `MESSAGE_SUBJECT`|
A new message or response with subject:

|MESSAGE_SUBJECT|
=====================================================
|MESSAGE|
=====================================================


Follow this link to view it:
|HTTP||DOMAIN|:|PORT|/CMD_TICKET?action=view&number=|NUMBER|&type=ticket


======================================================
Automatically generated email produced by DirectAdmin |VERSION|

Do Not Reply.

And yes, save it in /usr/local/directadmin/data/templates/custom AND NOT /usr/local/directadmin/data/templates



A Simple HOWTO to help everyone who wish to have a "easy life".

Directadmin Rocks! CHEERS!


ps. If you have used this or find this useful, leave a note, so i know who is using this :p
 
Back
Top