Loading

Quipoin Menu

Learn • Practice • Grow

spring / JavaMail Overview
mcq
Direction: Choose the correct option

Q1.

What is JavaMail?
A. An API for sending and receiving emails from Java
B. A mail server
C. A protocol
D. None
Direction: Choose the correct option

Q2.

Which Spring module provides email support?
A. Spring Mail
B. Spring Core
C. Spring MVC
D. Spring Integration
Direction: Choose the correct option

Q3.

What is the core interface for sending emails in Spring?
A. MailSender
B. JavaMailSender
C. EmailSender
D. MessageSender
Direction: Choose the correct option

Q4.

How do you configure a mail sender in Spring?
A. JavaMailSenderImpl bean with host, port, credentials
B. Using @EnableMail
C. Both A and B
D. None
Direction: Choose the correct option

Q5.

What is a SimpleMailMessage?
A. A class representing a simple email message (from, to, subject, text)
B. A message with attachments
C. An HTML message
D. None
Direction: Choose the correct option

Q6.

How do you send an email using JavaMailSender?
A. mailSender.send(message)
B. mailSender.sendEmail(message)
C. mailSender.transport(message)
D. None
Direction: Choose the correct option

Q7.

What is MimeMessage used for?
A. For complex emails with attachments, HTML content, etc.
B. For simple text emails
C. For multipart messages
D. Both A and C
Direction: Choose the correct option

Q8.

How do you create a MimeMessage in Spring?
A. mailSender.createMimeMessage()
B. new MimeMessage()
C. Both A and B
D. None
Direction: Choose the correct option

Q9.

What is MimeMessageHelper?
A. A helper class to simplify populating MimeMessage
B. A helper for attachments
C. A helper for HTML
D. All of the above
Direction: Choose the correct option

Q10.

Which protocol is commonly used for sending email?
A. SMTP
B. POP3
C. IMAP
D. HTTP