SimpleMailMessage « Java EE « Spring Q&A

1. How to formatting a text with SimpleMailMessage?

My email content text is

String text = "Hey, You are create a new Account! Best, MyTeam";
How can I format the text to:

You are create a new Account!

Best, MyTeam

2. Could SimpleMailMessage implement .equals() ?

I was unittesting a class that accepted a SimpleMailMessage, made a copy using the constructor, set a field or two then passed it to a MailSender. I found that I couldn't ...

3. SimpleMailMessage to and from issue

SimpleMailMessage to and from issue Hi, Ive got the following code up and running, see below: My question is, I am receiving emails on my gmail account but the from is ...

4. SimpleMailMessage with a PERIOD in the text - problem

I'm facing a funny/crazy problem. If I have a PERIOD(.) in the body text, the email is not sent. for example Code: SimpleMailMessage msg = new SimpleMailMessage(); msg.setFrom(""); msg.setSubject("My subject"); msg.setTo(; ...

5. Using setSendDate method of SimpleMailMessage

Hi, I'm having problem setting a date for sending an email using setSendDate(). The email is sent immediately!! There is no enough documentation on this method. I assume that it sends ...

6. SimpleMailMessage and charset

SimpleMailMessage and charset I'm using MailSender and SimpleMailMessage from the spring-support library for sending mail from my webapp. When emails are created when the app is running in tomcat, the emails ...

7. MailSender.send() - Why does this use SimpleMailMessage rather than MailMessage

It seems to me that the interface org.springframework.mail.MailSender should use the interface type org.springframework.mail.MailMessage, rather than the concrete type org.springframework.mail.SimpleMailMessage. Am I missing something here?

8. org.springframework.mail.SimpleMailMessage not work with UTF-8?

Dear Team, We want to send Asian character email with UTF-8 encoding. But receiver gets all ?????? Our env: Spring 2.0 with WebWork2, Linux Tomcat web server. Not sure what mail ...

9. overriding SimpleMailMessage template config?

PHP Code:

10. need fully-qualified hostname using SimpleMailMessage

need fully-qualified hostname using SimpleMailMessage Hi, I'am trying to send an email from my tomcat server using SimpleMailMessage. The problem is that the smtp request which sent is 'helo pomme' instead ...