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.

inside custom component

Java Development

Reply
Developer
Posts: 146
Registered: ‎11-05-2008
My Device: Not Specified
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. 

Developer
Posts: 146
Registered: ‎11-05-2008
My Device: Not Specified

Re: Problem on sending email

Please help on the above prblem.

Developer
Posts: 146
Registered: ‎11-05-2008
My Device: Not Specified

Re: Problem on sending email

Please anybody help me on this problem.............
Developer
Posts: 16,612
Registered: ‎07-29-2008
My Device: Z10 LE, Z30, Passport
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
Developer
Posts: 235
Registered: ‎11-12-2008
My Device: Not Specified

Re: Problem on sending email

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