Discussion:
[Springframework-user] SimpleMailMessage and Date header
Andreas Brenk
2004-05-04 11:36:27 UTC
Permalink
Hi all,

just a quick and simple question: Why does SimpleMailMessage doesn't
have a method to set the Date header?

Regards,
Andreas
jürgen höller [werk3AT]
2004-05-04 13:01:20 UTC
Permalink
SimpleMailMessage is more or less the least common denominator of COS' and JavaMail's mail sending capabilities. Actually, it should be possible to set the date header with COS too; it's just that there is no explicit method for it in the COS MailMessage class. So we might provide date header support for SimpleMailMessage in a future point release.

For the time being, you'll have to work with the JavaMailSender interface and JavaMail's MimeMessage class. With the MimeMessageHelper class that Spring provides, it should be easy enough to populate a MimeMessage in a SimpleMailMessage-style fashion. (See MimeMessageHelper's javadoc for details.) Of course, MimeMessage is much more powerful: It supports attachements, text encoding, etc.

Juergen


-----Original Message-----
From: springframework-user-***@lists.sourceforge.net
[mailto:springframework-user-***@lists.sourceforge.net]On Behalf Of
Andreas Brenk
Sent: Tuesday, May 04, 2004 1:36 PM
To: springframework-***@lists.sourceforge.net
Subject: [Springframework-user] SimpleMailMessage and Date header


Hi all,

just a quick and simple question: Why does SimpleMailMessage doesn't
have a method to set the Date header?

Regards,
Andreas


-------------------------------------------------------
This SF.Net email is sponsored by: Oracle 10g
Get certified on the hottest thing ever to hit the market... Oracle 10g.
Take an Oracle 10g class now, and we'll give you the exam FREE.
http://ads.osdn.com/?ad_id=3149&alloc_id=8166&op=click
Andreas Brenk
2004-05-05 10:02:32 UTC
Permalink
Thanks. I guess I have to switch to MimeMessage then and take a look at
MimeMessageHelper. Regardless of my relatively "simple mail message". ;-)

Regards,
Andreas
Post by jürgen höller [werk3AT]
SimpleMailMessage is more or less the least common denominator of COS' and JavaMail's mail sending capabilities. Actually, it should be possible to set the date header with COS too; it's just that there is no explicit method for it in the COS MailMessage class. So we might provide date header support for SimpleMailMessage in a future point release.
For the time being, you'll have to work with the JavaMailSender interface and JavaMail's MimeMessage class. With the MimeMessageHelper class that Spring provides, it should be easy enough to populate a MimeMessage in a SimpleMailMessage-style fashion. (See MimeMessageHelper's javadoc for details.) Of course, MimeMessage is much more powerful: It supports attachements, text encoding, etc.
Juergen
-----Original Message-----
just a quick and simple question: Why does SimpleMailMessage doesn't
have a method to set the Date header?
Baum, Karl
2004-05-04 13:23:55 UTC
Permalink
Hi. I am wondering if anyone knows where I can find example usage of
the AbstractWizardFormController. Thanks.

Karl
Loading...