Jump to content

Recommended Posts

Posted

I can't seem to find a tutorial where in I can learn how to add email templates here admin/settings/company/emails/templates/

Can you also teach me how to send emails using a template.

I will be doing it in a plugin approach.

Thank you for the response

Posted

You can send email in multiple ways through a plugin, such as via a cron task or view a controller action in the UI. If you want your plugin to create email templates, you need to create an email group and an email template for that group during your plugin's Install and/or Upgrade methods. Be sure you also remove those email templates/groups on uninstall. It's the plugin's responsibility to manage its own data.

I recommend you take a look at an existing plugin's source code to see what a working implementation looks like, such as the Support Manager plugin.

Posted

Thank you for the lead I have successfully created an email template and sent it by using this code

$this->Emails->send('Verifyemail.request_verify', Configure::get('Blesta.company_id'), null, $email, $tags);

Now my question is why it doesn't log on the Email Log of the client?

Posted

I believe this can be accomplished through the $options parameter for Emails::send().  Specifically you'll need to determine to which client the email belongs and set $options['to_client_id'] = $client->id;

Join the conversation

You can post now and register later. If you have an account, sign in now to post with your account.

Guest
Reply to this topic...

×   Pasted as rich text.   Paste as plain text instead

  Only 75 emoji are allowed.

×   Your link has been automatically embedded.   Display as a link instead

×   Your previous content has been restored.   Clear editor

×   You cannot paste images directly. Upload or insert images from URL.

Loading...
×
×
  • Create New...