Magrathea PHP 2

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

Methods

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

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

Validate()

Check if there's any visible errors in the e-mail preparation

public Validate() : bool
Return values
bool

        
On this page

Search results