Win a copy of Kotlin in Action this week in the Kotlin forum!
  • Post Reply Bookmark Topic Watch Topic
  • New Topic

JavaMail: Changing mail.smtp.host  RSS feed

 
Rik Sweeney
Ranch Hand
Posts: 36
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Hi,

I was wondering if it's possible to change the mail.smtp.host after you've constructed the MimeMessage. The reason I ask this is because I need to support a failover SMTP server. At the moment I'm creating a new MimeMessage and copying everything from the old message into the new one:

Is there a better way of doing this or do I have to construct a new MimeMessage?

Thanks

Richard
 
It is sorta covered in the JavaRanch Style Guide.
  • Post Reply Bookmark Topic Watch Topic
  • New Topic
Boost this thread!