You are viewing a plain text version of this content. The canonical link for it is here.
Posted to dev@commons.apache.org by Peter Luttrell <pe...@sharpuniverse.com> on 2006/06/26 23:29:00 UTC

Sender vs From Fields

Is there any way to set both the Sender and From fields with commons-email?

With JavaMail 1.3 and later you can do this on MimeMessage:
  setFrom( new InternetAddress( "webmaster@bla.com" ) );
  setSender( new InternetAddress( "john@bla.com" ) );

Commons-email provides setFrom(..), which calls MimeMessage's setFrom(..).

thanks.
-peter


---------------------------------------------------------------------
To unsubscribe, e-mail: commons-dev-unsubscribe@jakarta.apache.org
For additional commands, e-mail: commons-dev-help@jakarta.apache.org