Win a copy of Practical SVG this week in the HTML/CSS/JavaScript forum!
  • Post Reply Bookmark Topic Watch Topic
  • New Topic

How to change FROM address

 
Pavan Padmanabhi
Greenhorn
Posts: 7
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Hi,

I have an application which sends automatic mails to users from an address say abc@klm.xyz.com, i want to change it to abc@xyz.com...

where and how to change this FROM address ?? please help...
 
Ulf Dittmer
Rancher
Posts: 42970
73
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Which API are you using - JavaMail? If so, then the (Mime)Message class has methods for setting this. If you're using some other API then you need to tell us the details about that.
 
Pavan Padmanabhi
Greenhorn
Posts: 7
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Yes JavaMail...

Do i have to change any thing in the smtp server or any thing in server like .properties file or any EAR file ?
 
Ulf Dittmer
Rancher
Posts: 42970
73
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
After reading my previous post, what do you think you have to change?
 
Pavan Padmanabhi
Greenhorn
Posts: 7
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
I think in the Java code where FROM address is set.

But after doing that what other things needs to be done ? Any thing needs to be changed in smtp settings or server settings ?? I am new to this i actually don't know...
 
Ulf Dittmer
Rancher
Posts: 42970
73
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Why do you think something else needs to be changed? What happened after you made this initial change?
 
Pavan Padmanabhi
Greenhorn
Posts: 7
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
It worked after i changed...

but i have to restart the application. before restart it was not working. can you tell me why is it so ?
 
Ulf Dittmer
Rancher
Posts: 42970
73
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Are you asking why the altered code wasn't executed until you restarted the application?
 
The glass is neither half full or half empty. It is too big. But this tiny ad is just right:
the new thread boost feature brings a LOT of attention to your favorite threads
https://coderanch.com/t/674455/Thread-Boost-feature
  • Post Reply Bookmark Topic Watch Topic
  • New Topic
Boost this thread!