FORMATIVE 7 Flashcards

(15 cards)

1
Q

Which method is used to load the Email class in CodeIgniter 4?
Group of answer choices

$email = \Config\Services::email();

$this->load->library(‘email’)

$email = new Email();

$this->email->load();

A

$email = \Config\Services::email();

How well did you know this?
1
Not at all
2
3
4
5
Perfectly
2
Q

Which method is used to set the email priority in CodeIgniter 4?
Group of answer choices

$email->setPriority(1);

$email->setMailPriority(1);

$email->priority(1);

$email->setImportance(1);

A

$email->setPriority(1);

How well did you know this?
1
Not at all
2
3
4
5
Perfectly
3
Q

How do you send an email to multiple recipients using CodeIgniter 4?
Group of answer choices

$email->setTo(‘user1@example.com, user2@example.com’);

$email->setTo([‘user1@example.com’, ‘user2@example.com’]);

$email->addRecipients([‘user1@example.com’, ‘user2@example.com’]);

$email->setRecipients(‘user1@example.com, user2@example.com’);

A

$email->setTo(‘user1@example.com, user2@example.com’);

How well did you know this?
1
Not at all
2
3
4
5
Perfectly
4
Q

How do you set the subject of an email in CodeIgniter 4?
Group of answer choices

$email->setSubject(‘Subject of Email’);

$email->subject(‘Subject of Email’);

$email->setTitle(‘Subject of Email’);

$email->addSubject(‘Subject of Email’);

A

$email->setSubject(‘Subject of Email’);

How well did you know this?
1
Not at all
2
3
4
5
Perfectly
5
Q

How do you set an email to be sent as plain text?
Group of answer choices

$email->setMailType(‘text’);

$email->setMailType(‘plain’);

$email->setFormat(‘plain’);

$email->usePlainText();

A

$email->setMailType(‘text’);

How well did you know this?
1
Not at all
2
3
4
5
Perfectly
6
Q

How do you set the sender’s email address in CodeIgniter 4?
Group of answer choices

$email->setFrom(‘your@example.com’);

$email->fromAddress(‘your@example.com’);

$email->sender(‘your@example.com’);

$email->setSender(‘your@example.com’);

A

$email->setFrom(‘your@example.com’);

How well did you know this?
1
Not at all
2
3
4
5
Perfectly
7
Q

Which method is used to set the email message body in CodeIgniter 4?
Group of answer choices

$email->setMessage(‘Message text’);

$email->setMessageBody(‘Message text’);

$email->setContent(‘Message text’);

$email->body(‘Message text’);

A

$email->setMessage(‘Message text’);

How well did you know this?
1
Not at all
2
3
4
5
Perfectly
8
Q

How do you set the email format to HTML in CodeIgniter 4?
Group of answer choices

$email->setMailType(‘html’);

$email->setFormat(‘html’);

$email->formatAsHTML();

$email->useHTML();

A

$email->setMailType(‘html’);

How well did you know this?
1
Not at all
2
3
4
5
Perfectly
9
Q

Which of the following is a valid mail type in CodeIgniter 4?
Group of answer choices

html

plain

text/html

xhtml

A

html

How well did you know this?
1
Not at all
2
3
4
5
Perfectly
10
Q

Which configuration file is used to set global email settings in CodeIgniter 4?
Group of answer choices

app/Config/Email.php

app/Config/App.php

app/Config/Database.php

app/Config/Mail.php

A

app/Config/Email.php

How well did you know this?
1
Not at all
2
3
4
5
Perfectly
11
Q

Which method allows you to set a custom email header?
Group of answer choices

$email->setHeader(‘X-Custom-Header’, ‘value’);

$email->customHeader(‘X-Custom-Header’, ‘value’);

$email->setCustomHeader(‘X-Custom-Header’, ‘value’);

$email->addHeader(‘X-Custom-Header’, ‘value’);

A

$email->setHeader(‘X-Custom-Header’, ‘value’);

How well did you know this?
1
Not at all
2
3
4
5
Perfectly
12
Q

What does setting the newline property do in the email configuration?
Group of answer choices

Specifies the newline character used in the email headers

Defines the format of email content

Determines how the email body is wrapped

Adds line breaks in the email subject

A

Specifies the newline character used in the email headers

How well did you know this?
1
Not at all
2
3
4
5
Perfectly
13
Q

How do you check if an email was successfully sent in CodeIgniter 4?
Group of answer choices

if ($email->send())

if ($email->isSent())

if ($email->wasSent())

if ($email->sent())

A

if($email->send())

How well did you know this?
1
Not at all
2
3
4
5
Perfectly
14
Q

Which method is used to set the recipient’s email address?
Group of answer choices

$email->setTo(‘user@example.com’);

$email->recipient(‘user@example.com’);

$email->addRecipient(‘user@example.com’);

$email->setRecipient(‘user@example.com’);

A

$email->setTo(‘user@example.com’);

How well did you know this?
1
Not at all
2
3
4
5
Perfectly
15
Q

What does the printDebugger() method do in the context of sending emails?
Group of answer choices

Prints the debugging information of the email sending process

Saves the email to a log file

Sends the email in debug mode

Prints the email body in the browser

A

Prints the debugging information of the email sending process

How well did you know this?
1
Not at all
2
3
4
5
Perfectly