Support for RFC 2821 null return paths?

  2 posts   Feedicon  
Replies: 1 - Last Post: October 20, 2009 23:12
by: shannon
showing 1 - 2 of 2
 
Posted: October 05, 2009 13:03 by kyrieuon
Is there a way to specify a RFC 2821 null return path (<>) as an InternetAddress, create a Message with this sender address, save it to disk, load it from disk, and send it?

Any attempts to achieve this ended up with an invalid address <<>>, or a magically created fake sender address.

I understand that a null return path may be not a valid RFC 822 address, however it is neccessary for some mailer software to be able to send messages with such a sender address.
 
Posted: October 20, 2009 23:12 by shannon
There's no way to create an InternetAddress object representing that address since it's
an illegal address. Thus, you can't include such an address in a message.

But, you can use SMTPMessage.setEnvelopeFrom("<>"), or set the "mail.stmp.from" property,
to cause that address to be used in the SMTP "MAIL FROM:" command.
Replies: 1 - Last Post: October 20, 2009 23:12
by: shannon
  • Mysql
  • Glassfish
  • Jruby
  • Rails
  • Nblogo
Terms of Use; Privacy Policy;
© 2010, Oracle Corporation and/or its affiliates
(revision 20120127.ac94057)
 
 
Close
loading
Please Confirm
Close