Visit Registration
Description
This email is sent when a visit has been pre-registered. This email serves to both confirm the visit registration to the host and host delegate and to inform other stakeholders of the visit registration.

Template
<p>
Hello,
</p>
<p>
The following visit has been pre-registered:
</p>
<div style="margin-left:10%">
<p>
<b>Visitor(s):</b>
</p>
<div style="margin-left:10%">
@foreach(var visitor in @Model.Visitors)
{
<p>
@string.Format("{0}, {1}, {2}", visitor.FullName, visitor.Email, visitor.Company)
</p>
}
</div>
<p>
<b>When:</b> @Model.VisitStartDate to @Model.VisitEndDate
</p>
<p>
<b>Location:</b> @Model.BuildingName
</p>
<p>
<b>Host:</b>
</p>
<div style="margin-left:10%">
<p>
@Model.HostFullName
</p>
<p>
@Model.HostEmail
</p>
<p>
@if (Model.HostMobilePhone != null)
{
@Model.HostMobilePhone
}
</p>
</div>
</div>
<p>
Thank you.
</p>Razor Elements
Element | Description |
|---|---|
visitor.FullName | The visitor's full name |
visitor.Email | The visitor's email address |
visitor.Company | The visitor's company |
@Model.VisitStartDate | The start time and date of the visit |
@Model.VisitEndDate | The end time and date of the visit |
@Model.BuildingName | The name of the building the visit will take place in |
@Model.HostFullName | The host’s full name |
@Model.HostEmail | The email address of the host |
@Model.HostMobilePhone | The mobile phone number of the host |
Warning
It is recommended that these elements be used as stated with the only edits being to remove them if the information generated is not required.
Using Razor Elements in Loops
Razor elements may be defined as part of a @foreach loop to iterate through a collection.
Example:
@foreach (var credentialsForDayLeft in Model.CredentialsByDayLeft)
In the example above:
Model.CredentialsByDayLeftis the collection provided by the template modelcredentialsForDayLeftis a Razor element created for iterationThe element represents an individual item from the collection
Note
Razor elements created within a loop are locally scoped.
These elements are only available within the loop in which they are defined
They are not part of the main
ModelThey cannot be referenced outside of the loop
Additional Information:
Razor elements referencing
@Modelproperties are available throughout the template.Razor elements defined within loops are intended for temporary use when iterating through collections.
To reference data outside of a loop, use the appropriate
@Modelelement.
Warning
Razor elements defined within a loop (for example, @credentialsForDayLeft) must only be used within that loop. Attempting to reference these elements outside of their scope will result in an error.