|
|
| Line 7: |
Line 7: |
| If you are looking for ways to customize the messages created automatically when sending an invoice, a reminder or a proposal by email, here are some notes from a Dolibarr user that should make your task easier: | | If you are looking for ways to customize the messages created automatically when sending an invoice, a reminder or a proposal by email, here are some notes from a Dolibarr user that should make your task easier: |
|
| |
|
| = Personalize the sending of documents by E-mail = | | =Personalize the sending of documents by E-mail= |
| With Dolibarr, it is possible to send the documents directly by E-mail with the Send by E-mail button. A form appears to select the recipients and an automatic message is added in the message area. | | With Dolibarr, it is possible to send the documents directly by E-mail with the Send by E-mail button. A form appears to select the recipients and an automatic message is added in the message area. |
|
| |
|
| == Dolibarr >= 9 == | | ==Dolibarr >= 9== |
| * On Dolibarr versions greater than or equal to v9, it is enough to add an email template in the menu '''Tools - Email template'''. | | |
| | *On Dolibarr versions greater than or equal to v9, it is enough to add an email template in the menu '''Tools - Email template'''. |
| | |
| If there are several models entered for the same context, Dolibarr will take the first one (the one with the weakest position field therefore) | | If there are several models entered for the same context, Dolibarr will take the first one (the one with the weakest position field therefore) |
|
| |
|
| == Dolibarr <= 8 == | | ==Dolibarr <= 8== |
| * On Dolibarr versions lower than v8, the predefined message is saved in the Dolibarr languages folder | | |
| | *On Dolibarr versions lower than v8, the predefined message is saved in the Dolibarr languages folder |
|
| |
|
| <code>/htdocs/langs/en_en/other.lang</code> | | <code>/htdocs/langs/en_en/other.lang</code> |
| Line 39: |
Line 42: |
| If you prefer a message formatted in HTML, just use the standard HTML tags to format your message ((<br> : carriage return, <b>my text</b> for bold etc...) | | If you prefer a message formatted in HTML, just use the standard HTML tags to format your message ((<br> : carriage return, <b>my text</b> for bold etc...) |
|
| |
|
| = Customize variables on a Dolibarr version = | | =Customize variables on a Dolibarr version= |
|
| |
|
| == Dolibarr >= 8 == | | ==Dolibarr >= 8== |
| Many variables can be used in your email template. | | Many variables can be used in your email template. |
| Here is a non-exhaustive list. | | [[Variable substitution system|Here is a non-exhaustive list.]] |
| <pre>
| |
| __USER_SIGNATURE__ -> Alice - 123 __USER_LASTNAME__ ...
| |
| __USER_ID__ -> 12
| |
| __USER_LOGIN__ -> admin
| |
| __USER_LASTNAME__ -> Adminson
| |
| __USER_FIRSTNAME__ -> Alice
| |
| __USER_FULLNAME__ -> Alice Adminson
| |
| __USER_SUPERVISOR_ID__ -> 2
| |
| __USER_REMOTE_IP__ -> 127.0.0.1
| |
| __MYCOMPANY_NAME__ -> MyBig Company
| |
| __MYCOMPANY_EMAIL__ -> testldr10@gmail.com
| |
| __MYCOMPANY_PROFID1__ -> 123456
| |
| __MYCOMPANY_PROFID2__ -> __MYCOMPANY_PROFID2__
| |
| __MYCOMPANY_PROFID3__ -> __MYCOMPANY_PROFID3__
| |
| __MYCOMPANY_PROFID4__ -> __MYCOMPANY_PROFID4__
| |
| __MYCOMPANY_PROFID5__ -> __MYCOMPANY_PROFID5__
| |
| __MYCOMPANY_PROFID6__ -> __MYCOMPANY_PROFID6__
| |
| __MYCOMPANY_CAPITAL__ -> 10001
| |
| __MYCOMPANY_FULLADDRESS__ -> 21 Jump street..ll..ee "ddddd, 75500 MyTown, France
| |
| __MYCOMPANY_ADDRESS__ -> 21 Jump street..ll..ee "ddddd
| |
| __MYCOMPANY_ZIP__ -> 75500
| |
| __MYCOMPANY_TOWN__ -> MyTown
| |
| __MYCOMPANY_COUNTRY__ -> France
| |
| __MYCOMPANY_COUNTRY_ID__ -> 1
| |
| __MYCOMPANY_CURRENCY_CODE__ -> EUR
| |
| __ID__ -> __ID__
| |
| __REF__ -> __REF__
| |
| __REF_CLIENT__ -> __REF_CLIENT__
| |
| __REF_SUPPLIER__ -> __REF_SUPPLIER__
| |
| __EXTRAFIELD_XXX__ -> __EXTRAFIELD_XXX__
| |
| __THIRDPARTY_ID__ -> __THIRDPARTY_ID__
| |
| __THIRDPARTY_NAME__ -> __THIRDPARTY_NAME__
| |
| __THIRDPARTY_NAME_ALIAS__ -> __THIRDPARTY_NAME_ALIAS__
| |
| __THIRDPARTY_EMAIL__ -> __THIRDPARTY_EMAIL__
| |
| __CONTACT_NAME_ACTOR__
| |
| __CONTACT_NAME_AUTHOR__
| |
| __CONTACT_NAME_BILLING__
| |
| __CONTACT_NAME_CUSTOMER__
| |
| __CONTACT_NAME_FACTORYRESP__
| |
| __CONTACT_NAME_GUEST__
| |
| __CONTACT_NAME_INTERREPFOLL__
| |
| __CONTACT_NAME_INTERVENING__
| |
| __CONTACT_NAME_PROJECTCONTRIBUTOR__
| |
| __CONTACT_NAME_PROJECTLEADER__
| |
| __CONTACT_NAME_SALESREPFOLL__
| |
| __CONTACT_NAME_SALESREPSIGN__
| |
| __CONTACT_NAME_SERVICE__
| |
| __CONTACT_NAME_SHIPPING__
| |
| __CONTACT_NAME_TASKCONTRIBUTOR__
| |
| __CONTACT_NAME_TASKEXECUTIVE__
| |
| __CONTACT_NAME_THIRDINCHARGE__
| |
| __CONTACT_NAME_USERINCHARGE__
| |
| __CONTACT_NAME_WAREHOUSERESP__
| |
| __MEMBER_ID__ -> __MEMBER_ID__
| |
| __MEMBER_CIVILITY__ -> __MEMBER_CIVILITY__
| |
| __MEMBER_FIRSTNAME__ -> __MEMBER_FIRSTNAME__
| |
| __MEMBER_LASTNAME__ -> __MEMBER_LASTNAME__
| |
| __PROJECT_ID__ -> __PROJECT_ID__
| |
| __PROJECT_REF__ -> __PROJECT_REF__
| |
| __PROJECT_NAME__ -> __PROJECT_NAME__
| |
| __CONTRACT_HIGHEST_PLANNED_START_DATE__ -> Highest date planned for a service start
| |
| __CONTRACT_HIGHEST_PLANNED_START_DATETIME__ -> Highest date and hour planned for service start
| |
| __CONTRACT_LOWEST_EXPIRATION_DATE__ -> Lowest data for planned expiration of service
| |
| __CONTRACT_LOWEST_EXPIRATION_DATETIME__ -> Lowest date and hour for planned expiration of service
| |
| __ONLINE_PAYMENT_URL__ -> UrlToPayOnlineIfApplicable
| |
| __ONLINE_PAYMENT_TEXT_AND_URL__ -> TextAndUrlToPayOnlineIfApplicable
| |
| __SECUREKEYPAYMENT__ -> Security key (if key is not unique per record)
| |
| __SECUREKEYPAYMENT_MEMBER__ -> Security key for payment on a member subscription (one key per member)
| |
| __SECUREKEYPAYMENT_ORDER__ -> Security key for payment on an order
| |
| __SECUREKEYPAYMENT_INVOICE__ -> Security key for payment on an invoice
| |
| __SECUREKEYPAYMENT_CONTRACTLINE__ -> Security key for payment on a a service
| |
| __DIRECTDOWNLOAD_URL_PROPOSAL__ -> Direct download url of a proposal
| |
| __DIRECTDOWNLOAD_URL_ORDER__ -> Direct download url of an order
| |
| __DIRECTDOWNLOAD_URL_INVOICE__ -> Direct download url of an invoice
| |
| __SHIPPINGTRACKNUM__ -> Shipping tacking number
| |
| __SHIPPINGTRACKNUMURL__ -> Shipping tracking url
| |
| __DATE_YMD__ -> __DATE_YMD__
| |
| __DATE_DUE_YMD__ -> __DATE_DUE_YMD__
| |
| __AMOUNT__ -> __AMOUNT__
| |
| __AMOUNT_EXCL_TAX__ -> __AMOUNT_EXCL_TAX__
| |
| __AMOUNT_VAT__ -> __AMOUNT_VAT__
| |
| __AMOUNT_FORMATED__ -> __AMOUNT_FORMATED__
| |
| __AMOUNT_EXCL_TAX_FORMATED__ -> __AMOUNT_EXCL_TAX_FORMATED__
| |
| __AMOUNT_VAT_FORMATED__ -> __AMOUNT_VAT_FORMATED__
| |
| __DAY__ -> 18
| |
| __DAY_TEXT__ -> Monday
| |
| __DAY_TEXT_SHORT__ -> Mo
| |
| __DAY_TEXT_MIN__ -> M
| |
| __MONTH__ -> 3
| |
| __MONTH_TEXT__ -> March
| |
| __MONTH_TEXT_SHORT__ -> Mar
| |
| __MONTH_TEXT_MIN__ -> M
| |
| __YEAR__ -> 2019
| |
| __PREVIOUS_DAY__ -> 17
| |
| __PREVIOUS_MONTH__ -> 2
| |
| __PREVIOUS_YEAR__ -> 2018
| |
| __NEXT_DAY__ -> 19
| |
| __NEXT_MONTH__ -> 4
| |
| __NEXT_YEAR__ -> 2020
| |
| __ENTITY_ID__ -> 1
| |
| __DOL_MAIN_URL_ROOT__ -> http://localhostgit/dolibarr_dev/htdocs
| |
| __(AnyTranslationKey)__ -> Translation
| |
| __[AnyConstantKey]__ -> Value of constant
| |
| </pre>
| |
|
| |
|
| To make sure you have an up-to-date list, you can click on the "?" symbol next to the "Content" label when you create or modify your email template. | | To make sure you have an up-to-date list, you can click on the "?" symbol next to the "Content" label when you create or modify your email template. |
|
| |
|
| == Dolibarr <= 7 == | | ==Dolibarr <= 7== |
|
| |
|
| When we look at the predefined messages we see that the part number is replaced by a variable __FACREF__, __ORDERREF__ | | When we look at the predefined messages we see that the part number is replaced by a variable __FACREF__, __ORDERREF__ |