How to send an e-mail to additional recipients as CC

I have the need to code a PPF action which sends an e-mail (smartform) not only to the main recipient(s) but also to additional recipients as CC.
I am wondering if module SO_NEW_DOCUMENT_ATT_SEND_API1 does the job, but I am very skeptical.
Has someone already done it and who can share his experience?

Dear Riccardo,
the best approach for this issue is to follow the description and example of note #935670.
The general outline is as follows:
1. when calling the SF function module set parameter to get back the OTF document
*-----------get back OTF document --------------------------------------
* set 'ls_control_parameters-getotf' to get back the processed OTF
* document; OTF document is returned in 'job_output_info-oftdata'
* sending will be done in a later step
ls_control_parameters-getotf = sppf_true.
2. use class CL_BCS to send the document
There are standard example reports BCS_EXAMPLE_X  X=1..5 which shows the general usage of this class to send messages. This class is the recommended interface for SAPconnect to generate and send messages. Whenever possible, please use this class instead of outdated function modules.
3. to add a second recipient as CC use
* set recipient (mandatory)
  lo_recipient = cl_bor_object_bcs=>getu_persistent(
                        i_logsys  = is_mail_recipient-logsys
                        i_objkey  = is_mail_recipient-objkey
                        i_objtype = is_mail_recipient-objtype ).
  call method send_request->add_recipient
    exporting
      i_recipient      = lo_recipient
