Sending  mail to  Multiple User

Hello Everybody ,
I have Developed one Workflow for Material Creation ,
Now the Problem is that After Creation of material By End User the mail  should to 3-4 User  for Display the Material.
So how can we Maintain 3-4 user name in Workflow ..........?
For one User  it's working Fine but I want that mail should  goes to  Multiple User .
ASAP.
Regrads,
Sandeep

Hi Krishna
I completed the send   mail to Multiple User ,
Here my three user  can see the  Material in his work item  .
But when one user exeuted his  work item .
othe user work item is automatically deleted ....................?  that should nt happened ?
Actually My requriement is that   When  End User ( A1   )is created  material  ....
After the creation of Material Worklfow should triggerd ...........
After Creation of Material   Can be View by 3 Higher Level  Person of Different Department    i.e ( FI  ,  SD  , PP  ) 
A1 ( Created By End User )  -
>    A2  ,  A3 ,   A4  ( This Person Can view Material  in their  Respective  Inbox  Work Item )
My Prb is that Work Item goes to (   A2 , A3 ,  A4  )  But anyone of this one executed his Work Item  .........then other two person Work Item is automatically Deleted ...........and this should nt happened...........
I want that each and every person can view the Material in Display Mode at any time  and any Sequence ....Please help me Friend .............
I  have done lot's of R/D  but didn't got any solution ...
Regrads,
Sandeep Jadhav

