Email Question - Adding multiple email addresses - beginner

I have a form that once submitted will send an email to predetermined users. I am at a point now that I need to send it to multiple users. I can't figure out how I can add an additional user in the TO: field.
I have tried concating :
affectTO = lab.concat(";").concat(manager);system print out of affectTO :
[email protected];[email protected] is what I need(and I know that the emails are not null) but this throws this error:
javax.servlet.ServletException: Illegal semicolon, not in groupand just using '+' doesnt work either
affectTO = lab + manager;I get this error message:
javax.servlet.ServletException: Illegal character in domainSo how can I have multiple email addresses in the TO field?
Any suggestions would be appreciated.
Thanks,
Crystal
oot.user.user userIDs =(oot.user.user)session.getAttribute("userIDs");
            String labID =(String)userIDs.getLabID();
        oot.user.lab.lab labEmail = labDB.labEmailInfo(newID, labID);
            String lab =(String)labEmail.getLabEmail();
            String managerID = (String)userIDs.getManagerID();
        oot.user.manager.manager managerEmail = managerDB.managerEmailInfo(newID, managerID);
            String manager = (String)managerEmail.getManagerEmail();
            //affectTO = lab + manager;
            //affectTO = lab.concat(";").concat(manager);
try {
             if(affectTO != null) {
                sendAffectNotice(smtpServer, affectTO, affectFROM, affectSUBJECT, affectCONTENT);
        } catch (Exception e) {
            throw new ServletException(e.getMessage());
        }

Sample....
public void sendMessage(Vector to, Vector cc, Vector bcc,
    String from, String subject, String body)
    throws Exception {       
        // Create the new message
        MimeMessage msg = new MimeMessage(session);
            // Parse and set the recipient addresses
            if (to != null) {
                Iterator i = to.iterator();
                while(i.hasNext()){
                    String t = (String) i.next();
                    logger.debug("parsing the to address " + t);
                    Address[] toAddresses = InternetAddress.parse(t);
                    msg.addRecipients(Message.RecipientType.TO,toAddresses);
// other code............
            }

Similar Messages

  • I want to use Mac Mail for my work email address, which containts multiple outbound options (i.e. hr@, me@ etc). Is there a way to set up Mac Mail to have an account with multiple outbound addresses rather than adding in multiple accounts?

    I want to use Mac Mail for my work email address, which containts multiple outbound options (i.e. hr@, me@ etc). Is there a way to set up Mac Mail to have an account with multiple outbound addresses rather than adding in multiple accounts?

    This sounds like the age old problem with keychain & Safari. I don't know of a way to solve it without using something like 1Password.
    The iOS app has it's own built in browser, so it has more control over what gets autofilled. Safari on OS X has an 1Password extension that handles account selection & autofill etc.
    Keychain is great in principle, but it quickly falls down when you need tight integration with many ID's & different use cases (work, home etc).
    I'd suggest you submit feedback to Apple about your thoughts. I did so years ago about this issue & this is how far we have come (back to the point where me.com synced passwords) :^)
    http://apple.com/feedback/macosx.html
    Other tools like lastpass or keypassx may also help if you want to truly segregate password storage, but that doesn't fix autofill, the way around that issue is to dedicate one browser for work.

  • HT5312 what about if you have added a rescue email address and verifyed it and the forgot your security question thing still doesnt show because i dont no my security questions ???????????????????????

    what about if you have added a rescue email address and verifyed it and the i forgot my security questions still doesnt show up and i dont no the answers !?!?!?!?!?!?!?! what do i do then because i dont want to phone up !?!?!?! please help !!??!?!?!

    If you have just added an address to your account then it will be an alternate email address - a rescue email address can only be added by answering 2 of your questions. You will need to contact iTunes Support or Apple to get the questions reset.
    e.g. you can try contacting iTunes Support : http://www.apple.com/support/itunes/contact/ - click on Contact iTunes Store Support on the right-hand side of the page, then Account Management , and then 'Forgotten Apple ID security questions'
    or try ringing Apple in your country and ask to talk to the Accounts Security Team : http://support.apple.com/kb/HE57
    When they've been reset you can then use the steps half-way down the page that you posted from to add a rescue email address for potential future use, or you could change to 2-step verification : http://support.apple.com/kb/HT5570

  • How to change security questions after adding a second email address?

    I'm at a loss and really really frustrated with Apple for the first time in my life.
    I've added a second email address and tried over the last 3 days on my iPad and Mac to change my security questions. There is no option present that I can see that allows you to do this without first entering the answers. (to which I don't know anymore)
    I called Apple support (even in english) and every time the call has been dropped.
    In all the years since switching to Apple I've always been impressed with the level of customer service. This is the first time that I've felt this level of sincere frustration.
    I'm not sure why I have to book a time to speak with someone. Updating or changing security questions, should be a process one can do over the internet. I'm confused either way why questions are necessary if the apple password entered was correct. It's not my bank account; why the need for such extreme security just to download an app paid for by an iTunes card!
    Any help or direction would be appreciated!!
    Thank you
    Kate

    Hello there, Kate.
    Apologies for your frustration. For your security the existing questions need to be answered before new ones can be created. The following Knowledge Base article provides some additional steps to try if you are unsure of the answers to the existing ones:
    Apple ID: All about Apple ID security questions
    http://support.apple.com/kb/HT5665
    Specifically:
    What should I do if I don't remember the answers to my Apple ID security questions?
    Try answering them at least once to see if you can get them right, even if you are not sure you remember the answers to your security questions.
    If you are confident you can't remember them, try one of the following:
    If you have three security questions and a rescue email address
    sign in to My Apple ID and select the Password and Security tab to send an email to your rescue email address to reset your security questions and answers. 
    If you have one security question and you know your Apple ID passwordsign in to My Apple ID and select the Password and Security tab to reset your security question.
    If you have one security question, but don't remember your Apple ID password
    contact Apple Support for assistance. Learn more about creating a temporary support PIN to help Apple confirm your identity when you contact Apple Support.
    Note: If you have forgotten your password and answer your security questions incorrectly too many times in a row, you will be unable to try to answer your security questions for a period of time. During that time you will not be able to reset your password and will not have access to your account.
    Thanks for reaching out to Apple Support Communities.
    Cheers,
    Pedro D.

  • Question About using multiple email address w/ IMAP server

    With apple mail in the account settings you can put multiple email address separated by a comma. This allows you to select your from address when sending new mail.
    I have added this to the iphone mail settings but I dod not have the option to select what address I would like to send from. Is there a way to do this.? Thank you.

    No, no chance of specifying a different FROM address unless you use the "Other" shortcut on the iPhone to create the mail account.

  • How do I can my rescue email address? I was asked to answer my security questions, but I forgot the answers and realized my rescue address was outdated. I tried adding alternate email addresses, but my faulty rescue address remained the same.

    I tried to change my rescue address, since it is outdated, and was not receiving any of the emails from Apple to this faulty address regarding resetting my security questions.
    I cannot proceed in regaining full use of my account to make purchases if I do not reset my security questions, and I cannot reset them without receiving such an email, and I have no idea how to change my rescue email. The Apple ID support section of this site was unfortunately unhelpful and led me in circles.
    Please help me to change my rescue email address!
    If it helps, a few months ago I changed my primary account email, and my old primary address is my faulty rescue address now. It is no longer on my list of addresses but continues to show up as my rescue address.
    An additional portion of my question: Is it possible, if I terminate one Apple ID, to move purchases made on that ID, to a new ID? I'm not sure if it's a violation of the terms and conditions if DO NOT keep the purchases on two accounts simultaneously.

    Alternatives for Help Resetting Security Questions and/or Rescue Mail
         1. If you have a valid rescue email address, then use this procedure:
             Rescue email address and how to reset Apple ID security questions.
         2. Fill out and submit this form. Select the topic, Account Security. You must
             have a Rescue Email to use this option.
         3. This is the only option if you do not already have a valid Rescue Email.
             These are telephone numbers for contacting Apple Support in your country.
             Apple ID- Contacting Apple for help with Apple ID account security. Select
             the appropriate country and call. Ask to speak to the Account Security Team.
         4. Account security issues almost always require you to speak directly to an
             Apple representative to securely establish your identity as the account holder.
             You can set it up so that Apple calls you, either immediately or at a time
             convenient to you.
                1. Go to www.apple.com/support.
                2. Choose Contact Support and click Contact Us.
                3. Choose Other Apple ID Topics and choose the appropriate topic for
                    your issue.
                4. Follow the onscreen instructions.
             Note: If you have already forgotten your security questions, then you cannot
             set up a rescue email address in order to reset them. You must set up
             the rescue email address beforehand.
    Your Apple ID: Manage My Apple ID.
                            Apple ID- All about Apple ID security questions.

  • Multiple apple IDs.  Considering adding an icloud email address.

    I've had my apple ID, which is my name, for MANY years.  At some point, I was forced to change my apple ID to an email address.  I changed it to a yahoo.com address, an email address I've had for ages.  Now I have 2 apple IDs.  When I do updates on my computer I often have to log into both because some programs were originally installed with my name only ID, and others later with my yahoo account ID. 
    I've always been confused about Icloud, because I cannot access all of the features because I don't have an @icloud, @mac, or @me email address.  I'm considering adding an icloud email address, but am afraid of what the consequences might be.  I have a completely different email address that I use for all of my regular email.
    Will my name only apple ID change to [email protected]?
    Will the apps that I originally downloaded with the nameonly ID know this? 
    What will happen on my ipad and iphone5? 
    will i need to set up another email account on my iphone so that my pictures will stream to photos?
    Thanks for your help
    Todd.

    You can create an iCloud account using your existing Yahoo.com ID rather than creating a new ID.  (You can use the other one because it has to be in the form of an email address and linked to a verifiable email account.)  To do this you would go to System Preferences>iCloud and sign in with the ID to create the account, then check the data you want to sync with iCloud.  When you check Mail, you will be prompted to create your @icloud.com email address.  This is the email account that goes with your iCloud account, if you wish to use iCloud email.  When you type the name you would like to use for this address, iCloud will search and tell you if it's already taken by someone else, in which case you will have to choose another.  Type carefully, as once created, your @icloud.com address cannot be changed.  Understand that your iCloud account ID will still be your @yahoo.com address.  The @icloud.com address you choose is for email only.
    None of this will effect your existing purchased media using your two Apple IDs.  These will stay the same as purchases are permanently tied to the ID used to purchase them.  Also, Apple will not merge IDs.

  • Need to have multiple email addresses added for a contact

    Looking for a way to add multiple Email addresses for a single contact. Anybody have an idea of how to go about this?

    I would create a new field text long to accommodate for this.

  • HT204053 I have just installed IOS7, having reset the security questions I have been asked for a Rescue Email address. I have entered my primary address, this is not valid. I have added another of my hotmail addresses and the process will not continue. I

    I have just installed IoS7 on my I Phone. Having reset the security questions I have been ask for a Rescue Email address. My primary address is not acceptable, I have tried other addresses put but the process will not forward. I cannot go back, my phone now will not function. The Rescue Email address keeps appearing. Help please.

    Did you check the email account for a verification email from Apple?  You may need to respond by clicking the Verify Now link before the new rescue address will be accepted.

  • Adding multiple email address for same contact to mail group

    Is it possible (in Apple Mail) to add a second email (work) address for a contact to an email group, how?

    Sorry, but Address Book does not allow you to select more than one email address to send to in a group. There's really no reason why people need multiple copies of a message, anyway; they have the option of forwarding email to another email address of theirs.
    Mulder

  • Adding multiple email addresses to same account

    Hello,
    I am trying to add another email address to my exisiting email account (using Mail). I walked through the steps in Mail Help - I entered the addresses in the email field separated by a comma. Example: Steve1@ sbc.com, [email protected]
    I Saved. When I write an email to the new address Steve2 and cc my exisitng address, Steve1. I only receive mail to Steve1.
    Any suggestions would be helpful.
    Thanks.

    After giving up to figure this out and talking with
    a rep who
    could not figure it out, I did create a new account
    in Mail, so
    now I have steve1 and steve2 accounts in the Mail.
    Now it works
    but I am still puzzled as to why I cannot add
    multiple addresses
    to one account, as instructed in Mail Help.
    SBC's term "sub account" must not be an "alias"
    account by definition.
    As previously provided, an alias account/address
    shares the same user name and password as the primary
    account/address.
    If an SBC "sub account" does not share the same user
    name and password as the primary email
    account/address, it must be created as a separate
    email account in Mail.
    The user name for an email account is usually the
    portion of the email address in front of the "@" sign
    only but for some, it is the entire email address.
    This depends on the ISP or email account provider.
    Since you were able to create the "sub account" as
    separate email account in Mail, is the user name for
    the primary account steve1 and the user name for the
    "sub account" steve2?
    Yes. Your comment below clears this up.
    Thank you for the help.
    If so, this "sub account" is definitely not an
    "alias" account and cannot be created in Mail as an
    alias account because it is not an alias.

  • Adding Multiple Email Addresses in one field

    Dear Staff,
    My staff submit progress reports that include two separate fields:
    Their own email address is requested so the staff member could receive a receipt of their progress report
    The email address of the recepient of the progress report requested, as well.  We would like to include multiple email address in that field because often, multiple individuals need to receive the progress report.
    Is there a work-around to including multiple email addresses or is this something you must accomplish on the development side?

    That is unfortunate but I hope this request catalyzes a remedy for this issue in the future.  Thank you for your swift reply, Randy... well-appreciated.  Happy New Year!

  • How to set default email address for contact with multiple addresses.

    Apologies if this has been asked before, it seems a very basic question but I'm unable to find an answer.
    Can a default address be set in Address Book for a contact with multiple addresses? Or if not, which address does it send to "automatically" when this condition exists? I know you can manually select the address you want to use, but what if the contact is added to a group?
    Thanks
    Denis

    Thanks for the reply, buy I have no idea what this means.
    I have the same question. I have a contact that has five email addresses. When I add the person to a group, Mail automatically selects one of the addresses, but not the one I want. I need to go back and manually select the correct address. Can't I select one of these addresses as the default to be used all the time?
    Apologies for not quite understanding the first reply.

  • *Help Needed* Adding multiple emails/mailing list in the email subscription

    Help Needed
    Hi,
    Can someone help me in adding multiple email address/mailing list in the email subscription for interactive reports in Apex 4.
    pls mail me at [email protected]
    Regards,
    Sunny

    The doc does not mention a separator for the email addresses because we only support one email address per subscription. I have logged a task for our next release to look at expanding it and allowing multiple.
    -- Sharon

  • VIP selection will not work on contact with multiple email addresses

    Trying to add more people to my VIP list. When selecting a name that has multiple email addresses, I select the address I want added and selection will not "stick" or accept that contact to VIP list.
    Help?

    Hiya!
     Well first off... I'm baffled that you succeeded in setting up personal email without a data plan.
    You need a data plan to access the BIS network which allows you web browsing (off wifi), email, BBM and the like.
    1). Please thank those who help you by clicking the beside the 'Reply' button.
    2). If your issue has been solved, please resolve it by marking "Accept as Solution" on the correct post!
    3). Remember to have fun! We are all in this together!
    4). Follow me on