*      i_express        = i_express
*      i_copy           = i_copy
*      i_blind_copy     = i_blind_copy
*      i_no_forward     = i_no_forward
* set CC recipient in addition (optional)
  clear lo_recipient.
  lo_recipient = cl_cam_address_bcs=>create_internet_address(
                        i_address_string = 'your.internet.address_at_domain.com'
                        i_address_name = 'Your Visible Name'
  call method send_request->add_recipient
    exporting
      i_recipient      = lo_recipient
      i_copy           = sppf_true
That's all
Best regards, Daniel
Edited by: Daniel-Alexander Heller  on Dec 3, 2008 10:24 AM

Similar Messages

  • How to Send Appointment via mail adapter

    Hi Guys,
         I need to send the appointment and vTodo via mail adapter, any way i need to develop a mail adapter module. Till now i have finished this part,and i can send normal mail even normal mail with attachment. But i don't know how to send appointment via mail adapter.
    This is payload content of appointment which got from Exchange server to gmail:
    _=_NextPart_001_01C71EC0.97A011C6
    Content-Type: text/plain;
        charset="GB2312"
    Content-Transfer-Encoding: quoted-printable
    When: 2007=C4=EA6=D4=C227=C8=D5=D0=C7=C6=DA=C8=FD 3:30 =CF=C2=CE=E7-4:00 = =CF=C2=CE=E7 (GMT+05:30) Chennai, Kolkata, Mumbai, New Delhi.
    Where: China
    ~*~*~**
    This is calendar content
    _=_NextPart_001_01C71EC0.97A011C6
    Content-class: urn:content-classes:calendarmessage
    Content-Type: text/calendar;
        method=REQUEST;
        name="meeting.ics"
    Content-Transfer-Encoding: 8bit
    BEGIN:VCALENDAR
    METHOD:REQUEST
    PRODID:Microsoft CDO for Microsoft Exchange
    VERSION:2.0
    BEGIN:VTIMEZONE
    TZID:(GMT+01.00) Sarajevo/Warsaw/Zagreb
    X-MICROSOFT-CDO-TZID:21
    BEGIN:STANDARD
    DTSTART:20070112T140000
    TZOFFSETFROM:+0100
    TZOFFSETTO:+0100
    END:STANDARD
    BEGIN:DAYLIGHT
    DTSTART:20070112T140000
    TZOFFSETFROM:+0100
    TZOFFSETTO:+0200
    END:DAYLIGHT
    END:VTIMEZONE
    BEGIN:VEVENT
    DTSTAMP:20061213T141132Z
    DTSTART;TZID="(GMT+01.00) Sarajevo/Warsaw/Zagreb":20070112T140000
    SUMMARY:This is calendar test
    UID:040000008200E00074C5B7101A82E0080000000030D51864C81EC701000000000000000
    010000000CA9F127EA8947844BC4DD47F269BDEA9
    ATTENDEE;ROLE=REQ-PARTICIPANT;PARTSTAT=NEEDS-ACTION;RSVP=TRUE;CN="Xu, Rocky":MAILTO:rocky@***.com
    ORGANIZER;CN="Xu":MAILTO:rocky@**.com;roc*@gmail.com
    LOCATION:Shanghai
    DTEND;TZID="(GMT+01.00) Sarajevo/Warsaw/Zagreb":20070112T160000
    DESCRIPTION:This is calendar content\N
    SEQUENCE:0
    PRIORITY:5
    CLASS:
    CREATED:20061213T141132Z
    LAST-MODIFIED:20061213T141133Z
    STATUS:CONFIRMED
    TRANSP:OPAQUE
    X-MICROSOFT-CDO-BUSYSTATUS:BUSY
    X-MICROSOFT-CDO-INSTTYPE:0
    X-MICROSOFT-CDO-INTENDEDSTATUS:BUSY
    X-MICROSOFT-CDO-ALLDAYEVENT:FALSE
    X-MICROSOFT-CDO-IMPORTANCE:1
    X-MICROSOFT-CDO-OWNERAPPTID:367904726
    X-MICROSOFT-CDO-APPT-SEQUENCE:0
    X-MICROSOFT-CDO-ATTENDEE-CRITICAL-CHANGE:20061213T141132Z
    X-MICROSOFT-CDO-OWNER-CRITICAL-CHANGE:20061213T141132Z
    END:VEVENT
    END:VCALENDAR
    _=_NextPart_001_01C71EC0.97A011C6--
    My question is
      1. How to generate this kind of payload in mail adapter module?
      2. It is possible to send appointment via mail adapter?
    Following i can get from other system, even using mail package check or not using mail package check.
    BEGIN:VCALENDAR
    METHOD:REQUEST
    PRODID:Microsoft CDO for Microsoft Exchange
    VERSION:2.0
    BEGIN:VTIMEZONE
    TZID:(GMT+08.00) Kuala Lumpur/Singapore
    X-MICROSOFT-CDO-TZID:21
    BEGIN:STANDARD
    DTSTART:16010101T000000
    TZOFFSETFROM:+0800
    TZOFFSETTO:+0800
    END:STANDARD
    BEGIN:DAYLIGHT
    DTSTART:16010101T000000
    TZOFFSETFROM:+0800
    TZOFFSETTO:+0800
    END:DAYLIGHT
    END:VTIMEZONE
    BEGIN:VEVENT
    DTSTAMP:20070608T025852Z
    DTSTART;TZID="(GMT+08.00) Kuala Lumpur/Singapore":20070608T110000
    SUMMARY:This is meeting request with attachment
    UID:040000008200E00074C5B7101A82E0080000000000A9BD0BA7A9C701000000000000000
    010000000C5E16D144D1612498C0EF7E2115EFEC4
    ATTENDEE;ROLE=REQ-PARTICIPANT;PARTSTAT=NEEDS-ACTION;RSVP=TRUE;CN="Xu, Rocky
    ":MAILTO:roc*@**
    ORGANIZER;CN="Xu,y":MAILTO:roc*@**
    LOCATION:India labs
    DTEND;TZID="(GMT+08.00) Kuala Lumpur/Singapore":20070608T113000
    DESCRIPTION:This is content!  <<shanghai.txt>> \N
    SEQUENCE:0
    PRIORITY:5
    CLASS:
    CREATED:20070608T025925Z
    LAST-MODIFIED:20070618T033505Z
    STATUS:CONFIRMED
    TRANSP:OPAQUE
    X-MICROSOFT-CDO-BUSYSTATUS:BUSY
    X-MICROSOFT-CDO-INSTTYPE:0
    X-MICROSOFT-CDO-INTENDEDSTATUS:BUSY
    X-MICROSOFT-CDO-ALLDAYEVENT:FALSE
    X-MICROSOFT-CDO-IMPORTANCE:1
    ATTACH:CID:008501c7b159$a9d41d3b$_CDOEX
    X-MICROSOFT-CDO-OWNERAPPTID:1468557271
    X-MICROSOFT-CDO-APPT-SEQUENCE:0
    X-MICROSOFT-CDO-ATTENDEE-CRITICAL-CHANGE:20070608T025852Z
    X-MICROSOFT-CDO-OWNER-CRITICAL-CHANGE:20070608T025852Z
    END:VEVENT
    END:VCALENDAR
    Thanks & regards
    Rocky

    Hi
    have a look at this
    You can use Java/ABAP proxies to do this job for you..
    Java Proxy >> will read the mail(with the attachments) with the help of Java APIs and send the message into XI ABAP Proxy >> for this you will have to first convert the attachment into a message and then you can proceed in the regular fashion.
    Not all adapters can process attachments, I'm not sure why you are having trouble with using module processor in the mail adapter. Just check if the service pack that you are using supports this feature.
    If you are on WAS 6.10 and above you can achieve this and there is an excellent weblog by Thomas Jung on this topic at
    /people/thomas.jung3/blog/2004/09/09/receiving-e-mail-and-processing-it-with-abap--version-610-and-higher
    https://www.sdn.sap.com/irj/servlet/prt/portal/prtroot/docs/library/uuid/6d967fbc-0a01-0010-4fb4-91c6d38c5816
    reading Pdf Through mail easly done with Java Proxy, which will read the mail(with the attachments) with Java APIs and send the message into XI and then map with the Target ABAP proxy structure .
    Thanks

  • In iCloud, how to send an e-mail to a group of contacts, once I've created the group?

    I have created a group  from my iCloud contacts, but do not see how to send an e-mail message to this group.
    The help topics don't go this far.  Can anyone help?

    Thanks Winnie;  but why didn't that work when I typed in the whole title of the group?   Just the 1st 2 letters did the trick.
    Over & out

  • How to send HTML Format Mail using Java Mail in oracle 9i Forms

    Dear All
    could you please tell me how to send HTML Format Mail using Java Mail in oracle 9i Forms and how to implement the java mail ?
    if it is possible, could you please send me the sample code? please very urgent
    Thanks
    P.Sivaraman

    Hello,
    <p>Here is a Form sample.</p>
    Francois

  • How to send an encryted mail

    Hi all,
             I have an issue. How to send an encrypted mail using smartform output.
    I am using the output from smartform and converting it to pdf and then sending that pdf as attachement through mail. But before sending,  i have to encrypt the contents of the mail. Plz anybody know the solution for this issue?

    check this link...
    http://help.sap.com/saphelp_nw04/helpdata/en/4e/c153426da9bd30e10000000a155106/content.htm
    Encrypt.?
    How to Encrypt?

  • How to send birthday wish mail to Employees on daily basis

    Hi ,
    How to send birthday wish mail to employee with greeting card as background image in Mail Content area.
    Is there any Standard program available in SAP.
    _Requirement:_
        Normal , Birthday Wish mail can be done through function module SO_NEW_DOCUMENT_SEND_API1.
        How to write program for getting , Greeting card as background image in Mail Content area.
        Is there solution in SAP .
    Regards
      Surendar

    Hi,
    Check this for embedding image in your email : Using CL_BCS to send email from ABAP
    And this about image as background and other related stuff : http://www.reachcustomersonline.com/2010/01/23/09.27.00/#faqs
    Best regards,
    Guillaume

  • How to send Deadline Monitoring mails to an external mail (LOTUS NOTES)?

    Hi all,
    1. I know how to send Deadline Monitoring mail to an SAP INBOX. But i need to send the deadline monitoring mail to an external email address (LOTUS NOTES or any other email id).
    2. If i am able to send Deadline monitoring mail to the external email address. It will send mail only once but, How to send these deadline monitoring mails for every 3 days until the approver takes some action.
    Please help me...
    Regards,
    Gautham P

    The easy solution is to set up automatic forwarding for everyone by defining the system as NOT being your e-mail system. I don't know where this setting is (the Basis people did it), but with this setting SAP will forward every user's e-mail to the e-mail address in the user record.
    For repeated sending I think you have to use modelled deadlines. Send the deadline message using a normal mail sending step and loop after calculating the new deadline. (i.e. you need to store the deadline in the container and refer to the container elements in your deadline specification.) The deadline calculation can either be a separate step or you can do it as a secondary method in the mail sending step.

  • How to: Send out e-mails through a 3rd party mail host?

    Hi,
    We would like to send out e-mail campaign from our CRM system.
    But we would not like to risc being blacklisted as spammer, so we would like to send out the e-mails using a 3rd party mail host provider.
    Our sales department already use our CRM system for sending out their sales related e-mails.
    They use our corporate exchange server for that.
    So the scenario is:
    I have created a smtp node in trx scot, and liked it to our domain *company.com
    This node points to our corporate mail host. All our normal users use this domain.
    All our campaign e-mails from CRM should be send using another mail host as described before.
    According to note 455140, I don't see that I can create a new smtp node in scot.
    And link this one to our new e-mail domain *company-news.com and the external mail host.
    How do I send these e-mails to a specific mail host when the sender is a specific domain e.g. company-news.com?
    My Exchange server guys say that they can't redirect specific mails send from our CRM system.
    They can only redirect all mails that are send from our CRM system, but then all the e-mails from our sales reps are also send through a 3rd party mail host.
    Does anyone have battled with this before, and how did you solve it?
    best regards
    Michael Wolff Knudsen

    We bought a new Exchange server, version 2007 just for CRM. This Exchange version can tunnel the e-mail to our 3rd party vendor, and they can send out the e-mails so neither one of us gets spammed.

  • How to send an e-mail to multiple sharepoint groups in a SP2013 workflow

    I'm trying to create a workflow in designer 2013 that sends an e-mail to multiple users bases on a few sharepoint groups.
    However if a user is member of 2 sharepoint groups he/she will appear twice in the "to field" of the e-mail.
    Any suggestions on how to solve this would be much appreciated.
    Thank you

    Hi Jan,
    According to you description, my understanding is that you want to send email to user who exist in two groups once using workflow.
    If a user exist in the group, the email workflow will send the mail to the member in the group, it is reasonable.
    As a workaround, I suggest you send mail to the specific user independently and then create a new group without the repeat user, then you can send mail to the new group.
    More information:
    Create new user group in SharePoint 2013:
    http://plexhosted.com/billing/knowledgebase/279/How-to-create-new-SharePoint-2013-users-group-and-add-users-to-it-.html
    Best Regards
    Forum Support
    Please remember to mark the replies as answers if they help and unmark them if they provide no help. If you have feedback for TechNet Subscriber
    Support, contact [email protected]
    Zhengyu Guo
    TechNet Community Support

  • How to send automatic "reminder mails" after certain time

    Hi Experts,
    There is a problem which I am not able to solve, Please help !
    Requirement: 1. After the creation of a certain task, a mail should go to the user... this I have done using the Java Mail API.
    *2. After 2 days if the user don perform certain task, a reminder mail should be send to him EVERYDAY after the INITIAL 2 days.*
    how to achieve this in the Java mail.. I have heard of Java mail Schedulers but I am not able to find it.. If you can give me some guide or some steps or some article for this I would be very very gratefu to you.
    Please treat it as urgent and give your valuable suggestions.
    Thanx in advance.
    Regards,
    Rajat

    Nope. It means that if you want to schedule something, use code which does scheduling. Like Quartz for example. Bear in mind that the "something" in this case would involve sending an e-mail, but your scheduler wouldn't care about that.

  • How to send an e-mail?

    Hi.
    I'd be very happy if someone can help me.
    I'm developing a desktop application in (J2SE). Because of better debugging it would be very useful to send an "Error message" to my e-mail whenever an exception occures. How can I do that?

    open a socket to a SMTP server, and send your mail message there.
    a quick hack i wrote a couple of month ago looked like this:
         * sends a (raw) Mail-Message over smtp-protocol.
         * @param serverAddress server to use for transportation
         * @param serverPort port of the server
         * @param sendingDomain domain to send under
         * @param senderAddress address of the sender
         * @param recipientAddress address to send the mail to
         * @param data raw-text of the message
         * @author Theos
        static public void sendMessage( String serverAddress, int serverPort,
                                        String sendingDomain, String senderAddress, String recipientAddress,
                                        String data)
                                        throws UnknownHostException, IOException {
            Socket mailSocket = new Socket(serverAddress, serverPort);
            BufferedReader in = null;
            OutputStreamWriter out = null;
            String line = null;
            //data-packs to send to server
            String[] sent = {   "HELO " + sendingDomain,
                                "MAIL FROM: " + senderAddress,
                                "RCPT TO: " + recipientAddress,
                                "DATA",
                                data};
            int i = 0;
            try {
                in = new BufferedReader(new InputStreamReader(mailSocket.getInputStream()));
                out = new OutputStreamWriter(mailSocket.getOutputStream());
                if((line = in.readLine()).startsWith("220")) {
                    //connected & ready to send
                    do {
                        out.write(sent);
    out.write("\r\n");
    out.flush();
    //if data-msg was sent, dont expect a 250-OK but 354-msg
    if(sent[i] == "DATA" && (line = in.readLine()).startsWith("354")) {
    i++;
    out.write(sent[i]);
    out.write("\r\n");
    out.flush();
    out.write(".\r\n");
    out.flush();
    i++;
    } while ((line = in.readLine()).startsWith("250") && i < sent.length); //250 == OK
    out.write("QUIT\r\n");
    } finally {
    //close streams
    if(in != null)
    try {
    in.close();
    } catch (IOException e) { }
    if(out != null)
    try {
    out.close();
    } catch (IOException e) { }
    try {
    mailSocket.close();
    } catch (IOException e) { }
    //not all was sent
    if(i != sent.length)
    System.err.println("error sending '" + sent[i] + "': '" + line + "'");
    * sends a Mail-Message over smtp-protocol.
    * @param serverAddress server to use for transportation
    * @param serverPort port of the server
    * @param sendingDomain domain to send under
    * @param senderAddress address of the sender
    * @param recipientAddress address to send the mail to
    * @param senderName name of the sender
    * @param subject subject of the message
    * @param recipientName name of the recipient
    * @param text text to mail
    * @author Theos
    static public void sendMessage( String serverAddress, int serverPort,
    String sendingDomain, String senderAddress, String recipientAddress,
    String senderName, String subject, String recipientName, String text)
    throws UnknownHostException, IOException {
    StringBuilder data = new StringBuilder();
    data.append("From: "); data.append(senderName); data.append("\r\n");
    data.append("Subject: "); data.append(subject); data.append("\r\n");
    data.append("To: "); data.append(recipientName); data.append("\r\n");
    data.append(text);
    sendMessage(serverAddress, serverPort, sendingDomain, senderAddress, recipientAddress, data.toString());
    you might wana overwork it tho...

  • How to send an e-mail when the logger produces a severe error ?

    All,
    I'm using ADF Logger, and I wonder if there is the possibility to make the WLS to automatically send an e-mail when an error occurs.
    I've heard that that would be possible using log4j; would you mind to share some know-how ?
    Regards,
    Sergio

    Sergio,
    you better ask this here {forum:id=570} or {forum:id=729}
    Timo

  • How to send a E-mail Reminder to a particular user from a Tasks Calendar

    I have created a calendar in my Sharepoint site and have added some Training sessions to that calendar. My Requirement is to send an E-mail to a Particular user before 3 days from the Training session date. I have created a workflow using Sharepoint Designer,
    but it is not sending the e-mail before 3 days. Can you please tell me how to create a workflow for this scenario and if possible please give me the condition and Action needs to be provided for the workflow
    Thanks in Advance

    Thanks a lot for ur replies
    I tried with the above SP Workflow and it doesn't work for me. I am not getting the mail. This what i did,
    I have calendar for training in Sharepoint -> I added a training session to the Calendar on todays date and Start and End time is set as 1.05 pm- 2.05 pm -> I saved the event in my Calendar
    Then i selected the Calendar in the "List Workflow" option in Sharepoint Designer and i created a Workflow in Sharepoint which i named it as "Sample Workflow". Here i created a Action as given below,
    Inserted Do Action:
    Calculate (Current Item:Start Time:Returned as Number of Seconds) (minus) (180) (Output to Variable:calc)
    Inserted Pass until Date Action:
    then Pause until Variable: calc
    Inserted Send by E-mail Action
    then E-mail (Specific user)
    I saved and Published the above workflow. I waited for the mail 3 minutes before the Start time and i didn't receive any mail. I have also selected all the Start options in the Workflow
    settings
    I even tried another Action and that too doesn't work for me,
    Inserted Add time to Date Action:
    Add 1minute to
    Current Item:Start time (Output to Variable: Created a new variable by giving some name)
    Inserted Pass until Date Action:
    then Pause until Variable: New Variable name selected
    Inserted Send by E-mail Action
    then E-mail (Specific user)
    Please give me a solution to fix this issue and make this work
    Thanks in Advance

  • How to send 1st e-mail attachment

    When trying to send 1st e-mail attachment I am given a form to put e-mail address.  I put my own e-mail and get message that code is not correct

    I have never done this but you can try
    http://download.oracle.com/docs/cd/B19306_01/appdev.102/b14258/u_mail.htm#i1001532
    Send emails with pdf
    Send emails with pdf
    UTL_SMTP to send attachment
    Re: UTL_SMTP Mail Attachment
    how to send mail with attachment

  • How to send deliveries via mail to customers?

    Hi gurus, how are you doing? I really need your help and guidance to know how to send deliveries after doing the PGI to the customer vía mail.
    Could you please tell me what are the steps to set up the mailing function and the requirements involved?
    Cheers and as usual thank you very much for your help!!!!

    Hi Lorena,
             1.  Yes you can do for any output, you go to SPRO > IMG> Logistics Execution--> shipping ---> Basic shipping functions > output control> output determination --> maintain output detemination for outbound deliveries -->Maintain output types --> select which output you want, click on Processing routines it will take you next screen, there you need to enter  Transm.medium as mail.
    Enter the Program and Form routine.
    2. IF you want send mail after PGI for a perticular output type you need to maintain Routine '1' in output determination procedure at Requirement column.
    3. Yes you need abaper help to Enter the Program and Form routine in the Processing routines .
    4. Yes you need to maintain mail ID at Shi-to-Party master data.
    I hope you are clear,
    Regards,
    Murali.

Maybe you are looking for