Choice of one account to send emails from

Hello world. I tried to find a way allow a user to select the account they wish to send. I managed to make a dialog screen that allows the selection of the user an email address of a contact if they have multiple addresses for the recipient and want to do the same thing to address. I came across this piece of code on the forum.

Public Store getStore (String regEmail)
{
Full book sb = ServiceBook.getSB ();
SRS [] ServiceRecord = sb.getRecords ();
for (cnt int = srs.length - 1; cnt > = 0; cnt-) {}
If (srs [cnt] .getCid () .equals ("CMIME')) {}
ServiceConfiguration sc = new ServiceConfiguration (srs [cnt]);
If (SC. GetEmailAddress(). Equals (regEmail))
{
Store is Session.getInstance (sc) .getStore ();.
store return;
}
}
}
Return Session.getDefaultInstance () .getStore ();
}

What should I do for this code to get all the e-mail addresses of the unit and display them? I guess I do. getEmailAddress() for each srs [] element is that correct?

Stone as always you have been a great help. I had to work very quickly with your code snippet.

I added this to the constructor of the screen:

String [] fromAddresses = getOurEmailAddresses();

Dialog dlg = new dialogue ("Select which address to use.",)

fromAddresses, null, 0.

Bitmap.getPredefinedBitmap (Bitmap.QUESTION));

int selectedAddr = dlg.doModal ();

String selectedEmail = fromAddresses [selectedAddr];

from.setText (selectedEmail);

Thank you once again.

Tags: BlackBerry Developers

