PublicEmailTemplate.html file in the folder App_Data from the root of the application
(or localized with a two-letter language name, for example: PublicEmailTemplate-de.html file for German language)
used to branding of e-mail when sending public links (if enabled AllowSendPublicLinks parameter).
For branding e-mail with public links, edit the file PublicEmailTemplate.html
(or create such a file if it does not exist; by default this file is exist).
You can immediately create (or use an already existing) localized file by adding a suffix
with a two-letter language name, for example "-fr", "-de", "-ja" (for English, the suffix "-en" is not necessary).
By default, there are already such files for the German language (suffix "-de"), French ("-fr"), Italian ("-it"), Spanish ("-es") and Russian ("-ru").
This file is a plain HTML document that you can edit in notepad or in another code editor with a syntax highlighting.
In addition, you can use the following list of variables to substitute values:
-
{Owner} The name of the owner (display user name), the one who created the public link.
-
{OwnerEmail} The e-mail address of the owner, if it was specified
in the Sender email field when sending the letter.
Can be used if you want to insert a link of the form
<a href="mailto:{OwnerEmail}">{Owner}<a>
to reply.
-
{OwnerEmailInfo} Information about the sender's address, if his mail was specified.
The text of this information is taken from the localized value
ServerSendEmailInfo.
By default, it is added at the end of the message.
-
{ApplicationTitle} The value is taken from the localized string CommonMainTitle.
See Application name, title, loading text section.
-
{ApplicationName} The value is taken from the parameter ApplicationName.
See Application name, title, loading text section.
The default value is HTTP Commander.
-
{ApplicationUrl} Your HTTP Commander application URL address.
See parameter DomainName.
By default it is placed at the bottom of the e-mail message.
-
{RelativeLogoUrl} Relative URL to the icon with logo image -
has a constant value Scripts/logo.png.
When you send a message, these logo will be included as attachments and instead of this url,
values like "cid:logo.png" will be substituted.
-
{ResourceName} Shared file or folder name.
-
{RelativeTypeIconUrl} Relative URL to the icon with the type of shared resource.
If this is a file, the value Images/24/file.png is substituted,
otherwise - Images/24/folder.png.
When you send a message, these icons will be included as attachments and instead of these links,
values like "cid:file.png" (or "cid:folder.png") will be substituted.
-
{Url} Url of anonymous link. In most cases, this is the full address
(with AnonymousDownload.ashx), or a short address (like https://goo.gl/CijCgW),
if you only use short links (PublicLinksViewType = OnlyShortUrl)
and short address generated.
-
{ShortUrl} Short Url an anonymous link, like https://goo.gl/CijCgW.
If short links are disabled (PublicLinksViewType = OnlyLongUrl)
or when sending a message, there is no short link, then an empty string will be substituted and additionally for the variable
{NoShortUrl} - the value of
style="display:none!important;"
-
{ShortOrFullUrl} If there is a short URL, then it will be substituted, otherwise it will be full.
-
{ExpirationDate} The expiration date of the anonymous link in the format
m/d/yyyy or d/m/yyyy.
-
{Notes} Notes specified in the Note for users
field if the link to the folder.
If an anonymous link to a file or a note was not specified,
an empty value is substituted, and instead
of the variable {NoNotes} the value is substituted:
style="display:none!important;"
-
{ThemeBackColor}, {ThemeBorderColor}, {ThemeFontColor}
The color of background, borders and font respectively, depending on the theme
(specified in the setting StyleThemeName).
By default, the following values are used (from the blue theme):
{ThemeBackColor} = #1566aa
{ThemeBorderColor} = #1461a1
{ThemeFontColor} = #ffffff
In the default template, these colors are used for the "Open" button, which opens an anonymous url link in the variable {ShortOrFullUrl}.
It is also possible to specify relative URLs to PNG images from the following folders in the root of the application:
Images/,
Images/24/,
Images/48/,
Images/ext/16,
Images/ext/32,
Images/ext/96.
In this case, the file must exist and its name should contain only Latin characters, numbers, hyphens. For example, you can place an image in the email template:
<img src="Images/hclogomin.png" />
In this case, when sending a message, this picture will
be added to the attachments and instead of src value - the value cid:hclogomin.png.
The default template for English is as follows:
<div style="width:100%;padding:24px 0 16px 0;background-color:#f5f5f5;text-align:center">
<div style="display:inline-block;width:90%;max-width:680px;min-width:280px;text-align:left;font-family:Roboto,Arial,Helvetica,sans-serif">
<div style="border-bottom:1px solid #f0f0f0;border-right:1px solid #f0f0f0">
<div style="padding:24px 32px 24px 32px;background:#fff;border-right:1px solid #eaeaea;border-bottom:1px solid #eaeaea" dir="ltr">
<div style="font-size:14px;line-height:18px;color:#444">
<a href="mailto:{OwnerEmail}" style="color:inherit;text-decoration:none" target="_blank">
{Owner} (via {ApplicationTitle})
</a> has invited you access to the following shared resource:
</div>
<div style="height:10px"></div>
<div style="font-size:18px;display:table">
<div style="height:16px"></div>
<div style="display:table-row;border-bottom:4px solid #fff">
<span style="display:table-cell;padding-left:12px">
<img src="{RelativeTypeIconUrl}" alt="" style="vertical-align:middle;max-width:24px" /> <a target="_blank" href="{Url}">
{ResourceName}
</a><br />
<span style="font-size:0.6em">(<a target="_blank" href="{Url}">{Url}</a>)</span>
</span>
</div>
<div {NoShortUrl}>
<div style="height:16px"></div>
<div style="display:table-row;border-bottom:4px solid #fff">
<span style="display:table-cell;padding-left:12px">
<a target="_blank" href="{ShortUrl}">Alternate link</a>
<br /><span style="font-size:0.6em">(<a target="_blank" href="{ShortUrl}">{ShortUrl}</a>)</span>
</span>
</div>
</div>
</div>
<div style="height:16px"></div>
<div style="height:1px;background-color:#eee"></div>
<div style="height:24px"></div>
<div style="display:table-row">
<span style="display:table-cell;vertical-align:top;padding-left:16px;font-size:13px;line-height:18px;max-width:496px;color:#262626">
Valid until <strong>{ExpirationDate}</strong>
</span>
</div>
<div {NoNotes}>
<div style="height:16px"></div>
<div style="display:table-row">
<span style="display:table-cell;vertical-align:top;padding-left:16px;font-size:13px;line-height:18px;max-width:496px;color:#262626">
{Notes}
</span>
</div>
</div>
<div style="height:24px"></div>
<div style="height:1px;background-color:#eee"></div>
<div style="height:16px"></div>
<div>
<a href="{ShortOrFullUrl}" style="background-color:{ThemeBackColor};border:1px solid {ThemeBorderColor};border-radius:2px;color:{ThemeFontColor};display:inline-block;font-family:Roboto,Arial,Helvetica,sans-serif;font-size:11px;font-weight:bold;height:29px;line-height:29px;min-width:54px;outline:0px;padding:0 8px;text-align:center;text-decoration:none" target="_blank">
Open
</a>
</div>
</div>
</div>
<table style="padding:14px 10px 0 10px" role="presentation" dir="ltr">
<tr>
<td style="width:100%;font-size:11px;font-family:Roboto,Arial,Helvetica,sans-serif;color:#646464;line-height:20px;min-height:40px;vertical-align:middle">
You have received this email because someone shared a resource with you from {ApplicationName}.
{OwnerEmailInfo}
</td>
<td style="padding-left:20px;vertical-align:middle">
<a href="{ApplicationUrl}" target="_blank">
<img src="{RelativeLogoUrl}" alt="{ApplicationName}" border="0" style="max-height:20px;min-width:96px;" />
</a>
</td>
</tr>
</table>
</div>
</div>
Screenshots