You can add a new message template using SQL-query to your database.
For example,
IF NOT EXISTS ( SELECT 1 FROM [dbo].[MessageTemplate] WHERE [Name]=N'YourMessageTemplate') BEGIN INSERT [dbo].[MessageTemplate] ([Name], [BccEmailAddresses], [Subject], [Body], [IsActive], [EmailAccountId]) VALUES (N'YourMessageTemplate', NULL, N'%Store.Name%. Hello!', N'<p> Hi! This message from% Store.Name% </ p> ', 'true', 1) END GO
You can add a new message template using SQL-query to your database.
For example,
IF NOT EXISTS ( SELECT 1 FROM [dbo].[MessageTemplate] WHERE [Name]=N'YourMessageTemplate') BEGIN INSERT [dbo].[MessageTemplate] ([Name], [BccEmailAddresses], [Subject], [Body], [IsActive], [EmailAccountId]) VALUES (N'YourMessageTemplate', NULL, N'%Store.Name%. Hello!', N'<p> Hi! This message from% Store.Name% </ p> ', 'true', 1) END GO
For 2.80.
Then you can edit it in the admin area.
thanks.
and how can i call this new template ? probably only from source code, right ?
To all: when suggesting or referring to a page or template item or otherwise to edit/modify, please, please, please be specific. Which page name, located where? With MVC there are often 2-4 places where code needs to be modified. And in nopC there are several cs pages that could be confused as which ones. So, kindly, be specific.
@e-novative: If you would have read the post, you would see that nobody is suggesting or referring to a page or template item. I was just asking for a simple code example, which shows how to send an email using a message template. Anyway, guess it's easier to look for that code by myself.