MagratheaMail
in package
MagratheaEmail: function that manages e-mail sends, building headers and sending e-mails
Table of Contents
Properties
- $error : mixed
- $from : mixed
- $htmlMessage : mixed
- $replyTo : mixed
- $simulate : bool
- $smtpArr : mixed
- $subject : mixed
- $to : mixed
- $txtMessage : mixed
Methods
- __toString() : mixed
- GetError() : string
- if an error happened, it's this way you're gonna get it!
- GetInfo() : array<string|int, mixed>
- returns info about the e-mail
- Send() : bool
- now we send it!
- SetFrom() : MagratheaMail
- Who are you pretending to be?
- SetHTMLMessage() : MagratheaMail
- Set Message as HTML
- SetNewEmail() : MagratheaMail
- Ok, I'm in a hurry and don't want to set everything... can you give me all of this in a single function? YES, I CAN!
- SetReplyTo() : MagratheaMail
- Who should be replied?
- SetSubject() : MagratheaMail
- What the fuck are we talking about?
- SetTo() : MagratheaMail
- Who's the guy(s) you have been contacting, huh?
- SetTXTMessage() : MagratheaMail
- Set Message as TXT
- Simulate() : MagratheaMail
- just simulate the error
- Validate() : bool
- Check if there's any visible errors in the e-mail preparation
Properties
$error
public
mixed
$error
$from
public
mixed
$from
$htmlMessage
public
mixed
$htmlMessage
$replyTo
public
mixed
$replyTo
$simulate
public
bool
$simulate
= false
$smtpArr
public
mixed
$smtpArr
$subject
public
mixed
$subject
$to
public
mixed
$to
$txtMessage
public
mixed
$txtMessage
Methods
__toString()
public
__toString() : mixed
GetError()
if an error happened, it's this way you're gonna get it!
public
GetError() : string
Return values
string —error on mail sending or validation error...
GetInfo()
returns info about the e-mail
public
GetInfo() : array<string|int, mixed>
Return values
array<string|int, mixed> —info
Send()
now we send it!
public
Send() : bool
Return values
bool —true on e-mail sent, false if we have any error
SetFrom()
Who are you pretending to be?
public
SetFrom(string $from[, string $reply = null ]) : MagratheaMail
Parameters
- $from : string
-
e-mail 'from'
- $reply : string = null
-
e-mail 'reply-to' (same as
setReplyTo
) optional
Return values
MagratheaMail —itself
SetHTMLMessage()
Set Message as HTML
public
SetHTMLMessage(string $message) : MagratheaMail
Parameters
- $message : string
-
HTML message
Return values
MagratheaMail —itself
SetNewEmail()
Ok, I'm in a hurry and don't want to set everything... can you give me all of this in a single function? YES, I CAN!
public
SetNewEmail(string $to, string $from, string $subject) : MagratheaMail
Parameters
- $to : string
-
destination e-mail
- $from : string
-
origin e-mail
- $subject : string
-
subject
Return values
MagratheaMail —itself
SetReplyTo()
Who should be replied?
public
SetReplyTo(string $var) : MagratheaMail
Parameters
- $var : string
-
e-mail 'reply-to'
Return values
MagratheaMail —itself
SetSubject()
What the fuck are we talking about?
public
SetSubject(string $subject) : MagratheaMail
Parameters
- $subject : string
-
message subject
Return values
MagratheaMail —itself
SetTo()
Who's the guy(s) you have been contacting, huh?
public
SetTo(string $var) : MagratheaMail
Parameters
- $var : string
-
destination e-mail
Return values
MagratheaMail —itself
SetTXTMessage()
Set Message as TXT
public
SetTXTMessage(string $message) : MagratheaMail
Parameters
- $message : string
-
TXT message
Return values
MagratheaMail —itself
Simulate()
just simulate the error
public
Simulate() : MagratheaMail
Return values
MagratheaMail —itself
Validate()
Check if there's any visible errors in the e-mail preparation
public
Validate() : bool