if ($groupId = $module->EmailGroups->add($group)) {
$email = [
'email_group_id' => $groupId,
'company_id' => isset($_SESSION['blesta_company_id']) ? $_SESSION['blesta_company_id'] : 1,
'lang' => 'en_us',
'from' => 'no-reply@mydomain.com',
'from_name' => 'Blesta Order System',
'subject' => 'SSL Certificate',
'text' => 'Hi {first_name}, Now you are able to generate your certificate. Login to your account and process with Certificate Configuration',
'html' => '<p>Hi {first_name},</p><p>Now you are able to generate your certificate. Login to your account and process with Certificate Configuration</p>',
];
$module->Emails->add($email);
Template created successfully but I don't know how setup name and description in admin area email templates list.
I try added files in directories
..modules/mymodule/language/en_us/admin_company_emails.php
..modules/mymodule/language/de_de/admin_company_emails.php
$lang['AdminCompanyEmails.templates.certificate_generate_name'] = 'SSL Certificate';
$lang['AdminCompanyEmails.templates.certificate_generate_desc'] = 'Notice sent that the client is able to generate and configure a certificate.';
Question
Maciej Sza
I added custom email template for my module:
$group = [
'action' => 'certificate_generate',
'type' => 'client',
'plugin_dir' => null,
'tags' => '{first_name},{last_name},{package_name}',
];
if ($groupId = $module->EmailGroups->add($group)) {
$email = [
'email_group_id' => $groupId,
'company_id' => isset($_SESSION['blesta_company_id']) ? $_SESSION['blesta_company_id'] : 1,
'lang' => 'en_us',
'from' => 'no-reply@mydomain.com',
'from_name' => 'Blesta Order System',
'subject' => 'SSL Certificate',
'text' => 'Hi {first_name}, Now you are able to generate your certificate. Login to your account and process with Certificate Configuration',
'html' => '<p>Hi {first_name},</p><p>Now you are able to generate your certificate. Login to your account and process with Certificate Configuration</p>',
];
$module->Emails->add($email);
Template created successfully but I don't know how setup name and description in admin area email templates list.
I try added files in directories
..modules/mymodule/language/en_us/admin_company_emails.php
..modules/mymodule/language/de_de/admin_company_emails.php
$lang['AdminCompanyEmails.templates.certificate_generate_name'] = 'SSL Certificate';
$lang['AdminCompanyEmails.templates.certificate_generate_desc'] = 'Notice sent that the client is able to generate and configure a certificate.';
Unfortunately this solution is not working.
0 answers to this question
Recommended Posts
Join the conversation
You can post now and register later. If you have an account, sign in now to post with your account.