File APIs for Java Developers
Manipulate DOC, XLS, PPT, PDF and many others from your application.
http://aspose.com/file-tools
The moose likes Other JSE/JEE APIs and the fly likes How to change FROM address Big Moose Saloon
  Search | Java FAQ | Recent Topics | Flagged Topics | Hot Topics | Zero Replies
Register / Login
JavaRanch » Java Forums » Java » Other JSE/JEE APIs
Bookmark "How to change FROM address" Watch "How to change FROM address" New topic
Author

How to change FROM address

Pavan Padmanabhi
Greenhorn

Joined: Sep 29, 2013
Posts: 7
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
Marshal

Joined: Mar 22, 2005
Posts: 42596
    
  65
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.


Ping & DNS - my free Android networking tools app
Pavan Padmanabhi
Greenhorn

Joined: Sep 29, 2013
Posts: 7
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
Marshal

Joined: Mar 22, 2005
Posts: 42596
    
  65
After reading my previous post, what do you think you have to change?
Pavan Padmanabhi
Greenhorn

Joined: Sep 29, 2013
Posts: 7
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
Marshal

Joined: Mar 22, 2005
Posts: 42596
    
  65
Why do you think something else needs to be changed? What happened after you made this initial change?
Pavan Padmanabhi
Greenhorn

Joined: Sep 29, 2013
Posts: 7
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
Marshal

Joined: Mar 22, 2005
Posts: 42596
    
  65
Are you asking why the altered code wasn't executed until you restarted the application?
 
I agree. Here's the link: http://aspose.com/file-tools
 
subject: How to change FROM address