Similar Questions

  • 7520 photosmart e-ALL-IN-ONE seems to send emails from scan successfully, but does not work

    The scanner scans and appears to send the email successfully, confirms indeed e-mail was sent but can't

    Hello Annser,

    Welcome to the HP Support forums.  I understand that when you have used the scanning to E-mail feature of your printer Photosmart 7520 enamel never happened.

    For a real-time server update, please call the HP Cloud Services at 1-855-785-2777 if you live in the USA/Canada region. If you do not live the USA/Canada region, please click here to find the number of Technical Support for your country/region.

  • Cannot send emails from lineone account Messaging on the iphone 6 s

    Cannot send emails from iphone6s to my e-mail account Lineone, although as the settings of care as recommend it

    What happens when you try to send an e-mail? You see a mistake? If Yes, what is the exact text of the error? Sending a message is processed by the SMTP server. You may need to verify that all the settings for the SMTP server are correct, depending on your provider, including the user name, password and any SSL or port settings.

  • Why can't I send email from one of my addresses to another one of my friends, in Outlook Express 6 on explorerer?

    Why can't I send email from one of my addresses to another one of my friends, in Outlook Express 6 on explorerer?

    AF

    What happens when you try?  There is nothing inherent in OE that will let you send messages to yourself.

    Steve

  • My hotmail account has suddenly started to send email from spam to my contacts. I am even not connected at the time

    original title: virus hotmail

    My hotmail account has suddenly started to send email from spam to my contacts.  I am even not connected at the time

    What to do if your Hotmail account is hacked or Hijacked

    http://social.technet.Microsoft.com/wiki/contents/articles/what-to-do-if-your-Hotmail-account-is-hacked-or-hijacked.aspx

  • Windows Live sends email from my other two accounts.

    I have just set up today.  I can send emails from my live.com address, but the other two addresses does not send.  I checked out and they're correct server addresses.  The error message is 'Server email address rejected '.  But the address is good and receiving the e-mail from other sources.

    You're in Hawaii and are connected to the Internet via RoadRunner? If not, it's why you get this error. Right-click on the account name in the folders pane, and then select Properties.

    • Under the servers tab, make sure that my server requires authentication is selected.
    • On the Advanced tab, make sure that the outgoing mail port is 587

    Click work offline, and then empty the Outbox (below the records of account in the folders pane). Compose a new message to test and send it to yourself. Post a new message in your response.

  • After updateing the latest version of Windows I can no longer send email from my hotmail account WHY?

    I have Windows Vista, I had to create a GMAIL account to send emails to both Hotmail/Gmail accounts.

    Hello

    · You receive an error message or error code when you send emails?

    The question you have posted is related to Windows Live, and would be better suited in the Windows Live forum. Please visit the link below to find a community that will provide the support you want. http://windowslivehelp.com/

  • Cannot send emails from gmail or yahoo when connected to the vpn

    I use a vpn to hide my IP address. When I am connected via my VPN I can't send emails from my gmail or yahoo accounts in thunderbird
    If I disconect vpn, they go through the fine

    Thanks for the suggestion, I've changed the security of connection for STARTTLS
    and they work

  • I can't send emails from my firefox browser. I can receive but can't send them. I used to be able too and now it has stopped working.

    When I first installed firefox there are about 1 1/2 years my email worked fine. It has now stopped working about 3 weeks ago. I can send emails, but I can't send them or respond to them.

    I started having this problem yesterday (19/06/13). I can't send any email from my Hotmail using Firefox email account. (I can send email from my Yahoo email account well.) I get the email fine.
    Use of IE, I am able to send the email to my Hotmail and Yahoo accounts.

  • Cannot send email from my iCloud because my IP address is blocked (?)

    Cannot send emails from my iCloud account because my IP address is currently blocked (?) This was written in the return message. Can someone help me?

    Why is my IP blocked address - http://www.clickhost.com/why-is-my-ip-blocked/ and have a look here too - http://whatismyipaddress.com/blacklist-check

  • Woman cannot send emails from his iPhone.

    Original title: since my wife updated Microsoft Hotmail security settings using my account as a substitute last month that she cannot send emails from his iphone

    My email address is * address email is removed from the privacy * and his is * address email is removed from the privacy * is a timing issue with the iphone, we were on the helpdesk of Telus and Aplle helpline unsuccessfully to Ant and now she received another email to update its security setting again? pls help?

    Try asking in the Hotmail/Outlook.Com forum:
    http://answers.Microsoft.com/en-us/outlook_com

  • Error: "some errors have occurred during the processing of requested tasks". Sending emails from Outlook Express

    Original title: Repetitivet sending emails from Outlook Express

    When sending emails from my Outlook Express , the following occurs:

    (1) as usual, send the message falls into my Outbox and begins to be sent.

    (2) when the message was sent, I get a message that "some errors occurred while processing requested tasks" but no actual errors are displayed.

    (3) the sent items folder does not show that a message has been sent... but a message has been sent.

    (4) the original message remains in my Outbox and will be sent over and over again.

    As you can imagine, it's a very embarrassing problem.  All suggestions are welcome, but please keep the instructions clear and simple.

    Ed *.

    Hello

    Windows XP Service Pack 2 is installed on your computer? To work on this question, see these steps.

    It seems that there is a corruption of dbx file.

    I suggest you go over your messages out of the Inbox, and then create new folders Outbox and sent items after you move the messages you want to save to a local folder that you create.

    Reference:

    (a) click onTools

    (b) thenOptions

    (c) selectMaintenance

    (d) Record Store will reveal the location of your Outlook Express files.

    (e) Note the location and navigate on it in Explorer Windows or, copy and paste to start and select run.

    In Windows XP, Win2K & Win2K3 the OE user files (DBX and WAB) are by default marked as hidden.

    To view these files in Windows Explorer, you must enable Show hidden files and folders

    Reference:

    (a) clickStart

    (b) Control Panel

    (c) Folder Options icon

    (d) notice, or in Windows Explorer

    (e) Tools

    (f) the Folder Options

    ( viewof g).

    With Outlook Express closed, find the DBX files for the items in the Outbox and sent and delete them. New ones will be created automatically when you open Outlook Express.

    After you're done, followed by compacting your folders manually while working * off * and do it often.

    Reference:

    (a) clickOutlook Express at the top of the the folder tree so no folders are open.

    (b) click onthe file

    (c) work offline (or double click working online in the status bar).

    (d) file

    (e) file

    (f) compact all folders. Wait for the compaction to complete.

    General precautions for Outlook Express:

    Do not archive mail in the receipt or sent items box. Create your own user-defined folders and move messages you want to put in them. Empty the deleted items folder daily. Although the dbx files have a theoretical capacity of 2 GB, I recommend about a300 MB max for less risk of corruption.

    Information on the maximum size of the .dbx files that are used by Outlook Express:
    http://support.Microsoft.com/?kbid=903095

    Compact often as specified above.

    Reference:

    (a) in the Tools

    (b) selectOptions

    (c) maintenance:

    (d) uncheck Compact messages in the background and leave it unchecked. (N/a if running XP/SP2).

    And backup often.

    See also: error messages when you send and receive in Outlook and Outlook Express http://support.microsoft.com/kb/813514

    An Outlook Express basic repair kit

    http://support.Microsoft.com/kb/2398839

    Hope the information is useful.

  • Cannot send email from OE6

    Since yesterday I couldn't send emails from OE6 (can receive without problem) the error message is

    An unknown error has occurred. ' Subject 'Thank you!', account: 'pop3.hosts.co.uk', server: 'smtp.namesco.net', Protocol: SMTP, server response: ' 550 we do not accept spam ', Port: 25, secure (SSL): no, Server error: 550, error number: 0x800CCC69.

    ISP says it's a microsoft issue that isn't a help a lot to me right now!  Any advice appreciated greately.

    Thank you

    Rosie

    Thanks Steve - now all of a sudden, he started to work very well - typical!  (It was off since yesterday morning) So I don't really know what the problem was. But thanks for the link: this could be very useful in the future.  I checked my smtp server and it showed as "guests".  I send them again once say that I thought it must be a problem at the server end, as the error message says the server thought I was spam!  And Yes, I use webmail ok.

  • Cannot send email from Windows Mail (AOL)

    HI - all of a sudden I can't send emails from my AOL account to Windows Mail.  Was working fine all day and then, in the last 20 minutes, I tried sending 3 emails and they just stay in my Outbox.  It looks like all my settings on tools/properties etc are correct.  And when I press "Send/receive" 3 unsent mails are reported to the top with a message "not connected".

    any advice on how to solve this very appreciated also urgently need send emails.  I can't send them when I try to do it from my site Ouah.com either.

    Thank you!

    Here is the link to the AOL settings in Windows Mail. He said that Outlook Express, but that's OK. The OE and WM using the same settings.
    Compare line-by-line settings with instructions, see if there is a difference.

    http://postmaster.info.AOL.com/IMAP/Express.html

    t-4-2

  • I'm unable to send emails from my hotmail account__

    I'm unable to send emails from my hotmail account. No error message appears

    Please can someone help me

    ·                        Hotmail forums:

    http://www.windowslivehelp.com/forums.aspx?ProductID=1

    They will help you when repost you your question in the Forums above for Hotmail.

    See you soon.

    Mick Murphy - Microsoft partner

