import { BaseEmailShell } from './BaseEmailShell'
export interface CommonEmailProps {
recipientName: string
}
export interface InvitationEmailProps extends CommonEmailProps {
teamName: string
role: string
inviteUrl: string
}
export function InvitationTeamMemberEmail(props: InvitationEmailProps) {
const { recipientName, teamName, role, inviteUrl } = props
return (
Hi {recipientName},
You have been invited to join the {teamName} workspace
on Yaltopia Home as {role}.
If the button does not work, paste this link into your browser:{' '}
{inviteUrl}
)
}
export interface PropertyFoundEmailProps extends CommonEmailProps {
propertyTitle: string
address: string
price: string
link: string
}
export function PropertyFoundRequestEmail(props: PropertyFoundEmailProps) {
const { recipientName, propertyTitle, address, price, link } = props
return (
Hi {recipientName},
Good news — a new property matches your saved search on Yaltopia Home.
Property match
Title
{propertyTitle}
Address
{address}
Guide price
{price}
)
}
export interface PropertyRequestReceivedProps extends CommonEmailProps {
budget: string
locations: string
bedrooms: string
ref: string
}
export function PropertyRequestReceivedEmail(
props: PropertyRequestReceivedProps,
) {
const { recipientName, budget, locations, bedrooms, ref } = props
return (
Hi {recipientName},
Thanks for sharing what you are looking for. Our team will start
searching and notify you as soon as we have a match.
Request summary
Budget
{budget}
Locations
{locations}
Bedrooms
{bedrooms}
Reference
{ref}
You can update your request at any time from your dashboard.
)
}
export interface BankDetails {
bank: string
accountName: string
accountNumber: string
reference: string
}
export interface BillReminderEmailProps extends CommonEmailProps {
period: string
rent?: string
water?: string
security?: string
electric?: string
total: string
dueDate: string
paymentUrl?: string
bankDetails?: BankDetails[]
paymentOptionsUrl?: string
calendarUrl?: string
}
export function BillPaymentReminderEmail(props: BillReminderEmailProps) {
const {
recipientName,
period,
rent,
water,
security,
electric,
total,
dueDate,
paymentUrl,
bankDetails,
paymentOptionsUrl,
calendarUrl,
} = props
return (
Hi {recipientName},
This is a reminder that your housing charges for {period}{' '}
are due on {dueDate}.
Charges
{rent && (
Rent
{rent}
)}
{water && (
Water
{water}
)}
{security && (
Security
{security}
)}
{electric && (
Electric
{electric}
)}
Total due
{total}
{bankDetails && bankDetails.length > 0 && (
Approved bank accounts
{bankDetails.length} options
{bankDetails.map((bank) => (
{bank.bank}
{bank.accountName}
Acct: {bank.accountNumber}
Ref: {bank.reference}
))}
)}
{paymentOptionsUrl && (
View all approved payment options at{' '}
yaltopia.home/payments
.
)}
If you have already paid, you can ignore this reminder.
)
}
export interface SingleChargeReminderProps extends CommonEmailProps {
period: string
amount: string
dueDate: string
paymentUrl?: string
bankDetails?: BankDetails[]
paymentOptionsUrl?: string
calendarUrl?: string
}
export function RentBillReminderEmail(props: SingleChargeReminderProps) {
const { amount, ...rest } = props
return (
)
}
export function WaterBillReminderEmail(props: SingleChargeReminderProps) {
const { amount, ...rest } = props
return (
)
}
export function SecurityBillReminderEmail(props: SingleChargeReminderProps) {
const { amount, ...rest } = props
return (
)
}
export function ElectricBillReminderEmail(props: SingleChargeReminderProps) {
const { amount, ...rest } = props
return (
)
}
export interface NewsletterEmailProps extends CommonEmailProps {
title: string
intro: string
articles: { title: string; description: string }[]
}
export function NewsletterEmail(props: NewsletterEmailProps) {
const { recipientName, title, intro, articles } = props
return (
Hi {recipientName},
{intro}
{articles.map((article) => (
{article.title}
{article.description}
))}
You are receiving this email because you are subscribed to the Yaltopia
Home newsletter. You can manage your email preferences from your
account.
)
}
export interface OwnerSuccessEmailProps extends CommonEmailProps {
propertyTitle: string
address: string
outcome: 'sold' | 'rented'
price: string
}
export function OwnerSuccessEmail(props: OwnerSuccessEmailProps) {
const { recipientName, propertyTitle, address, outcome, price } = props
return (
Dear {recipientName},
We’re excited to share that your property on Yaltopia Home has{' '}
{outcome}.
Property
Title
{propertyTitle}
Address
{address}
{outcome === 'sold' ? 'Sale price' : 'Rental amount'}
{price}
Our team will follow up shortly with settlement details and next
steps.
)
}
export interface ListingApprovedEmailProps extends CommonEmailProps {
propertyTitle: string
address: string
publicUrl: string
}
export function ListingApprovedEmail(props: ListingApprovedEmailProps) {
const { recipientName, propertyTitle, address, publicUrl } = props
return (
Hi {recipientName},
Your property listing has been reviewed and approved. It is now visible
to the public on Yaltopia Home.
Listing details
Title
{propertyTitle}
Address
{address}
)
}
export interface AppointmentBookedEmailProps extends CommonEmailProps {
date: string
time: string
timezone: string
location: string
agentName: string
calendarUrl: string
/** URL to cancel or manage the appointment (e.g. dashboard or cancel endpoint). */
cancelUrl: string
}
export function AppointmentBookedEmail(props: AppointmentBookedEmailProps) {
const { recipientName, date, time, timezone, location, agentName, calendarUrl, cancelUrl } =
props
return (
Hi {recipientName},
Your appointment has been scheduled. Here are the details:
Appointment
Date
{date}
Time
{time} ({timezone})
Location
{location}
Agent
{agentName}
Please arrive a few minutes early. You can reschedule from your dashboard.
)
}
export interface PasswordResetEmailProps extends CommonEmailProps {
resetUrl: string
expiresInMinutes: number
}
export function PasswordResetEmail(props: PasswordResetEmailProps) {
const { recipientName, resetUrl, expiresInMinutes } = props
return (
Hi {recipientName},
We received a request to reset the password for your Yaltopia Home
account. Click the button below to choose a new password.
This link will expire in {expiresInMinutes} minutes. If you did not
request a password reset, you can safely ignore this email.
)
}