2007 Sep 06 6:48 AM
Hello all,
I am using ole to send mail.The mail is sent properly but a popup appears before sending the mail saying that a program is trying to send mail on your behalf..and prompting for a yes or no.If yes is opted then the mail is sent . I want to suppress this popup,can anybody help?
Regards,
Niky.
Hello all,
I am using ole to send mail.The mail is sent properly but a popup appears before sending the mail saying that a program is trying to send mail on your behalf..and prompting for a yes or no.If yes is opted then the mail is sent . I want to suppress this popup,can anybody help?
Regards,
Niky.
2007 Sep 06 6:56 AM
HI,
USE THIS FM
SO_NEW_DOCUMENT_ATT_SEND_API1
reward if helpful
thanks
vivekanand
2007 Sep 06 6:56 AM
You can use this FM :SO_NEW_DOCUMENT_SEND_API1 in ABAP to send email to external emails.
See the below sample code
email_data-obj_name = 'MESSAGE'.
email_data-obj_descr = title.
email_data-obj_langu = 'E'.
email_data-sensitivty = 'P'.
email_data-obj_prio = '1'.
email_data-no_change = 'X'.
email_data-priority = '1'.
loop at username.
email_send-receiver = username-id.
email_send-rec_type = ' '. " Sap user.
email_send-express = 'X'. " Pop up SAP dialogue
* email_send-to_answer = 'X'.
append email_send.
endloop.
loop at message.
data_tab-line = message-text.
append data_tab.
endloop.
call function 'SO_NEW_DOCUMENT_SEND_API1'
exporting
document_data = email_data
document_type = 'RAW'
put_in_outbox = 'X'
tables
object_content = data_tab
receivers = email_send
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 <> 0.
write: / 'Error in sending mail to ', username.
endif.Regards
Gopi
| User | Count |
|---|---|
| 3 | |
| 2 | |
| 2 | |
| 1 | |
| 1 | |
| 1 | |
| 1 | |
| 1 | |
| 1 | |
| 1 |