Menu

## SendMail extends Model
in package

SendMail.php : 41

Class SendMail

Model for managing outbound email messages.

##### Tags

mixin

### Table of Contents

#### Properties

$academic_year_id : int
$academicYear : AcademicYear
$attachments : string|null
$created_at : DateTime
$deleted_at : DateTime
$executed_at : DateTime|null
$fired_at : DateTime|null
$from : string
$from_address : string
$id : int
$is_executed : int
$message : string
$message_id : string|null
$read_at : DateTime|null
$school : School
$school_id : int
$status : int
$student : User|null
$subject : string
$to : string
$type : string
$updated_at : DateTime
$user : User
$user_id : int
$dates : array<string|int, mixed>
  The attributes that should be mutated to dates.
$fillable : array<string|int, mixed>
  The attributes that are mass assignable.
$table : string
  The table associated with the model.

#### Methods

academicYear() : BelongsTo
  Get the academic year for this mail.
school() : BelongsTo
  Get the school for this mail.
student() : BelongsTo
  Get the student recipient for this mail.
user() : BelongsTo
  Get the user who initiated this mail.

### Properties

#### $academic_year_id

SendMail.php : 0
`public int $academic_year_id`

#### $academicYear read-only

SendMail.php : 0
`public AcademicYear $academicYear`

#### $attachments

SendMail.php : 0
`public string|null $attachments`

#### $created_at

SendMail.php : 0
`public DateTime $created_at`

#### $deleted_at

SendMail.php : 0
`public DateTime $deleted_at`

#### $executed_at

SendMail.php : 0
`public DateTime|null $executed_at`

#### $fired_at

SendMail.php : 0
`public DateTime|null $fired_at`

#### $from

SendMail.php : 0
`public string $from`

#### $from_address

SendMail.php : 0
`public string $from_address`

#### $id

SendMail.php : 0
`public int $id`

#### $is_executed

SendMail.php : 0
`public int $is_executed`

#### $message

SendMail.php : 0
`public string $message`

#### $message_id

SendMail.php : 0
`public string|null $message_id`

#### $read_at

SendMail.php : 0
`public DateTime|null $read_at`

#### $school read-only

SendMail.php : 0
`public School $school`

#### $school_id

SendMail.php : 0
`public int $school_id`

#### $status

SendMail.php : 0
`public int $status`

#### $student read-only

SendMail.php : 0
`public User|null $student`

#### $subject

SendMail.php : 0
`public string $subject`

#### $to

SendMail.php : 0
`public string $to`

#### $type

SendMail.php : 0
`public string $type`

#### $updated_at

SendMail.php : 0
`public DateTime $updated_at`

#### $user read-only

SendMail.php : 0
`public User $user`

#### $user_id

SendMail.php : 0
`public int $user_id`

#### $dates

SendMail.php : 65

The attributes that should be mutated to dates.

`protected array<string|int, mixed> $dates = ['executed_at', 'fired_at', 'read_at', 'deleted_at']`

#### $fillable

SendMail.php : 56

The attributes that are mass assignable.

`protected array<string|int, mixed> $fillable = ['school_id', 'academic_year_id', 'user_id', 'from_address', 'from', 'to', 'subject', 'message', 'attachments', 'status', 'type', 'message_id', 'executed_at', 'is_executed', 'fired_at', 'read_at']`

#### $table

SendMail.php : 49

The table associated with the model.

`protected string $table = 'send_mail'`

### Methods

#### academicYear()

SendMail.php : 82

Get the academic year for this mail.

`public academicYear() : BelongsTo`

##### Return values

BelongsTo

#### school()

SendMail.php : 72

Get the school for this mail.

`public school() : BelongsTo`

##### Return values

BelongsTo

#### student()

SendMail.php : 102

Get the student recipient for this mail.

`public student() : BelongsTo`

##### Return values

BelongsTo

#### user()

SendMail.php : 92

Get the user who initiated this mail.

`public user() : BelongsTo`

##### Return values

BelongsTo

## Search results