Maybe you are looking for

  • Mail version 4.3 (1081/1078) can't be used on Mac OS X Version 10.6.4" Why?

    After installing latest software update, Alert box says: "Mail version 4.3 (1081/1078) can't be used on Mac OS X Version 10.6.4 (Build 10F569) Does any know why or how to fix? Paul

  • Slide advancement?? Not working as expected.

    I imported a PowerPoint presentation, I thought I picked the option to advance on mouse click - it does not seem to be working. I am pretty new at Captivate 5 so I was wondering if there is another way to make this work or some where I can check the

  • What is used in place of skeleton interface?

    So in Java 2 SDK, Standard Edition, v 1.2 the skeleton interface was deprecated - i.e. should not be used since it will eventually be removed. So what on the server side allows for the marshalling and unmarshalling of objects? Is it RemoteObject or R

  • Calendar Invitations Not Showing in "Inbox"

    Hello Everyone, I'm trying to get my iCloud Calendar to work on my iPhone 5 with iOS8.  You'd think this would be pretty straightforward, but apparently not! This worked great when my wife and I were both using Exchange hosted email accounts from our

  • IPhoto library move to external HD | organization

    My laptop is running out of space so I'm moving my large iPhoto library to an external hard drive.  I know how to move the content and adjust iPhoto to route to the new location, but can I do this WITHOUT affecting my organization/events?  I have 200