Welcome!

Welcome to the Official BlackBerry Support Community Forums. This is your resource to discuss support topics with your peers, and learn from each other. New to the forum? Please visit the ‘Getting Started’ link below.
inside custom component

Java Development

Reply
Developer
Guest
Posts: 146
Registered: ‎11-05-2008
Accepted Solution

Problem on sending email

 

My BB has two registered mails "email1" and "email2" and  "email1" is a default gateway of my BB for sending the message .But I want to send the message using "email2".But always I am receving email from email1.How can I solve the problem?I have used setFrom() and setHeader(Header.SENDER , emnail2) method of MessageClass .But nothing is working.I am using 8320.

Please help on this. 

Please use plain text.
Developer
Guest
Posts: 146
Registered: ‎11-05-2008

Re: Problem on sending email

Please help on the above prblem.

Please use plain text.
Developer
Guest
Posts: 146
Registered: ‎11-05-2008

Re: Problem on sending email

Please anybody help me on this problem.............
Please use plain text.
Developer
simon_hain
Posts: 14,080
Registered: ‎07-29-2008
My Carrier: O2 Germany

Re: Problem on sending email

to send a mail you have to retrieve the session.
if you use getDefaultSession you will always get the default session.

use getInstance(ServiceConfiguration sc) with the sc that contains your second mail.
----------------------------------------------------------
feel free to press the like button on the right side to thank the user that helped you.
please mark posts as solved if you found a solution.
@SimonHain on twitter
Please use plain text.
New Developer
myquestion
Posts: 193
Registered: ‎11-12-2008

Re: Problem on sending email

Yes.I have forget to use it.It's worked!
Please use plain text.