Skip to Content
author's profile photo Former Member
Former Member

Problem with sending single e-mail to many ids at a time

hi gurus,

My requirement is to send a single e-mail to many users in TO and COPY.

The problem is the e-mails are going to each user as a separate new mail.

I used the below code to send e-mail to multiple users.

LOOP AT gt_emailid.

gt_receivers-receiver = gt_emailid-id.

gt_receivers-rec_type = 'U'.

gt_receivers-express = c_marked.

gt_receivers-com_type = 'INT'.

gt_receivers-notif_del = c_marked.

gt_receivers-notif_ndel = c_marked.

gt_receivers-copy = gt_emailid-cc.

APPEND gt_receivers.

ENDLOOP.

CALL FUNCTION 'SO_DOCUMENT_SEND_API1'

EXPORTING

document_data = wa_doc_data

put_in_outbox = c_marked

commit_work = 'X'

IMPORTING

sent_to_all = gv_sent_all

TABLES

packing_list = gt_packing_list

contents_bin = gt_attachment

contents_txt = p_message

receivers = gt_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.

please suggest any solution for this.

Rambo

Add a comment
10|10000 characters needed characters exceeded

Assigned Tags

Related questions

1 Answer

  • Posted on Jun 18, 2008 at 05:26 AM

    Hi,

    SO_NEW_DOCUMENT_ATT_SEND_API1

    (In 4.6C only, You can go to SE37 and click the documentation on how to use it. A sample program is provided there.)

    Send new document with attachments via RFC

    Note : If you are using FM SO_NEW_DOCUMENT_ATT_SEND_API1 then Export Parameter DOCUMENT_DATA-OBJ_DESCR contains the Subject.

    SO_NEW_DOCUMENT_SEND_API1

    Send new document

    Also have a look below links for sample code:

    http://www.sap-img.com/abap/sending-email-with-attachment.htm

    http://www.thespot4sap.com/Articles/SAP_Mail_SO_Object_Send.asp

    I hope it helps.

    Regards,

    Bhanu.

    Add a comment
    10|10000 characters needed characters exceeded

Before answering

You should only submit an answer when you are proposing a solution to the poster's problem. If you want the poster to clarify the question or provide more information, please leave a comment instead, requesting additional details. When answering, please include specifics, such as step-by-step instructions, context for the solution, and links to useful resources. Also, please make sure that you answer complies with our Rules of Engagement.
You must be Logged in to submit an answer.

Up to 10 attachments (including images) can be used with a maximum of 1.0 MB each and 10.5 MB total.