On OnPremise, Sending email to multiple recipients doesn't work with SendEmail method

Hi,
We are creating a site collection on OnPremise from App by using Sharepoint Client API's (16 version).
After creation of site collection, we are sending an email to all site collection administrators. But we found that email is being sent to the only first person mentioned in the "To" list. For sending email we are using following method "Microsoft.SharePoint.Client.Utilities.Utility.SendEmail()".
We tried different scenarios by passing alternately domain username and email address.
Here are the findings for the different scenarios for the "To" field:
1) "domain\user1; domain\user1" => sends email to first user
2) "[email protected]; [email protected]" => sends email to both emails (at least shows in inbox To field, two occurances of email)
3) "domain\user1; domain\user2" => sends email to first user
4) "[email protected]; [email protected]" => sends email to first user
Here is the code we are using:
                EmailProperties properties = new EmailProperties();
                properties.To = to.ToList();
                if (cc != null)
                    properties.CC = cc;
                properties.Subject = subject;
                properties.Body = body;
                Utility.SendEmail(context, properties);
                context.ExecuteQuery();
Please let us know what is going wrong here.
Thanks in advance for your valuable inputs.
Br,
Shriram
Shri07

According to the R16 Admin preview guide;-
"Send Email to Multiple Recipients
Expression Builder is now linked to the email address text field that is presented when the Specific Email Address
option is selected. Workflow administrators can enter multiple email addresses directly, or click the "fx" icon
beside the field, and use Expression Builder to define expressions that evaluate to one or more email addresses.
The benefit of this feature is that emails can be stored on any text field in the base record and multiple emails can
be sent using one workflow action. "
But how that works exactly is not clear, I have tried commas, semi-colons, spaces, apostrophes, doublequotes, to separate and try to establish the correct syntax without luck.
Bob - Perhaps you can do some digging and find out the correct syntax for multiple addresses?

