Template Email Variables

b00gz

Joined
Mar 10, 2008
Messages
7
Likes
0
Points
0
#1
I can not find a list of template email variables and I can not figure them out on the server itself. Can someone please give me a list or point me in the right direction has how to find other variables such as {COMPANY_NUMBER_FROM}.
 

johnme

Joined
Nov 28, 2008
Messages
148
Likes
0
Points
0
#2
Hello...

I tried to change something from the template and i found that the changes can be done from /var/spool/hylafax/bin/faxrcvd

* 3) ENVIO EMAIL *
**********************************************/

$destinatario = obtener_mail_destiny($modemdev);
$arrConfig = getConfigurationSendingFaxMail($company_name,$company_name,$company_number);

with this i put in the subject of fax mail the company name field and not the pdf name. (Who need to know the pdf name?)
And i change a little bit the text on the template from the gui (not the text between the { }.

Bye
 

sarados

Joined
Feb 11, 2007
Messages
18
Likes
0
Points
0
#3
i have the same problem , can you post more details?
 

johnme

Joined
Nov 28, 2008
Messages
148
Likes
0
Points
0
#4
Hello

Tell me what you need, because if you read my post is very clear.
What exactly you don't understand?

John
 

sarados

Joined
Feb 11, 2007
Messages
18
Likes
0
Points
0
#5
Hi
i have used the expression "Fax attached Nº {COMPANY_NUMBER_FROM} " in the fax subject and it is not working .
i have also tried different combinations , no results.
i am trying to find a howto , but no luck up till now .
i am using elastix 1-3.2
 

johnme

Joined
Nov 28, 2008
Messages
148
Likes
0
Points
0
#6
Hello...

As i said don't try anything from elastix gui.
You have to go deeper.
Use nano or webmin to do it
1.Find file /var/spool/hylafax/bin/faxrcvd
2.Find this point in the file by editing it...

================================================================


* 3) ENVIO EMAIL *
**********************************************/

$destinatario = obtener_mail_destiny($modemdev);
$arrConfig = getConfigurationSendingFaxMail($company_name,$company_name,$company_number);


================================================================
As you can see mine says: ($company_name,$company_name,$company_number)
the original says:
($name_pdf,$company_name,$company_number)


with this change i put in the subject of fax mail the company name field and not the pdf name. (Who need to know the pdf name?)
And i change a little bit the text on the template from the gui (not the text between the { }.

Point me exactly what you don't understand of my to explain it better.

Bye
 

kongar

Joined
Oct 16, 2009
Messages
3
Likes
0
Points
0
#7
At last I found the root of problems with template variables.

To fix the variables handling in subject line of email template you have to modify /var/spool/hylafax/bin/includes/functions.php file.

Open it and find this block of code:
Code:
        $recordset = $db_object->query($sql);
        while($tupla = $recordset->fetch(PDO::FETCH_OBJ)){
            $arrData['remite'] = utf8_decode($tupla->remite);
            $arrData['remitente'] = utf8_decode($tupla->remitente);
            $arrData['subject'] = utf8_decode(str_replace("{NAME_PDF}",$namePDF,$tupla->subject));
            $arrData['content'] = $tupla->content;
            $arrData['content'] = str_replace("{NAME_PDF}",$namePDF,$arrData['content']);
            $arrData['content'] = str_replace("{COMPANY_NAME_FROM}",$companyNameFrom,$arrData['content']);
            $arrData['content'] = utf8_decode(str_replace("{COMPANY_NUMBER_FROM}",$companyNumberFrom,$arrData['content']));
Now, alter it as follow:
Code:
        $recordset = $db_object->query($sql);
        while($tupla = $recordset->fetch(PDO::FETCH_OBJ)){
            $arrData['remite'] = utf8_decode($tupla->remite);
            $arrData['remitente'] = utf8_decode($tupla->remitente);
            $arrData['subject'] = utf8_decode(str_replace("{NAME_PDF}",$namePDF,$tupla->subject));
            $arrData['subject'] = str_replace("{COMPANY_NAME_FROM}",$companyNameFrom,$arrData['subject']);
            $arrData['subject'] = utf8_decode(str_replace("{COMPANY_NUMBER_FROM}",$companyNumberFrom,$arrData['subject']));
            $arrData['content'] = $tupla->content;
            $arrData['content'] = str_replace("{NAME_PDF}",$namePDF,$arrData['content']);
            $arrData['content'] = str_replace("{COMPANY_NAME_FROM}",$companyNameFrom,$arrData['content']);
            $arrData['content'] = utf8_decode(str_replace("{COMPANY_NUMBER_FROM}",$companyNumberFrom,$arrData['content']));
You have to add this two lines:
Code:
            $arrData['content'] = str_replace("{COMPANY_NAME_FROM}",$companyNameFrom,$arrData['content']);
            $arrData['content'] = utf8_decode(str_replace("{COMPANY_NUMBER_FROM}",$companyNumberFrom,$arrData['content']));
When done, save this file. Now you can use {COMPANY_NAME_FROM} and {COMPANY_NUMBER_FROM} variables in the subject line in the template.

Hope this helps.
 

johnme

Joined
Nov 28, 2008
Messages
148
Likes
0
Points
0
#8
Hi

The next step is to find the way to change the mail subject from the mail that avantfax is sending.

If you use avantfax (great tool) and everything is in avantfax, sending and received faxes then you will see that the mails have another format.

From mail subject you cannot see if the fax is the one you send or a new fax that you just received.

Hi again
John
 

baskar

Joined
Sep 28, 2010
Messages
1
Likes
0
Points
0
#9
Am getting email notification with Company Name, Fax Number & PDF file. But I need to get the status for the fax also in the same mail.

How to get the Fax Notification status through Email using Hylafax?

Am using Elastix, Hylafax and Yet Another Java HylaFax Client (YAJHFC)

Could anyone Please help me in this regards...

Thanks,
Baskar.
 

Members online

No members online now.

Latest posts

Forum statistics

Threads
30,981
Messages
131,060
Members
17,704
Latest member
Pahntom
Top