Maybe you are looking for

  • When the mouse is flown over link, url is not always the real url

    I use version 4.0.I noticed that the url shown when you hover over a link isn't always the real url, it's annoying because I want to see when I think of going before I go. I don't want the real destination is hidden. Is there an easy way to see the t

  • IPhone 6 more will be not - care recognized

    My battery died yesterday, I plugged it in the same cable that I have every night, and 8 hours later, he was not charged.  I have reset (home button and lock at the same time).  The device displays the icon and then in about 1 minute vibrates twice a

  • Problem installing SP2 - 0xc0190036 error code

    I know this question has been posted before, but not for a while, hoping so it could be a new reflexion autour? I DO NOT have a Vista dvd/cd so please do not suggest I reinstall. I have a HP Pavilion dv6 Notebook 32-bit AMD Athlon X 2 Dual-Core QL-65

  • Play with graphics 3D - LV 7.1

    Dear readers, I tried to create some around a volume in a 3-d surface chart, but I wasn't able to finish it... It is a 'square 8 -'... I don't know what to call it. If you look at the vi or the image in the attachment, I think it will be clear. I had

  • No speaker sound, news, still no sound

    Hello, all. I have a Dell Inspiron with Windows Vista. Works very well. But this morning my speakers grilled. I want to say really burned, smoked and quit smoking. I therefore had no sound, of course. Bought new speakers, but still no sound! Check th