Similar Messages

  • Question regarding sending email to multiple recipients

    Hi All,
    I am creating a workflow that will send an email notification everytime a new campaign is created. I've learned that R16 is capable of sending emails to multiple recipients, the only concern I have is I can't find any doumentation on how to do it. It is stated in the R16 Administrator Preview Guide that you can select 'Specific Email Address' and enter multiple email addresses directly, I tried to enter multiple email addresses separated by comma - [email protected],[email protected],[email protected] as an example, but it doesn't work and prompts me to enter a valid email address. Could anybody guide me on how to enter multiple email addresses once the 'Specific Email Address' is selected or how to do it in the expression builder to define the expression that will define the list of emails. I know that using group email addresses can be used as an alternative to this requirement but I hope theirs a way to do this with workflows.
    Thanks,
    Wayne

    According to the R16 Admin preview guide;-
    "Send Email to Multiple Recipients
    Expression Builder is now linked to the email address text field that is presented when the Specific Email Address
    option is selected. Workflow administrators can enter multiple email addresses directly, or click the "fx" icon
    beside the field, and use Expression Builder to define expressions that evaluate to one or more email addresses.
    The benefit of this feature is that emails can be stored on any text field in the base record and multiple emails can
    be sent using one workflow action. "
    But how that works exactly is not clear, I have tried commas, semi-colons, spaces, apostrophes, doublequotes, to separate and try to establish the correct syntax without luck.
    Bob - Perhaps you can do some digging and find out the correct syntax for multiple addresses?

  • Can't send emails to multiple recipients any more?

    Yesterday I had to send an email to some 30 other people (I only do this occasionally).
    It refused to go and I received this error message:-
    I have several email accounts but each one was the same.
    At that time I could not even send single emails but incoming emails were unaffected.
    Later in the day I received this email from my ISP mail account.
    Your emails may be blocked – please confirm your alternate BT Yahoo! Mail addresses
    Dear Customer,
    You’ve received a ‘553’ error message because we’ve upgraded your BT Yahoo! Mail account security to help protect against ‘spoofing’ – when people use alternate email addresses to disguise the real sender, possibly to commit fraud.
    What you need to do
    We need you to take a few minutes to confirm each of the BT Yahoo! Mail alternate email addresses you use are genuine. If you don’t, you might get more ‘553’ error messages and have problems sending emails. Just log in and follow these simple steps. We don’t ask for any personal information.
    This is rubbish and I had a similar one last year which I ignored, as the simple steps were far from simple, and the following morning all was back to normal.
    So I ignored this email and tried again this morning.
    I was still unable to send emails to multiple recipients but now I can send single emails OK!
    Any ideas what is going on?
    Is it Mail's fault or my ISP's?

    From the error message, it looks like there was a problem with at least one of the addresses ("NONE"). It is possible that a bad address is in the list you tried to send to.
    I don't know anything about BT Internet, so I can't confirm the authenticity of the email you received.
    You should be able to log into your BT account directly from the web without using any links sent in the email.
    The email also seems to indicate you used an alias as the reply-to (from) email address.
    You didn't mask out the username for your smtp server and it is definitely different from the from account. This may all be normal, but it does tend to match what the email is telling you.

  • Error while sending email to Multiple Recipients

    Hi,
    I am trying to send email to multiple recipients .It works fine if all the email-addresses are valid. If even one is invalid throws exception .I wish to send it all the valid addresses even if some are invalid as this email will be going to 3000 users some of them will be wrong addresses.
    Help is greatly appreciated.
    -ksg
    Exception thrown:
    Exception in SendEmail.setAddress as :javax.mail.SendFailedException: Invalid Addresses;
    nested exception is:
    javax.mail.SendFailedException: 550 <[email protected]>... User unknown
    Here is the main piece of code:
    message.saveChanges();
    Transport transport = session.getTransport("smtp");
    transport.connect("myhost", "", "");
    transport.sendMessage(message, message.getAllRecipients());
    transport.close();

    Hi there,
    Well I find the easiest way is to use a comma delimited string with the following bit of code.
    msg.setRecipients(
    addrType,
    InternetAddress.parse(smtpAddress, false));
    addrType will be TO,CC or BCC
    smtpAddress is a comma delimited string that I get from the results of a SQL Select request (looks something like "[email protected],[email protected],....,....,...."
    The boolean false is to prevent the parse checking the validity of the SMTP addresses as I prefer to deal with this by letting the SMTP server tell me which addresses are no good.
    Hope this helps,
    SH

  • How to send email to multiple recipients??

    Hello Experts,
    I got a requirement to send email to multiple recipients. How to approach it as am fairly new to Workflow??
    Thanks & Regards,
    Mohammed.

    Hi,
      Do you only want to send mail using workflow or there any other steps. Then you can directly write the code
    Search in scn you will find lot of post for that
    http://scn.sap.com/thread/3256691

  • Action to send email for multiple recipients

    Hi gurus,
    Currently the user needs to send a email for multiples recipients according to the organization structure.
    For example:
    The user generates a complaint and the systems must notify by email the department responsible to solve this complaint, sending an email for all employees assigned into this organizational unit.
    How should I configure the action to send an email for the whole departament?
    Best Regards,
    Gabriel Santana

    HI Gabriel,
    Get the email ID's of all the recipents from orgunit using FMs <b>RH_STRUC_GET</b> and <b>BAPI_BUPA_ADDRESS_GETDETAIL</b> into internal table <b>et_mailid</b> and then using FM <b>SO_NEW_DOCUMENT_ATT_SEND_API1</b>.
    For reference check the code below:
    <b>*i_message has contents of mail body</b>
    DATA:    g_sent_all(1) TYPE c,
             g_doc_data LIKE sodocchgi1,
      DATA:  i_message      LIKE solisti1   OCCURS 0 WITH HEADER LINE,
             i_packing_list LIKE sopcklsti1 OCCURS 0 WITH HEADER LINE,
             i_receivers    LIKE somlreci1  OCCURS 0 WITH HEADER LINE.
    Fill the document data.
        g_doc_data-doc_size = 1.
    Populate the subject/generic message attributes
        g_doc_data-obj_langu = sy-langu.
        g_doc_data-obj_name  = 'SAPRPT'.
        CONCATENATE g_sdltime0(2) ':' g_sdltime2(2) ':' g_sdltime+4(2) INTO g_time.
        CONCATENATE c_subject g_time INTO g_doc_data-obj_descr SEPARATED BY space.
        g_doc_data-sensitivty = 'F'.
    Describe the body of the message
    Information about structure of data tables
        CLEAR i_packing_list.
        REFRESH i_packing_list.
        i_packing_list-transf_bin = space.
        i_packing_list-head_start = 1.
        i_packing_list-head_num = 0.
        i_packing_list-body_start = 1.
        DESCRIBE TABLE i_message LINES i_packing_list-body_num.
        i_packing_list-doc_type = 'RAW'.
        APPEND i_packing_list.
    Add the recipients email address
        LOOP AT et_mailid.
          CLEAR i_receivers.
          i_receivers-receiver = et_mailid-email_id.
          i_receivers-rec_type = 'U'.
          i_receivers-com_type   = 'INT'.
          i_receivers-notif_del  = 'X'.
          i_receivers-notif_ndel = 'X'.
          APPEND i_receivers.
        ENDLOOP.
    Call the FM to post the message to SAPMAIL
        CALL FUNCTION 'SO_NEW_DOCUMENT_ATT_SEND_API1'
          EXPORTING
            document_data              = g_doc_data
            put_in_outbox              = 'X'
            commit_work                = 'X'
          IMPORTING
            sent_to_all                = g_sent_all
          TABLES
            packing_list               = i_packing_list
            contents_txt               = i_message
            receivers                  = i_receivers
          EXCEPTIONS
            too_many_receivers         = 1
            document_not_sent          = 2
            document_type_not_exist    = 3
            operation_no_authorization = 4
            parameter_error            = 5
            x_error                    = 6
            enqueue_error              = 7
            OTHERS                     = 8.
    Regards,
    Amit
    *Always reward points for helpful answers
    Message was edited by:
            Amit Kumar

  • Send email to multiple recipients

    Hello,
    Does anybody know what the syntax is for sending email to multiple email addresses? Should the email addresses be separated by commas or semi-colons? I can't seem to find an example anywhere and what I've tried doesn't seem to be working, because when I flushed my mail queue, nothing sent out. I know it works with only one address.
    HTMLDB_MAIL.SEND(
    P_TO =>
    Thanks,
    Nora

    Hi nora
    to put multiple address you needs to put a comma between addresses .
    quote from htmldb documentation :
    "Valid e-mail address to which the e-mail will be sent (required).
    For multiple e-mail addresses, use a comma separated list."
    hope that help
    Zvika

  • Unable to send emails to multiple recipients through oracle storedprocedure

    I have the email code working with single email in the To address but I am looping through the table and getting a semicolon separated emails and assining to_mail and I am unabl to send any emails to any users in To address but works for cc_address users. I am getting the following error in the stored procedure when compiling. Please help if any suggestions or any one came accross this issue. Thanks.
    ORA-29279: SMTP permanent error: 501 #5.1.1 bad address @abc.com
    ORA-06512: at "SYS.UTL_SMTP", line 29
    ORA-06512: at "SYS.UTL_SMTP", line 110
    ORA-06512: at "SYS.UTL_SMTP", line 252
    ORA-06512: at "abc_owner.SendMail", line 101
    ORA-06512: at line 10

    900045 wrote:
    I have the email code working with single email in the To address but I am looping through the table and getting a semicolon separated emails and assining to_mail and I am unabl to send any emails to any users in To address but works for cc_address users. I am getting the following error in the stored procedure when compiling. Please help if any suggestions or any one came accross this issue. Thanks.
    ORA-29279: SMTP permanent error: 501 #5.1.1 bad address @abc.com
    ORA-06512: at "SYS.UTL_SMTP", line 29
    ORA-06512: at "SYS.UTL_SMTP", line 110
    ORA-06512: at "SYS.UTL_SMTP", line 252
    ORA-06512: at "abc_owner.SendMail", line 101
    ORA-06512: at line 10when all else fails, Read The Fine Manual
    http://docs.oracle.com/cd/E11882_01/appdev.112/e25788/u_smtp.htm#i1002798
    RCPT Function
    This subprogram specifies the recipient of an e-mail message.
    "To send a message to multiple recipients, call this routine multiple times. "
    "Each invocation schedules delivery to a single e-mail address."

  • Mac Lion, how do I send emails to multiple recipients?

    Just upgraded to Lion OS and whilst I like the new email interface, darned if I could get address book to enter multiple recipents without producing a seperate email for each one. Any ideas?

    Yes, I have groups in my old address book which have gone over OK to the new one in Lion but I don't need to send to all of the group!  I used to be able to keep adding names from various groups to make up my required recipients but darned if I have found how I can do it yet in Lion!

  • Error message with a script sending emails to multiple recipients.

    Hi all,
    I am very new with powershell scripting and I want to request your attention and help on this issue.
    I am getting this error message "Send-MailMessage: An invalid character was found in the mail header: ','" given by this script:
    Param (
    [string]$Path = "C:\Temp\",
    [string]$SMTPServer = "smtp.domain1.com",
    [string]$From = "[email protected]",
    [string[]]$To = "[email protected],[email protected]",
    [string]$Subject = "New backup file"
    $SMTPMessage = @{
    To = $To
    From = $From
    Subject = "$Subject at $Path"
    Smtpserver = $SMTPServer
    $File = Get-ChildItem $Path | Where { $_.LastWriteTime -ge [datetime]::Now.AddHours(-6) }
    If ($File)
    { $SMTPBody = "`nThe following files have recently been added/changed:`n`n"
    $File | ForEach { $SMTPBody += "$($_.FullName)`n" }
    Send-MailMessage @SMTPMessage -Body $SMTPBody
    I found the ForEach() approach but when I put it inside I get an infinite loop.
    Many thanks for any suggestions

    [string[]]$To = "[email protected],[email protected]",
    should be
    [string[]]$To = @("[email protected]","[email protected]")

  • Trying to send email to multiple recipients but not going through. HELP!!

    When I send via gmail I get an email back saying one or more failed.What is happening with the iPhone?

    The phone is not responsible for the failure. Somewhere in the message you got back, it should detail the REASON that it failed.

  • I can't send email containing pictures from iPhoto on my computer since using iCloud. with iCloud.  How can I send them now that iCloud doesn't work with iPhoto?

    I can't email pictures on my computer from my iphoto since using icloud.

    Try www.apple.com/support/ and then put /icloud /iphoto /mail and tech articles in those, and links to their respective Community Discussion.
    Mail support has a wizard to test your settings too.
    Not sure what error or why you can't, maybe iCloud forum has better chance.

  • How to use Add_Delivery_Option to send an email to multiple recipients

    I have the following code before i submit a concurrent request:
    B_Delivery_Success := Fnd_Request.Add_Delivery_Option(
    'E',                    -- EMAIL
    'Enter subject', -- SUBJECT
    '[email protected]',          -- FROM
    '[email protected]'          -- TO
    ,NULL               -- CC
    which correctly sends an email with attachment. However i need to send the email to multiple recipients. How can you enter multiple names against the 'TO' parameter. I know that i can repeat this again and again with a different email address each time, however there must be away to use this code once with multiple addresses?
    Edited by: user974582 on 09-Oct-2012 01:23

    Not sure about the API but there are other ways to achieve it i.e. through alerts.. You can refer below
    Can Concurrent Request Notifications Work With A Group Email ID [ID 1096850.1]
    Cheers,
    ND

  • TS3899 If I send an email to multiple recipients, I cannot open the individual replies on iphone

    If I send an email to multiple recipients, I cannot open the individual replies. I can see there are a few replies but have to go to webmail to see them.
    Any ideas anyone?

    ...and even email addresses can be hidden by sending to each recipient using your mail client's "bcc" or "blind copy" field instead of the "to" field.

  • Sending email to multiple address using Utl_Smtp

    Hi,
    I want to send email to multiple address using the Utl_Smtp feature.
    When I am sending email to one email address in the To:Field it works fine.However, when I send
    to multiple address I am getting the below error.I am using a table(Email_test) to store all email id.
    Error report:
    ORA-29279: SMTP permanent error: 501 5.1.3 Invalid address
    ORA-06512: at "SYS.UTL_SMTP", line 20
    ORA-06512: at "SYS.UTL_SMTP", line 98
    ORA-06512: at "SYS.UTL_SMTP", line 240
    ORA-06512: at line 48
    29279. 00000 - "SMTP permanent error: %s"
    *Cause:    A SMTP permanent error occurred.
    *Action:   Correct the error and retry the SMTP operation.
    I am trying two options both ways I am getting error
    Option 1:
    Selecting two email id indivually in the select query as below
    select email into v_Recipient1 from Email_test where Key_name='U1';
    select email into v_Recipient2 from Email_test where Key_name='U2';
    v_Recipient := v_Recipient1||';'||v_Recipient2;
    Option 2:
    Is there a way to use option
    select email into v_Recipient1 from Email_test where Key_name='U4';
    ===========================================================
    Create table Script
    ===========================================================
    create table Email_test (Email varchar2(100),Key_name varchar2(10));
    insert into Email_test values ('[email protected]','U1');
    insert into Email_test values ('[email protected]','U2');
    insert into Email_test values ('[email protected]','U3')
    insert into Email_test values ('[email protected];[email protected];[email protected]','U4');
    select * from Email_test
    [email protected]                         U1
    [email protected]                         U2
    [email protected]                         U3
    [email protected];[email protected];[email protected]     U4
    select * from Email_test where Key_name in ('U1','U2','U3')
    [email protected]     U1
    [email protected]     U2
    [email protected]     U3
    select * from Email_test where Key_name='U4'
    [email protected];[email protected];[email protected]
    =======================================================
    PL/SQL Block
    ===========================================================
    declare
    v_From VARCHAR2(80) := '[email protected]';
    v_cc VARCHAR2(80);
    v_Recipient VARCHAR2(80) ;
    v_Recipient1 VARCHAR2(80) ;
    v_Recipient2 VARCHAR2(80) ;
    v_Subject VARCHAR2(80);
    v_Mail_Host VARCHAR2(50);
    v_Mail_Conn utl_smtp.Connection;
    crlf VARCHAR2(2) := chr(13)||chr(10);
    begin
    --Mail Host name
    select VALUE into v_Mail_Host from Server_info where server_name = 'SMTPServer';
    select email into v_Recipient1 from Email_test where Key_name='U1';
    select email into v_Recipient2 from Email_test where Key_name='U2';
    v_Recipient := v_Recipient1||';'||v_Recipient2;
    --for CC
    select email into v_cc from Email_test where Key_name='U3';
    v_Mail_Conn := utl_smtp.Open_Connection(v_Mail_Host, 25);
    utl_smtp.Helo(v_Mail_Conn, v_Mail_Host);
    utl_smtp.Mail(v_Mail_Conn, v_From);
    utl_smtp.Rcpt(v_Mail_Conn, v_Recipient);
    utl_smtp.Rcpt(v_Mail_Conn, v_cc); -- To CC recepient
    utl_smtp.Rcpt(v_Mail_Conn, v_BCC); To BCC recepient
    utl_smtp.Data(v_Mail_Conn,
    'Date: ' || to_char(sysdate, 'Dy, DD Mon YYYY hh24:mi:ss') || crlf ||
    'From: ' || v_From || crlf ||
    'Subject: '|| v_Subject || crlf ||
    'To: ' || v_Recipient || crlf ||
    'Cc: ' || v_cc || crlf ||
    'Content-Type: text/html;' ||crlf ||
    --'Hello this is a test email');
    crlf || to_char(sysdate, 'Dy, DD Mon YYYY hh24:mi:ss') || crlf );
    utl_smtp.Quit(v_mail_conn);
    end;
    Any suggestion how to approach this issue.
    Thank you

    Simple Mail Transfer Protocol RFC 5321 specifications.
          RCPT TO:<forward-path> [ SP <rcpt-parameters> ] <CRLF>
       The first or only argument to this command includes a forward-path
       (normally a mailbox and domain, always surrounded by "&gt;" and "&lt;"
       brackets) identifying one recipient.In other words, you can only define a SINGLE mailbox address at a time. Multiple addresses requires multiple repeats of this command verb, once per maibox.
    Do not confuse this and the To: tag line in the Mime header that contains a comma delimited list of recipients. That tag line can contain anything - it is not parsed, not checked, and not verified as matching the actual recipient mailboxes as specified via the RCPT TO verb.

Maybe you are looking for

  • Dynamic file naming for 820 outbound transaction

    Hi All, We have a requirement to set the file name of outbound 820 based on few fields of xml payload from the backend BPEL process. We are currently implementing batching by sending the action name in (jca.jms.JMSProperty.ACTION_NAME) property.We ar

  • Looking for transaction code in MM to display Business Area, PO, AO,& Values

    Hello everyone, I am looking for a Transaction Code that will display Business Area, Outline Agreement, Purchase Order and Values. Can anyone recommend? Ananh

  • Can a keyboard shortcut be applied to a palette button?

    Specifically, I would like to be able to be able to highlight some numbers (like 3/8) and use a keyboard shortcut to turn them into a true fraction.  The button is the fractions button in the Open Type palette.  The shortcut could be CONTROL-f, or so

  • Swf-fla question

    i made a fla a while back with a little animated navigational aid, which because my scripting skills are so poor, was quite tedious to program. now i need to edit it but i've lost the fla. can flash convert the swf back into a fla? any suggestions? t

  • Remeber login data doesn't work

    Video of this problem: http://www.youtube.com/watch?v=xRjQ4KdxM1w Problem as following: when I start Ovi Suite it ask for my Ovi account (with I have) so I login using my login data and select remeber. I quit Ovi Suite and start it again: first this