This forum has moved to a new location and is in read-only mode. Please visit talk.octobercms.com to access the new location.

JimRed
JimRed

Hello Guys,

Could you please help me? I've created a new e-mail template in backend. How can I use this template in frontend to send an e-mail to the visitor?

Thank you for your help! Pat

daftspunky
daftspunky

Hi Pat,

Check the documentation on sending emails with plugins, the process is the same, except the code you use when creating the template in the backend should match the first parameter.

So if you create a template with code "this.is.my.email" you should be able to send it with:

Mail::send('this.is.my.email', $data, function($message) use ($user)
{
    $message->to($user->email, $user->full_name);
});

Last updated

1-2 of 2

You cannot edit posts or make replies: the forum has moved to talk.octobercms.com.