# Mail

class Mail extends PHPMailer

## Traits

Queue

## Properties

static | $mode |  |

## Methods

void
setQueue(Closure $callback)

For NSQ|Redis|Etc

from Queue
static
getInstance()

No description

static Mail
to(string $mailAddress, string $mailName = 'Member')

Set destionation mail address

Mail
subject(string $mailObject)

Mail subject

void
charSet(string $charSet)

Set content charset

Mail
message(string $mailPlainMessage)

Set plain message without html format

Mail
loadTemplate(object $template)

Send an email with formated template

Mail
attachment(string $filePath, array $options = [])

Attach some file

Mail
setEnv(string $envName)

An option to override environment setting

static array
availableEnv()

PHPMailer environment list

## Details

###
in Queue at line 23
`void setQueue(Closure $callback)`

For NSQ|Redis|Etc

#### Parameters

Closure | $callback |

#### Return Value

void |

###
at line 57
`static getInstance()`

No description

###
at line 71
`static Mail to(string $mailAddress, string $mailName = 'Member')`

Set destionation mail address

#### Parameters

string | $mailAddress |
string | $mailName |

#### Return Value

Mail |

###
at line 83
`Mail subject(string $mailObject)`

Mail subject

#### Parameters

string | $mailObject |

#### Return Value

Mail |

###
at line 95
`void charSet(string $charSet)`

Set content charset

#### Parameters

string | $charSet |

#### Return Value

void |

###
at line 106
`Mail message(string $mailPlainMessage)`

Set plain message without html format

#### Parameters

string | $mailPlainMessage |

#### Return Value

Mail |

###
at line 121
`Mail loadTemplate(object $template)`

Send an email with formated template

#### Parameters

object | $template |

#### Return Value

Mail |

###
at line 139
`Mail attachment(string $filePath, array $options = [])`

Attach some file

#### Parameters

string | $filePath |
array | $options |

#### Return Value

Mail |

###
at line 152
`Mail setEnv(string $envName)`

An option to override environment setting

#### Parameters

string | $envName |

#### Return Value

Mail |

###
at line 167
`static array availableEnv()`

PHPMailer environment list

#### Return Value

array |