Similar Messages

  • Send Mails to Multiple Users

    Hi,
    I have a requirement where I need to send mail to multiple users, for this I was following below link
    Re: Email to Multiple Email Address through WF
    Followed the above link and created 2 users with Notification Preference as MAILHTML and added to a role having email id as NULL and Notification Preference as MAILHTML . But I am not able to send mails rather it is going as notifications to the user Worklist.
    Please help me to resolve this issue.
    Regards,
    Prateek

    Hi, Andy,
    Use the Oracle-supplied package utl_mail for sending email messages:
    http://docs.oracle.com/cd/B28359_01/appdev.111/b28419/u_mail.htm#i1001258
    It would be easier if you did not use dbms_output, or, if you really wanted to, do not call it directly. Write your own procedure (let's call it add_to_message) that concatenates a string to the end of a message that will ultimately be sent as an email. If you want to display the string using dbms_ouptut.put line as well as append it to the message, then call dbms_ouptut.put line inside add_to_message.
    If you really must get the text from dbms_output, use dbms_output.get_line (or get_lines)
    http://docs.oracle.com/cd/B28359_01/appdev.111/b28419/d_output.htm#i999346

  • Send mail to multiple users in outlook through workflow

    Hello Experts,
    I have a requirement where I have to fetch all the email ID (abc@companycom) under support team in an org unit and send mail to these multiple email ids when a support message ticket is created in transaction CRMD_ORDER.The BO for this is bus2000116.Now I have created a ZBO with supertype as bus2000116 and a custom method where I am fetching the email Ids.I have also created an EXPORT MULTILINE parameter (EMAIL_ID) for this method of type ADR6-SMTP_ADDR.I have tested this ZBO and it is correctly fetching all the email ID in this parameter.
    Now in my workflow builder,I have created a Activity type and here I have created a custom task calling my ZBO and custom method of fetching email id.I have also created a container(EMAIL_ID) for this task of type ADR6-SMTP_ADDR.Here I have binded the task(fetch email step) to workflow.In the Agents I have given &&EMAIL_ID&& in expression as this is the container.
    After this step I have added the mail step and in the reciepient type I have given G organizational object and expression as &EMAIL_ID&.Here I have added a standard task(TS45308726) with BOR as (SELFITEM and method as SENDTASKDESCRIPTION)for sending mail to these multiple ids to outlook.
    I have activated the builder and tested it.In the log I can see,the event has been triggerred,workflow is started,but workflow status is set to error.The step fetch mail is getting executed correcttly with 4 email ids in the container.and the third step send mail is also failed.giving error as "Work item 000000066700: Object 000000066700 method SENDTASKDESCRIPTION cannot be executed".
    Kindly give your valuable suggestions to rectify this issue.In SBWP i could see the workflow started but mails are not reaching my outlook.Your solution will be highly appreciated.
    Thanks & Regds
    vlp

    Hello Everyone,
    I have another issue.My workflow when directly executed sends mail to all users very quickly.All steps gets executed very quickly.This I could see through the workflow log and SOST and SCOT.But when I try to trigger the workflow through my transaction CRMD_ORDER(i have given proper BO and event) it is taking hours and still in Inprocess status.Infact its not even going to the first step(fetch email ids).
    I am totally confused on this behaviour.Kindly provide your ultimate solutions and I am very thankful for giving such good solutions to all my queries.
    Regds
    VLP

  • Send mail to multiple users

    Dear all,
    I'm using FM 'EFG_GEN_SEND_EMAIL' to send an Email, for a single user its working fine, but I want to know is it possible sending the same mail to multiple users with the same FM, I searched the forum for the same & ended up finding no satisfying results. Using FM ''SO_NEW_DOCUMENT_ATT_SEND_API1' we can attain this but I want to know if it is possible with the former FM.
    Thanks & Regards
    Ajai

    Hi,
    PFB the code that i have used to send mail. In case you need any additional clarification, please feel free to ask..Hope it will help you:
    *To fill the content message
      REFRESH i_message.
      wa_message = l_subject.      "Production Error Log Details for Error Code &
      APPEND wa_message TO i_message.
      CLEAR wa_message.
      wa_message = ' '.
      APPEND wa_message TO i_message.
      CLEAR wa_message.
      wa_message = l_system.
      APPEND wa_message TO i_message.
      CLEAR wa_message.
      wa_message = l_sdate.
      APPEND wa_message TO i_message.
      CLEAR wa_message.
      wa_message = l_message.
      APPEND wa_message TO i_message.
      CLEAR wa_message.
      wa_message = l_description.
      APPEND wa_message TO i_message.
      CLEAR wa_message.
      wa_message = l_count.
      APPEND wa_message TO i_message.
      CLEAR wa_message.
      wa_message = ' '.
      APPEND wa_message TO i_message.
      CLEAR wa_message.
      wa_message = l_message2.
      APPEND wa_message TO i_message.
      CLEAR wa_message.
    * To populate the subject/generic message attributes
      wa_doc_data-obj_langu  = sy-langu.
      wa_doc_data-obj_name   = c_objname.
      wa_doc_data-obj_descr  = text-t20. "Production Error Log Details
      wa_doc_data-sensitivty = c_r.
    * Fill receipient information
      CLEAR wa_receivers.
      REFRESH i_receivers.
      LOOP AT i_emailid INTO wa_emailid.
        IF wa_emailid-email_id CA c_attherate.  "@
          wa_receivers-receiver = wa_emailid-email_id.
          wa_receivers-rec_type = c_u.  "U
        ELSE.
          TRANSLATE wa_emailid-email_id TO UPPER CASE.
          wa_receivers-receiver = wa_emailid-email_id.
          wa_receivers-rec_type = c_c.  "C
        ENDIF.
        wa_receivers-com_type = c_int.
        wa_receivers-notif_del = c_x.
        wa_receivers-notif_ndel = c_x.
        APPEND wa_receivers TO i_receivers.
        CLEAR wa_receivers.
      ENDLOOP.
    * Call the Function Module to send the e-mail alongwith the attachments if any
      CALL FUNCTION 'SO_DOCUMENT_SEND_API1'
        EXPORTING
          document_data              = wa_doc_data
          put_in_outbox              = c_x
          commit_work                = c_x
        IMPORTING
          sent_to_all                = wa_sent_all
        TABLES
          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.
      IF sy-subrc EQ 0.
        MESSAGE text-t08 TYPE 'S'."Mail(s) Send Successfully
      ELSE.
        MESSAGE text-t09 TYPE 'E'."Error in Sending Mail
      ENDIF.
      REFRESH:
               i_message[],
               i_receivers[].

  • How to send mail to multiple users in workflow

    Hi
    I have created a workflow for vendor details.
    after filling all the vendor details the mail should be sent to all managers
    involved in workflow.Can anyone tell me how to assign this task of sending mails to all users in organizational unit.

    hi
    user 1 has mailbox open when the work item arrives, then to user 2 it will apprear to be already read.
    Try using a logical AND in the definition of the responsibilites, so that when only both user 1 and user 2 (assuming that there can be two users) read their emails the work item is regarded as complete
    also check with the following link..
    https://www.sdn.sap.com/irj/sdn/go/portal/prtroot/docs/library/uuid/c6456e89-0a01-0010-0189-a7961fe42034
    reward if useful
    regards
    dinesh

  • Send mail to multiple user using plsql

    Hi
    I wrote plsql block as below
    ===========
    mail_conn := UTL_SMTP.open_connection (mailhost, 25);
    UTL_SMTP.helo (mail_conn, mailhost);
    UTL_SMTP.mail (mail_conn, p_sender);
    UTL_SMTP.rcpt (mail_conn, p_recipient);
    UTL_SMTP.rcpt (mail_conn, p_cc);
    UTL_SMTP.rcpt (mail_conn, p_bcc);     
    UTL_SMTP.DATA (mail_conn,
    'From: '
    || p_sender
    || UTL_TCP.crlf
    || 'To: '
    || p_recipient
    || UTL_TCP.crlf
    || 'Cc: '
    || p_cc
    || UTL_TCP.crlf
    || 'Cc: '
    || p_bcc
    || UTL_TCP.crlf
    || 'Subject: '
    || p_subject
    || UTL_TCP.crlf
    || p_message
    UTL_SMTP.quit (mail_conn);
    ==========
    when I pass single-single user id in To,From,CC,Bcc mail goes through. But when I have multiple emaild mail doesn't go through.
    How do I fix this?
    second problem is when I don't provide Bcc or provide Bcc value null even single email ids mail doesn't go.
    I can have some id as bcc for workaround but first issue is blocking me.
    Any help appreciated.
    Thanks
    Ajay

    CREATE OR REPLACE TRIGGER EmailOnServerErr AFTER SERVERERROR ON DATABASE
    DECLARE
       mail_conn       UTL_SMTP.connection;
       crlf            VARCHAR2(2) := chr(13)||chr(10);
       msg             VARCHAR2(32760);
       sid_name        VARCHAR2(16);
       bdump_dest      VARCHAR2(128);
       smtp_relay      VARCHAR2(32) := 'MyMailRelay';
       recipient_address  VARCHAR2(64) := '[email protected]';
       sender_address     VARCHAR2(64) := '[email protected]';
       mail_port       NUMBER := 25;
       log_file_handle UTL_FILE.FILE_TYPE;
       log_file_dir    VARCHAR2(256) := 'ERR_LOG_DIR';
       log_file_name   VARCHAR2(256) := 'OracleErrors.log';
       maxlinesize     NUMBER := 32767;
       session_rec     sys.v_$session%ROWTYPE;
       audit_rec       sys.dba_audit_trail%ROWTYPE;
       auditing        BOOLEAN;
       LinesOfSQL      BINARY_INTEGER;
       offending_sql   DBMS_STANDARD.ora_name_list_t;
       CURSOR bdump_cur IS
          SELECT TRIM(value)
          FROM v$parameter
          WHERE name = 'background_dump_dest'
       CURSOR sid_cur IS
          SELECT TRIM(instance_name)
          FROM v$instance
       CURSOR session_cur IS
          SELECT s.*
          FROM v$session s
          WHERE s.sid = dbms_support.mysid
       CURSOR audit_trail_cur(AUDSID IN NUMBER) IS
          SELECT *
          FROM dba_audit_trail
          WHERE sessionid = AUDSID
    BEGIN
       IF (USER = 'SYSTEM' OR USER = 'SYS') THEN
          -- Ignore this error
          NULL;
       ELSIF IS_SERVERERROR (1034) THEN
          -- Ignore this error
          NULL;
       ELSE
          -- get the sid
          OPEN sid_cur;
          FETCH sid_cur INTO sid_name;
          CLOSE sid_cur;
          -- get the location of the alert log
          OPEN bdump_cur;
          FETCH bdump_cur INTO bdump_dest;
          CLOSE bdump_cur;
          -- get the session information
          OPEN session_cur;
          FETCH session_cur INTO session_rec;
          CLOSE session_cur;
          -- get the audit_trail information if it exists
          OPEN audit_trail_cur(session_rec.audsid);
          FETCH audit_trail_cur INTO audit_rec;
          auditing := audit_trail_cur%FOUND;
          CLOSE audit_trail_cur;
          IF session_rec.program = 'MyProgram.exe' THEN
             NULL;  -- ignore actions from MyProgram - that's where I do maintenance
          ELSE
             -- compose the message
             msg := 'Subject: Oracle error '||' on '||sid_name||crlf;
             msg := msg||'To: '||recipient_address||crlf;
             msg := msg||'For more information see the alert log file located at:'||crlf;
             msg := msg||bdump_dest||'/alert_'||sid_name||'.log'||crlf;
             msg := msg||'or the error log file: $'||log_file_dir||'/'||log_file_name||crlf;
             msg := msg||'Error Time='||TO_CHAR(SYSDATE,'DD-Mon-YYYY HH24:MI:SS')||crlf;
             msg := msg||DBMS_UTILITY.FORMAT_CALL_STACK||crlf;
             LinesOfSQL := sql_txt(offending_sql);
             msg := msg||'Offending SQL is:'||crlf;
             FOR loop_counter IN offending_sql.FIRST..offending_sql.LAST
             LOOP
                msg := msg||offending_sql(loop_counter);
             END LOOP;
             msg := msg||crlf||'----- PL/SQL Error Stack -----'||crlf;
             msg := msg||DBMS_UTILITY.FORMAT_ERROR_STACK||crlf;
             msg := msg||'V$SESSION.SADDR='   ||session_rec.saddr   ||crlf;
             msg := msg||'V$SESSION.SID='     ||session_rec.sid     ||crlf;
             msg := msg||'V$SESSION.SERIAL#=' ||session_rec.serial# ||crlf;
             msg := msg||'V$SESSION.AUDSID='  ||session_rec.audsid  ||crlf;
             msg := msg||'V$SESSION.PADDR='   ||session_rec.paddr   ||crlf;
             msg := msg||'V$SESSION.USER#='   ||session_rec.user#   ||crlf;
             msg := msg||'V$SESSION.USERNAME='||session_rec.username||crlf;
             msg := msg||'V$SESSION.COMMAND=' ||session_rec.command ||crlf;
             msg := msg||'V$SESSION.OWNERID=' ||session_rec.ownerid ||crlf;
             msg := msg||'V$SESSION.TADDR='   ||NVL(session_rec.taddr   ,'Null')||crlf;
             msg := msg||'V$SESSION.LOCKWAIT='||NVL(session_rec.lockwait,'Null')||crlf;
             msg := msg||'V$SESSION.STATUS='  ||NVL(session_rec.status  ,'Null')||crlf;
             msg := msg||'V$SESSION.SERVER='  ||NVL(session_rec.server  ,'Null')||crlf;
             msg := msg||'V$SESSION.SCHEMA#=' ||session_rec.schema#||crlf;
             msg := msg||'V$SESSION.SCHEMANAME=' ||NVL(session_rec.schemaname,'Null')||crlf;
             msg := msg||'V$SESSION.OSUSER='     ||NVL(session_rec.osuser    ,'Null')||crlf;
             msg := msg||'V$SESSION.PROCESS='    ||NVL(session_rec.process   ,'Null')||crlf;
             msg := msg||'V$SESSION.MACHINE='    ||NVL(session_rec.machine   ,'Null')||crlf;
             msg := msg||'V$SESSION.TERMINAL='   ||NVL(session_rec.terminal  ,'Null')||crlf;
             msg := msg||'V$SESSION.PROGRAM='    ||NVL(session_rec.program   ,'Null')||crlf;
             msg := msg||'V$SESSION.TYPE='       ||NVL(session_rec.type      ,'Null')||crlf;
             msg := msg||'V$SESSION.SQL_ADDRESS='    ||session_rec.sql_address  ||crlf;
             msg := msg||'V$SESSION.SQL_HASH_VALUE=' ||NVL(TO_CHAR(session_rec.sql_hash_value) ,'Null')||crlf;
             msg := msg||'V$SESSION.PREV_SQL_ADDR='  ||session_rec.prev_sql_addr||crlf;
             msg := msg||'V$SESSION.PREV_HASH_VALUE='||NVL(TO_CHAR(session_rec.prev_hash_value),'Null')||crlf;
             msg := msg||'V$SESSION.MODULE='     ||NVL(session_rec.module              ,'Null')||crlf;
             msg := msg||'V$SESSION.MODULE_HASH='||NVL(TO_CHAR(session_rec.module_hash),'Null')||crlf;
             msg := msg||'V$SESSION.ACTION='     ||NVL(session_rec.action              ,'Null')||crlf;
             msg := msg||'V$SESSION.ACTION_HASH='||NVL(TO_CHAR(session_rec.action_hash),'Null')||crlf;
             msg := msg||'V$SESSION.CLIENT_INFO='||NVL(session_rec.client_info         ,'Null')||crlf;
             msg := msg||'V$SESSION.FIXED_TABLE_SEQUENCE='||NVL(TO_CHAR(session_rec.fixed_table_sequence),'Null')||crlf;
             msg := msg||'V$SESSION.ROW_WAIT_OBJ#='  ||NVL(TO_CHAR(session_rec.row_wait_obj#)  ,'Null')||crlf;
             msg := msg||'V$SESSION.ROW_WAIT_FILE#=' ||NVL(TO_CHAR(session_rec.row_wait_file#) ,'Null')||crlf;
             msg := msg||'V$SESSION.ROW_WAIT_BLOCK#='||NVL(TO_CHAR(session_rec.row_wait_block#),'Null')||crlf;
             msg := msg||'V$SESSION.ROW_WAIT_ROW#='  ||NVL(TO_CHAR(session_rec.row_wait_row#)  ,'Null')||crlf;
             msg := msg||'V$SESSION.LOGON_TIME='     ||NVL(TO_CHAR(session_rec.logon_time,'DD-Mon-YYYY HH24:MI:SS'),'Null')||crlf;
             msg := msg||'V$SESSION.LAST_CALL_ET='   ||NVL(TO_CHAR(session_rec.last_call_et)   ,'Null')||crlf;
             msg := msg||'V$SESSION.PDML_ENABLED='   ||NVL(session_rec.pdml_enabled   ,'Null')||crlf;
             msg := msg||'V$SESSION.FAILOVER_TYPE='  ||NVL(session_rec.failover_type  ,'Null')||crlf;
             msg := msg||'V$SESSION.FAILOVER_METHOD='||NVL(session_rec.failover_method,'Null')||crlf;
             msg := msg||'V$SESSION.FAILED_OVER='    ||NVL(session_rec.failed_over    ,'Null')||crlf;
             msg := msg||'V$SESSION.RESOURCE_CONSUMER_GROUP='||NVL(session_rec.resource_consumer_group,'Null')||crlf;
             msg := msg||'V$SESSION.PDML_STATUS='    ||NVL(session_rec.pdml_status    ,'Null')||crlf;
             msg := msg||'V$SESSION.PDDL_STATUS='    ||NVL(session_rec.pddl_status    ,'Null')||crlf;
             msg := msg||'V$SESSION.PQ_STATUS='      ||NVL(session_rec.pq_status      ,'Null')||crlf;
             IF auditing THEN
                msg := msg||'DBA_AUDIT_TRAIL.OS_USERNAME='  ||NVL(audit_rec.os_username,'Null')||crlf;
                msg := msg||'DBA_AUDIT_TRAIL.USERNAME='     ||NVL(audit_rec.username   ,'Null')||crlf;
                msg := msg||'DBA_AUDIT_TRAIL.USERHOST='     ||NVL(audit_rec.userhost   ,'Null')||crlf;
                msg := msg||'DBA_AUDIT_TRAIL.TERMINAL='     ||NVL(audit_rec.terminal   ,'Null')||crlf;
                msg := msg||'DBA_AUDIT_TRAIL.TIMESTAMP='    ||TO_CHAR(audit_rec.timestamp,'DD-Mon-YYYY HH24:MI:SS')||crlf;
                msg := msg||'DBA_AUDIT_TRAIL.OWNER='        ||NVL(audit_rec.owner      ,'Null')||crlf;
                msg := msg||'DBA_AUDIT_TRAIL.OBJ_NAME='     ||NVL(audit_rec.obj_name   ,'Null')||crlf;
                msg := msg||'DBA_AUDIT_TRAIL.ACTION='       ||audit_rec.action   ||crlf;
                msg := msg||'DBA_AUDIT_TRAIL.ACTION_NAME='  ||NVL(audit_rec.action_name   ,'Null')||crlf;
                msg := msg||'DBA_AUDIT_TRAIL.NEW_OWNER='    ||NVL(audit_rec.new_owner     ,'Null')||crlf;
                msg := msg||'DBA_AUDIT_TRAIL.NEW_NAME='     ||NVL(audit_rec.new_name      ,'Null')||crlf;
                msg := msg||'DBA_AUDIT_TRAIL.OBJ_PRIVILEGE='||NVL(audit_rec.obj_privilege ,'Null')||crlf;
                msg := msg||'DBA_AUDIT_TRAIL.SYS_PRIVILEGE='||NVL(audit_rec.sys_privilege ,'Null')||crlf;
                msg := msg||'DBA_AUDIT_TRAIL.ADMIN_OPTION=' ||NVL(audit_rec.admin_option  ,'Null')||crlf;
                msg := msg||'DBA_AUDIT_TRAIL.GRANTEE='      ||NVL(audit_rec.grantee       ,'Null')||crlf;
                msg := msg||'DBA_AUDIT_TRAIL.AUDIT_OPTION=' ||NVL(audit_rec.audit_option  ,'Null')||crlf;
                msg := msg||'DBA_AUDIT_TRAIL.SES_ACTIONS='  ||NVL(audit_rec.ses_actions   ,'Null')||crlf;
                msg := msg||'DBA_AUDIT_TRAIL.LOGOFF_TIME='  ||NVL(TO_CHAR(audit_rec.logoff_time)  ,'Null')||crlf;
                msg := msg||'DBA_AUDIT_TRAIL.LOGOFF_LREAD=' ||NVL(TO_CHAR(audit_rec.logoff_lread) ,'Null')||crlf;
                msg := msg||'DBA_AUDIT_TRAIL.LOGOFF_PREAD=' ||NVL(TO_CHAR(audit_rec.logoff_pread) ,'Null')||crlf;
                msg := msg||'DBA_AUDIT_TRAIL.LOGOFF_LWRITE='||NVL(TO_CHAR(audit_rec.logoff_lwrite),'Null')||crlf;
                msg := msg||'DBA_AUDIT_TRAIL.LOGOFF_DLOCK=' ||NVL(audit_rec.logoff_dlock  ,'Null')||crlf;
                msg := msg||'DBA_AUDIT_TRAIL.COMMENT_TEXT=' ||NVL(audit_rec.comment_text  ,'Null')||crlf;
                msg := msg||'DBA_AUDIT_TRAIL.SESSIONID='    ||audit_rec.sessionid   ||crlf;
                msg := msg||'DBA_AUDIT_TRAIL.ENTRYID='      ||audit_rec.entryid     ||crlf;
                msg := msg||'DBA_AUDIT_TRAIL.STATEMENTID='  ||audit_rec.statementid ||crlf;
                msg := msg||'DBA_AUDIT_TRAIL.RETURNCODE='   ||audit_rec.returncode  ||crlf;
                msg := msg||'DBA_AUDIT_TRAIL.PRIV_USED='    ||NVL(audit_rec.priv_used,'Null')||crlf;
             END IF;
             msg := msg||'-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-'||crlf||crlf;
             -- write the message to the error log file
             log_file_handle := UTL_FILE.FOPEN (log_file_dir, log_file_name, 'A',maxlinesize);
             UTL_FILE.PUT_LINE(log_file_handle,msg);
             UTL_FILE.FCLOSE(log_file_handle);
             -- send the message by Email
             mail_conn := UTL_SMTP.open_connection(smtp_relay, mail_port);
             UTL_SMTP.HELO(mail_conn, smtp_relay);
             UTL_SMTP.MAIL(mail_conn, sender_address);
             UTL_SMTP.RCPT(mail_conn, recipient_address);
             UTL_SMTP.DATA(mail_conn, msg);
             UTL_SMTP.QUIT(mail_conn);
          END IF; -- client_program = MyProgram.exe
       END IF;
    END;
    /

  • Sending mail with multiple dest., one is rejected - mail is rejected, why?

    Hello,
    I have a problem with my messaging server, while sending mails to multiple users, and one of them does not exist or is overquota.
    If one of the recipients gets rejected (email address does not exists or is overquota), the email is rejected (type J register) and no one receive it.
    any idea why messaging is doing this?
    The queue i'm using is configured like this:
    tcp_intranet notices 3 smtp nomx backoff "pt5m" "pt10m" "pt30m" subdirs 50 maxjobs 20 pool TCP_INTRANET_POOL recipient
    limit 256 maytlsserver maysaslserver allowswitchchannel saslswitchchannel tcp_auth identnone noexquota
    tcp_intranet-daemonand the version of messaging
    imsimta version
    Sun Java(tm) System Messaging Server 6.2-4.03 (built Sep 22 2005)
    libimta.so 6.2-4.03 (built 04:14:30, Sep 22 2005)
    SunOS smtp07 5.9 Generic_118559-28 i86pc i386 i86pc
    root@smtp:/var/opt/SUNWmsgsr/config > thanks in advance
    Xavier

    xavierm wrote:
    If one of the recipients gets rejected (email address does not exists or is overquota), the email is rejected (type J register) and no one receive it.If an individual email account is overquota or an email address doesn't exist, only that RCPT TO: attempt for that individual address will be rejected -- this does not mean the email cannot be delivered to the valid recipients.
    It is up to the email client to determine how an individual rejected recipient address is handled, i.e. should it continue sending the email or give up and alert the user.
    any idea why messaging is doing this?This is how all efficient email servers operate. What is the email client that you are using to send the email?
    The queue i'm using is configured like this:
    tcp_intranet notices 3 smtp nomx backoff "pt5m" "pt10m" "pt30m" subdirs 50 maxjobs 20 pool TCP_INTRANET_POOL recipient
    limit 256 maytlsserver maysaslserver allowswitchchannel saslswitchchannel tcp_auth identnone noexquota
    tcp_intranet-daemon
    The noexquota option does nothing on Sun Messaging Server:
    "Note that these options have no effect on delivery to Messaging Server mailboxes on any platform. "
    http://msg.wikidoc.info/index.php/Exquota%2C_noexquota%2C_holdexquota_Channel_Options
    You may however want to try the acceptalladdresses channel option:
    http://msg.wikidoc.info/index.php/Acceptalladdresses%2C_acceptvalidaddresses_Channel_Options
    Regards,
    Shane.

  • Sending mail to multiple recepient

    Hi Friends ,
    I am trying to send mails to multiple user .
    for this i have created a method in the bus object . for testing i have done the coding liek this
    data : begin of EMAILID occurs 0 ,
    userid like adr6-smtp_addr,
    end of emailid.
    EMAILID-userid = '[email protected]'.
    append EMAILID .
    EMAILID-userid = '[email protected]' .
    append EMAILID .
      SWC_SET_ELEMENT CONTAINER 'emailid' EMAILID.
    END_METHOD.
    can u tell me how should i define my 'emailid'  variable which i am gng to export from the method .
    Can anybody tell me how to map this parameter to the mail to send it to multiple users .
    Thanks
    ROhit

    Hi,
    CONTAINER-VALUE = "mail ID"
    CONTAINER-ELEMENT = 'NAME_MULTI'.
    CONTAINER-TAB_INDEX = '000002'.
    CONTAINER-ELEMLENGTH = '014'.
    CONTAINER-TYPE = 'C'.
    APPEND CONTAINER.
    U need to write this method in background .Below that write a mail step . In the mail step under Expression give this container element name. Before that from the background step u need to bind the multiline container back to workflow via binding.
    Reward for useful answer!
    Richard A

  • Sending mail to multiple mailid from apex

    Hi,
    I need to send mail to multiple users from apex which is taken from a database table column. Is it possible to use LOV to send mail to multiple mail id? I tried with using collection but unable to reach it.
    APEX_COLLECTION.CREATE_COLLECTION_FROM_QUERY_B(
    p_collection_name => List_of_mailid,
    p_query => select column from table where cond='Y');
    any ideas.... thanks in advance.

    What you need to do is, build a string with the multiple e-mail addresses, and then when you want to send mail See this oldie but goodie thread:
    Have mutiple email addresses in Apex Email functionality
    Thank you,
    Tony Miller
    Dallas, TX

  • Help with sending emails to multiple users.

    Currently we have a process to send mail to muliple users by looping through the list of users and sending each individual an email
    <Action id='1' name='sendEmail' application='com.waveset.provision.WorkflowServices'>
    <Argument name='op' value='notify'/>
    <Argument name='template' value='$(template)'/>
    <Argument name='toUser' value='$(tuser)'/>
    <Argument name='catch' value='notificationException'/>
    </Action>
    The variable tuser contains a single email address.
    Is there any way to setup tuser to contain multiple email addresses?
    I have tried passing a list and a string separated by colons (ex: <s>[email protected]; [email protected]</s>) and neither one works.
    Question 2
    Is it a bad idea to try and send email to up to 50000 users at once using IDM? Besides the fact that I would need to search for specific users and get their email addresses based on their capabilities.

    Hi,
    For sending emails to multiple users, use to instead of toUser. Put the names in comma seperated values
    <Action id='0' application='com.waveset.provision.WorkflowServices'>
    <Argument name='op' value='notify'/>
    <Argument name='template' value='$(template)'/>
    <Argument name='to' value='$(to)'/>
    <Argument name='cc' value='$(cc)'/>
    <Argument name='catch' value='notificationException'/>
    </Action>
    You can use IDM to send emails.
    it will be a good idea to break down the email that you are sending into groups/batches. If possible, you can send email to DL s
    Else, you can segregate the users based on roles and send emails. This will reduce the load. Hope it helps
    Regards
    Arjun
    Edited by: arjun.sengupta on Dec 4, 2012 3:26 AM

  • Macbook Air- send mail to multiple person in contact with name of them in email

    Hi there, i use macbook air, in mail, i want to know if it is possible the if i wan to send email to multiple people in my contact and the name of the person will appear in the email message like Dear......... (follow by the name of person that i saved in the contact book)

    Hello Everyone,
    I have another issue.My workflow when directly executed sends mail to all users very quickly.All steps gets executed very quickly.This I could see through the workflow log and SOST and SCOT.But when I try to trigger the workflow through my transaction CRMD_ORDER(i have given proper BO and event) it is taking hours and still in Inprocess status.Infact its not even going to the first step(fetch email ids).
    I am totally confused on this behaviour.Kindly provide your ultimate solutions and I am very thankful for giving such good solutions to all my queries.
    Regds
    VLP

  • Problem in sending mail to multiple administrators

    Hi,
    I have a requirement to send mail to multiple administrators.
    The flow is as follows:
    The user submits feedback form then the mail should be send to all the administrators with the feedback provided by user.
    The code is as follows:
    DECLARE
    lc_body_html varchar2(4000);
    P_TO VARCHAR2(50);
    P_FROM VARCHAR2(50);
    P_BODY_HTML VARCHAR2(250);
    P_SUBJ VARCHAR2(10);
    lc_usernames VARCHAR2(100);
    CURSOR lcu_username IS SELECT user_name FROM emea_pmr_users WHERE is_admin='Y';
    lr_username_rec lcu_username%ROWTYPE;
    BEGIN
    OPEN lcu_username;
    LOOP
    FETCH lcu_username INTO lr_username_rec;
    EXIT WHEN lcu_username%NOTFOUND;
    lc_usernames :=lc_usernames||lr_username_rec.user_name||',' ;
    END LOOP;
    CLOSE lcu_username;
    lc_usernames :=RTRIM(lc_usernames,',');
    lc_body_html := :P34_FEEDBACK_TEXT;
    HTMLDB_MAIL.SEND(
    P_TO => lc_usernames,
    P_FROM => :APP_USER,
    P_BODY => lc_body_html,
    P_BODY_HTML => lc_body_html,
    P_SUBJ => 'Test Mail');
    END;
    The problem here is only for the last record in table the mail is going successfully.
    If I hard code p_to as '[email protected],[email protected],[email protected]'
    then the mail is being send to all the 3 users successfully.
    Where I am going wrong can anyone let me know?
    Thanks in advance.
    Sarvani.

    Sarvani,
    1) What do you mean by "the problem here is only for the last record in table the mail is going successfully."
    2) For an e-mail which doesn't work, what is the value of APEX_MAIL_QUEUE.MAIL_TO in the mail database view?
    Joel

  • Send smartform to multiple users using std. smartform interface

    Hello All,
    Below is the requirement : -
    While doing an external send against the custom output type in transaction VF02, smartform is automatically send to the appropriate email address as pdf attachment. This email address can be sold to party/bill to party etc and it is controlled using configuration.
    Now the prb is, using such configuration we can send email to single email id only. I need to send the email to multiple users using the standard smartform interface ONLY i.e by using the parameter MAIL_RECEPIENT in the std. smartform interface.
    I have alredy evaluated the below workarounds for the above solution, but we need to implement the above functionality using standard smartform interface only.
    1) Convert the smartform OTF data to PDF format data and then send the PDF attachment via email to multiple recipients using the standard FM SO_NEW_DOCUMENT_ATT_SEND_API1.
    2) Loop at the recipients table and within the loop pass different recipient to the interface parameter MAIL_RECIPIENT of smartform. Hence in this case smartform will be called within the loop which can cause performance issues incase of multiple recipients. Also the mail will be sent individually to every recipient.
    3) I have already checked by passing the distribution list the parameter MAIL_RECEIPIENT but it does not work.
    Looking forward for your responses.
    Regards,
    R.Doshi

    Hi
    Check if SAP Note 1260015 - Sending mail to multiple recipients is useful for your requirements.
    Regards
    Eduardo

  • Sending mail with multiple attachment

    hi.
    i want to send mail with multiple attachment.
    i m succeed in sending multiple attachment but the second pdf is not open.
    its given error like "This file is damaged and could not be open.
    pls check my code. and
    give the solution....
    point should be assured...........
    hope all u r understand my problem..
    & tell me where is i m missing something.
    REPORT  YSDPASALE1_MAIL LINE-SIZE 110.
    data : year_month(6) type c.
    data : from_date like sy-datum,to_date like sy-datum.
    INITIALIZATION.
    year_month = sy-datum+0(6).
    CONCATENATE year_month '01' into from_date.
    to_date = sy-datum.
    ranges : temp for mkpf-budat.
    temp-low = from_date.
    temp-high = to_date.
    append temp to temp.
    DATA: P_JOBCNT LIKE TBTCJOB-JOBCOUNT,
           jobname like TBTCJOB-JOBNAME,
           L_RELEASE(1) TYPE c.
    CONSTANTS : l_c_device(4)    VALUE 'LOCL'.
    DATA : t type i value 0.
    DATA : p_email1 like somlreci1-receiver,
            p_sender LIKE somlreci1-receiver.
    Data Declaration
    DATA: gd_recsize TYPE i,gd_recsize1 TYPE i.
    Spool IDs
    TYPES: BEGIN OF t_tbtcp.
            INCLUDE STRUCTURE tbtcp.
    TYPES: END OF t_tbtcp.
    DATA: it_tbtcp TYPE STANDARD TABLE OF t_tbtcp INITIAL SIZE 0,
          wa_tbtcp TYPE t_tbtcp.
    Job Runtime Parameters
    DATA: gd_eventid LIKE tbtcm-eventid,
          gd_eventparm LIKE tbtcm-eventparm,
          gd_external_program_active LIKE tbtcm-xpgactive,
          gd_jobcount LIKE tbtcm-jobcount,
          gd_jobname LIKE tbtcm-jobname,
          gd_stepcount LIKE tbtcm-stepcount,
          gd_error    TYPE sy-subrc,
          gd_reciever TYPE sy-subrc.
    DATA:  w_recsize TYPE i.
    DATA: gd_subject  LIKE sodocchgi1-obj_descr,
          it_mess_bod LIKE solisti1 OCCURS 0 WITH HEADER LINE,
          it_mess_att LIKE solisti1 OCCURS 0 WITH HEADER LINE,
          it_mess_att1 LIKE solisti1 OCCURS 0 WITH HEADER LINE,
          it_mess_att2 LIKE solisti1 OCCURS 0 WITH HEADER LINE,
          gd_sender_type     LIKE soextreci1-adr_typ,
          gd_attachment_desc TYPE so_obj_nam,
          gd_attachment_desc1 TYPE so_obj_nam,
          gd_attachment_name TYPE so_obj_des,
          gd_mtitle LIKE sodocchgi1-obj_descr.
    Spool to PDF conversions
    DATA: gd_spool_nr LIKE tsp01-rqident,
          gd_destination LIKE rlgrap-filename,
          gd_bytecount LIKE tst01-dsize,
          gd_buffer TYPE string.
    CONSTANTS: c_dev LIKE  sy-sysid VALUE 'DEV',
               c_no(1)     TYPE c   VALUE ' ',
               c_device(4) TYPE c   VALUE 'LOCL'.
    Binary store for PDF
    DATA: BEGIN OF it_pdf_output OCCURS 0.
            INCLUDE STRUCTURE tline.
    DATA: END OF it_pdf_output.
    DATA: BEGIN OF mailstr OCCURS 0,
            p_email like somlreci1-receiver,
          END OF mailstr.
    DATA: mailtab like STANDARD TABLE OF mailstr WITH HEADER LINE.
    DATA: ypp18tab like STANDARD TABLE OF mailstr WITH HEADER LINE,
          ymis008tab like STANDARD TABLE OF mailstr WITH HEADER LINE,
          ysd15tab like STANDARD TABLE OF mailstr WITH HEADER LINE,
          ymis10tab like STANDARD TABLE OF mailstr WITH HEADER LINE.
    SUBMIT YSDPASALE1 with bdt in temp
                           to sap-spool
                          with line-size = '255'
                           with KEEP_IN_SPOOL = 'X'
                           with IMMEDIATELY = ' '
                           WITHOUT SPOOL DYNPRO
                           AND RETURN
       NEW-PAGE PRINT ON
       DESTINATION l_c_device
       IMMEDIATELY ' '
       KEEP IN SPOOL 'X'
       NEW LIST IDENTIFICATION 'X'
       NO DIALOG.
       new-page print off.
      IF sy-batch EQ 'X'.
        PERFORM get_job_details.
        PERFORM obtain_spool_id.
        PERFORM convert_spool_to_pdf.
        select yemail as p_email into CORRESPONDING FIELDS OF TABLE ymis008tab
          from ymail
          where ytcode = 'YMIS008'.
    ELSE.
       SKIP.
       WRITE:/ 'Program must be executed in background in-order for spool & mail sending',
               'request to be created.'.
      ENDIF.
    wait up to 3 seconds.
      submit YSD_MONTHLY_SALES
                                USING SELECTION-SET 'MAIL'
                                to sap-spool
                               with KEEP_IN_SPOOL = 'X'
                               with IMMEDIATELY = ' ' "SPACE
                               WITHOUT SPOOL DYNPRO
                               AND RETURN
       NEW-PAGE PRINT ON
       DESTINATION l_c_device
       IMMEDIATELY ' '
       KEEP IN SPOOL 'X'
       NEW LIST IDENTIFICATION 'X'
       NO DIALOG.
       new-page print off.
        IF sy-batch EQ 'X'.
        gd_attachment_desc1  = 'YMIS10'.
        gd_mtitle = 'Monthly Sales Report'.
        PERFORM get_job_details.
        PERFORM obtain_spool_id.
        PERFORM convert_spool_to_pdf1.
       loop at it_mess_att.
        move it_mess_att1 to it_mess_att.
        APPEND it_mess_att.
       endloop.
       APPEND LINES OF it_mess_att1 to it_mess_att.
       free it_mess_att1.
        it_mess_att[] = it_mess_att1[].
        insert LINES OF it_mess_att1 into it_mess_att.
        APPEND LINES OF it_mess_att2 to it_mess_att .
         insert LINES OF it_mess_att1 into it_mess_att.
         insert LINES OF it_mess_att2 into it_mess_att.
       loop at ymis008tab into mailstr.
         p_email1 = mailstr-p_email.
          p_email1 = '[email protected]'.
           PERFORM process_email.
       endloop.
           clear mailstr.
          wait up to 5 seconds.
          SUBMIT rsconn01 WITH mode   = 'INT'
                          WITH output = 'X'
                          AND RETURN.
      ELSE.
        SKIP.
      ENDIF.
          FORM obtain_spool_id                                          *
    FORM obtain_spool_id.
      CHECK NOT ( gd_jobname IS INITIAL ).
      CHECK NOT ( gd_jobcount IS INITIAL ).
      SELECT * FROM  tbtcp
                     INTO TABLE it_tbtcp
                     WHERE      jobname     = gd_jobname
                     AND        jobcount    = gd_jobcount
                     AND        stepcount   = gd_stepcount
                     AND        listident   <> '0000000000'
                     ORDER BY   jobname
                                jobcount
                                stepcount.
      READ TABLE it_tbtcp INTO wa_tbtcp INDEX 1.
      IF sy-subrc = 0.
        message s004(zdd) with gd_spool_nr.
        gd_spool_nr = wa_tbtcp-listident.
        MESSAGE s004(zdd) WITH gd_spool_nr.
      ELSE.
        MESSAGE s005(zdd).
      ENDIF.
    ENDFORM.
          FORM get_job_details                                          *
    FORM get_job_details.
    Get current job details
      CALL FUNCTION 'GET_JOB_RUNTIME_INFO'
           IMPORTING
                eventid                 = gd_eventid
                eventparm               = gd_eventparm
                external_program_active = gd_external_program_active
                jobcount                = gd_jobcount
                jobname                 = gd_jobname
                stepcount               = gd_stepcount
           EXCEPTIONS
                no_runtime_info         = 1
                OTHERS                  = 2.
    ENDFORM.
          FORM convert_spool_to_pdf                                     *
    FORM convert_spool_to_pdf.
      CALL FUNCTION 'CONVERT_ABAPSPOOLJOB_2_PDF'
           EXPORTING
                src_spoolid              = gd_spool_nr
                no_dialog                = c_no
                dst_device               = c_device
           IMPORTING
                pdf_bytecount            = gd_bytecount
           TABLES
                pdf                      = it_pdf_output
           EXCEPTIONS
                err_no_abap_spooljob     = 1
                err_no_spooljob          = 2
                err_no_permission        = 3
                err_conv_not_possible    = 4
                err_bad_destdevice       = 5
                user_cancelled           = 6
                err_spoolerror           = 7
                err_temseerror           = 8
                err_btcjob_open_failed   = 9
                err_btcjob_submit_failed = 10
                err_btcjob_close_failed  = 11
                OTHERS                   = 12.
      CHECK sy-subrc = 0.
    Transfer the 132-long strings to 255-long strings
      LOOP AT it_pdf_output.
        TRANSLATE it_pdf_output USING ' ~'.
        CONCATENATE gd_buffer it_pdf_output INTO gd_buffer.
      ENDLOOP.
      TRANSLATE gd_buffer USING '~ '.
      DO.
        it_mess_att = gd_buffer.
        APPEND it_mess_att.
        SHIFT gd_buffer LEFT BY 255 PLACES.
        IF gd_buffer IS INITIAL.
          EXIT.
        ENDIF.
      ENDDO.
    ENDFORM.
    FORM convert_spool_to_pdf1.
      CALL FUNCTION 'CONVERT_ABAPSPOOLJOB_2_PDF'
           EXPORTING
                src_spoolid              = gd_spool_nr
                no_dialog                = c_no
                dst_device               = c_device
           IMPORTING
                pdf_bytecount            = gd_bytecount
           TABLES
                pdf                      = it_pdf_output
           EXCEPTIONS
                err_no_abap_spooljob     = 1
                err_no_spooljob          = 2
                err_no_permission        = 3
                err_conv_not_possible    = 4
                err_bad_destdevice       = 5
                user_cancelled           = 6
                err_spoolerror           = 7
                err_temseerror           = 8
                err_btcjob_open_failed   = 9
                err_btcjob_submit_failed = 10
                err_btcjob_close_failed  = 11
                OTHERS                   = 12.
      CHECK sy-subrc = 0.
    Transfer the 132-long strings to 255-long strings
      LOOP AT it_pdf_output.
        TRANSLATE it_pdf_output USING ' ~'.
        CONCATENATE gd_buffer it_pdf_output INTO gd_buffer.
      ENDLOOP.
      TRANSLATE gd_buffer USING '~ '.
      DO.
        it_mess_att1 = gd_buffer.
        APPEND it_mess_att1.
        SHIFT gd_buffer LEFT BY 255 PLACES.
        IF gd_buffer IS INITIAL.
          EXIT.
        ENDIF.
      ENDDO.
    ENDFORM.
          FORM process_email                                            *
    FORM process_email.
      DESCRIBE TABLE it_mess_att LINES gd_recsize.
      DESCRIBE TABLE it_mess_att1 LINES gd_recsize1.
      CHECK gd_recsize > 0 or gd_recsize1 > 0.
      PERFORM send_email." USING p_email1.
    perform send_email using p_email2.
    ENDFORM.
          FORM send_email                                               *
    -->  p_email                                                       *
    FORM send_email." USING p_email.
    CHECK NOT ( p_email IS INITIAL ).
      REFRESH it_mess_bod.
    Default subject matter
      gd_subject         = 'Subject'.
      gd_attachment_desc = gd_attachment_desc1 .
    gd_attachment_desc = 'YPP18 - Daily Highlights'.
    CONCATENATE 'attach_name' ' ' INTO gd_attachment_name.
      it_mess_bod        = 'Dear Sir,'.
      APPEND it_mess_bod.
    it_mess_bod        = ' '.
    APPEND it_mess_bod.
      it_mess_bod        = ' '.
      APPEND it_mess_bod.
      it_mess_bod        = 'kindly find the attached document'.
      APPEND it_mess_bod.
    it_mess_bod        = ' '.
    APPEND it_mess_bod.
    it_mess_bod        = 'Do not reply on this mail, It is generated from SAP'.
    APPEND it_mess_bod.
    it_mess_bod        = ' '.
    APPEND it_mess_bod.
      it_mess_bod        = ' '.
      APPEND it_mess_bod.
      it_mess_bod        = 'Regards,'.
      APPEND it_mess_bod.
      it_mess_bod        = 'Arpit Shah'.
      APPEND it_mess_bod.
    If no sender specified - default blank
      IF p_sender EQ space.
        gd_sender_type  = space.
      ELSE.
        gd_sender_type  = 'INT'.
      ENDIF.
    Send file by email as .xls speadsheet
      PERFORM send_file_as_email_attachment
                                   tables it_mess_bod
                                          it_mess_att
                                          it_mess_att1
                                    using "p_email
                                          gd_mtitle
                                         'Testing mail generated from SAP'
                                         'Daily Highlights Abstract Report - YPP18'
                                          'PDF'
                                          gd_attachment_name
                                          gd_attachment_desc
                                          p_sender
                                          gd_sender_type
                                 changing gd_error
                                          gd_reciever.
    ENDFORM.
    *&      Form  SEND_FILE_AS_EMAIL_ATTACHMENT
          Send email
    FORM send_file_as_email_attachment tables it_message
                                              it_attach
                                              it_attach1
                                        using "p_email
                                              p_mtitle
                                              p_format
                                              p_filename
                                              p_attdescription
                                              p_sender_address
                                              p_sender_addres_type
                                     changing p_error
                                              p_reciever.
      DATA: ld_error    TYPE sy-subrc,
            ld_reciever TYPE sy-subrc,
            ld_mtitle LIKE sodocchgi1-obj_descr,
            ld_email LIKE  somlreci1-receiver,
            ld_format TYPE  so_obj_tp ,
            ld_attdescription TYPE  so_obj_nam ,
            ld_attfilename TYPE  so_obj_des ,
            ld_sender_address LIKE  soextreci1-receiver,
            ld_sender_address_type LIKE  soextreci1-adr_typ,
            ld_receiver LIKE  sy-subrc.
    data:   t_packing_list like sopcklsti1 occurs 0 with header line,
            t_contents like solisti1 occurs 0 with header line,
            t_receivers like somlreci1 occurs 0 with header line,
            t_attachment like solisti1 occurs 0 with header line,
            t_object_header like solisti1 occurs 0 with header line,
            w_cnt type i,
            w_sent_all(1) type c,
            w_doc_data like sodocchgi1,w_doc_data1 like sodocchgi1.
    ld_email   = p_email.
      ld_mtitle = p_mtitle.
      ld_format              = p_format.
      ld_attdescription      = p_attdescription.
      ld_attfilename         = p_filename.
      ld_sender_address      = p_sender_address.
      ld_sender_address_type = p_sender_addres_type.
    Fill the document data.
      w_doc_data-doc_size = 1.
    Populate the subject/generic message attributes
      w_doc_data-obj_langu = sy-langu.
      w_doc_data-obj_name  = 'SAPRPT'.
      w_doc_data-obj_descr = ld_mtitle .
      w_doc_data-sensitivty = 'F'.
    Fill the document data and get size of attachment
      CLEAR w_doc_data.
      READ TABLE it_attach INDEX w_cnt.
      w_doc_data-doc_size =
         ( w_cnt - 1 ) * 255 + STRLEN( it_attach ).
      w_doc_data1-doc_size =
         ( w_cnt - 1 ) * 255 + STRLEN( it_attach ).
      w_doc_data-obj_langu  = sy-langu.
      w_doc_data-obj_name   = 'SAPRPT'.
      w_doc_data-obj_descr  = ld_mtitle.
      w_doc_data-sensitivty = 'F'.
      CLEAR t_attachment.
      REFRESH t_attachment.
      t_attachment[] = it_attach[].
    For 2nd Attachments
    * Fill the document data and get size of attachment
      CLEAR w_doc_data.
      READ TABLE it_attach1 INDEX w_cnt.
      w_doc_data-doc_size = w_doc_data1-doc_size +
         ( w_cnt - 1 ) * 255 + STRLEN( it_attach1 ).
      w_doc_data-obj_langu  = sy-langu.
      w_doc_data-obj_name   = 'SAPRPT'.
      w_doc_data-obj_descr  = ld_mtitle.
      w_doc_data-sensitivty = 'F'.
      CLEAR t_attachment.
      REFRESH t_attachment.
    APPEND LINES OF it_attach1 to t_attachment.
      t_attachment[] = it_attach1[].
    APPEND LINES OF it_attach1 to t_attachment.
    Describe the body of the message
      CLEAR t_packing_list.
      REFRESH t_packing_list.
      t_packing_list-transf_bin = space.
      t_packing_list-head_start = 1.
      t_packing_list-head_num = 0.
      t_packing_list-body_start = 1.
      DESCRIBE TABLE it_message LINES t_packing_list-body_num.
      t_packing_list-doc_type = 'RAW'.
      APPEND t_packing_list.
    Create attachment notification
      t_packing_list-transf_bin = 'X'.
      t_packing_list-head_start = 1.
      t_packing_list-head_num   = 0.
      t_packing_list-body_start = 1.
    DESCRIBE TABLE t_attachment LINES t_packing_list-body_num.
    DESCRIBE TABLE it_mess_att LINES t_packing_list-body_num.
      DESCRIBE TABLE it_attach LINES t_packing_list-body_num.
      t_packing_list-doc_type   =  ld_format.
      t_packing_list-obj_descr  =  'YMIS008'."ld_attdescription.
      t_packing_list-obj_name   =  'YMIS008'."ld_attfilename.
      t_packing_list-doc_size   =  t_packing_list-body_num * 255.
      APPEND t_packing_list.
      clear t_packing_list.
    for 2 attachments
      data : a type i,b type i.
       a = t_packing_list-body_num.
      t_packing_list-transf_bin = 'X'.
      t_packing_list-head_start = 1.
      t_packing_list-head_num   = 0.
      t_packing_list-body_start = a + 1. "1
    DESCRIBE TABLE it_mess_att1 LINES t_packing_list-body_num.
      DESCRIBE TABLE it_attach1 LINES t_packing_list-body_num.
      t_packing_list-doc_type   =  ld_format.
      t_packing_list-obj_descr  =  'YMIS10'."ld_attdescription.
      t_packing_list-obj_name   =  'YMIS10'."ld_attfilename.
      t_packing_list-doc_size   =  t_packing_list-body_num * 255.
      APPEND t_packing_list.
    a = t_packing_list-body_num.
    clear t_packing_list.
    * Create attachment notification
    t_packing_list-transf_bin = 'X'.
    t_packing_list-head_start = 1.
    t_packing_list-head_num   = 1.
    t_packing_list-body_start = a + 1.
    t_packing_list-body_num = t_packing_list-body_num + 1.
    DESCRIBE TABLE it_mess_att1 LINES t_packing_list-body_num.
    t_packing_list-body_num = a + t_packing_list-body_num .
    t_packing_list-doc_type   =  ld_format.
    t_packing_list-obj_descr  =  'YMIS10'."ld_attdescription.
    t_packing_list-obj_name   =  'YMIS10'."ld_attfilename.
    t_packing_list-doc_size   =  t_packing_list-body_num * 255.
    APPEND t_packing_list.
    Add the recipients email address
      CLEAR t_receivers.
      REFRESH t_receivers.
    loop at ymis008tab into mailstr.
      t_receivers-receiver = mailstr-p_email.  "ld_email.
      t_receivers-receiver = p_email1.
      t_receivers-rec_type = 'U'.
      t_receivers-com_type = 'INT'.
      t_receivers-notif_del = 'X'. "X   "Read Acknoledgement
      t_receivers-notif_ndel = 'X'.
      APPEND t_receivers.
    endloop.
       CALL FUNCTION 'SO_DOCUMENT_SEND_API1'
           EXPORTING
                document_data              = w_doc_data
                put_in_outbox              = 'X'
                sender_address             = ld_sender_address
                sender_address_type        = ld_sender_address_type
                commit_work                = 'X'
           IMPORTING
                sent_to_all                = w_sent_all
           TABLES
                packing_list               = t_packing_list
                contents_bin               = t_attachment
                contents_txt               = it_message
                receivers                  = t_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.
    Populate zerror return code
      ld_error = sy-subrc.
    Populate zreceiver return code
      LOOP AT t_receivers.
        ld_receiver = t_receivers-retrn_code.
      ENDLOOP.
    ENDFORM.
    Rgds.
    Arpit

    Hi Arpit,
    Take a look at the documentation of FM 'SO_DOCUMENT_SEND_API1' for parameter PACKING_LIST. I think you should set t_packing_list-head_num to a different value than 0 for the second attachment.
    Regards,
    John.

  • We purchased a new iPad2 and registered it using a 'new' iCloud email/ID. We are unable to send email from the iPad and iPhone. The error is: Cannot send mail. The user name or password for iCloud is incorrect.

    We purchased a new iPad2 and registered it using a 'new' iCloud email/ID. We are unable to send email from the iPad and iPhone. The error is:>> Cannot send mail. The user name or password for iCloud is incorrect.

    About ~20 hours later, this ended up solving itself. We can send email using the '.icloud' email from both the iPad and iPhone.  Advise would be 'wait' before you start seeking alteranatives like yahoo, hotmail, etc.  This definitely is a convenient way to keep all your 'cloud' information in a centralized place, including the common email...

Maybe you are looking for

  • How to get Star Wars Rebels in-app purchase to transfer to children's Family Share account?

    My wife downloaded the Star Wars Rebels game to her iphone and to the kids ipod/iphone with a different apple id.  We then purchased the full version from inside the app for $5.00.  I deleted the version on the kids phone, and went through the family

  • I installed an IDES(6.0) system. Now I am trying to install the license

    Hello to everyone I installed an IDES(6.0) system. Now I am trying to install the license.   I am logged on client 000 with user "sap*". What could be the problem. I guess I am doing right when opting for "Determine remote HW key" in transaction "sli

  • Unable to customize condition branch

    Hello, I'm having a strange issue where I want to put some content in Starter Edition "Virtual Server Post-provisioning" process which sould be allowed as this process has the "workflow" customizable flag. I've been able to add some activities but wh

  • Burns stopping at multiplex with an error. How can I fix this?

    Hi. I'm using iDVD 7.1.1 (the latest update) in Mac OS 10.6.7 on a four-year-old MacBook Pro. Lately when I burn a video, either directly or a disc image, the burn process stops at multiplexing, and an error sign appears. What could be causing this,

  • Universe Designer Hangs while saving

    Hi Experts, Universe Designer hangs while saving a universe design. Earlier it was working correctly and suddenly I am facing this issue. I restarted my system couple of times and there was no luck.  The designer application works as expected and onl