Application Development and Automation Discussions
Join the discussions or start your own on all things application development, including tools and APIs, programming models, and keeping your skills sharp.
cancel
Showing results for 
Search instead for 
Did you mean: 
Read only

Send mail

Former Member
0 Likes
777

Hi All,

I wrote a program to mail an text attachment to an external mail id. I can see the mail in the SAP outbox, but the mail hasn't reached the recepient. Even if I see in so02 I can see it as Document sent. How do I check wether it has been failed or not. Even the fm returns 0.

I am not sure if any ntework issues will hamper the mail.

Regards,

Varun.

1 ACCEPTED SOLUTION
Read only

abdul_hakim
Active Contributor
0 Likes
737

Hi

just check whether valid RFC destination exists for your mail sever using SM59.Also check with your BASIS in this regard..

Cheers,

Abdul

7 REPLIES 7
Read only

abdul_hakim
Active Contributor
0 Likes
738

Hi

just check whether valid RFC destination exists for your mail sever using SM59.Also check with your BASIS in this regard..

Cheers,

Abdul

Read only

sridhar_k1
Active Contributor
0 Likes
737

Check the status of the send mail in transaction SOST, if SMTP no configured, configure in SCON

If u've used SO_NEW_DOCUMENT_SEND_API1 to send mail, make sure Commit work parameter set to X.

Regards

Sridhar

Message was edited by: Sridhar k

Read only

Former Member
0 Likes
737

HI,

see the code below..

CALL FUNCTION 'SO_NEW_DOCUMENT_ATT_SEND_API1'

EXPORTING

document_data = document_data

put_in_outbox = 'X'

commit_work = 'X'

TABLES

packing_list = it_packing_list

contents_txt = it_contents_txt

contents_bin = it_contents_bin

receivers = it_receivers

EXCEPTIONS

too_many_receivers = 1

document_not_sent = 2

operation_no_authorization = 4

OTHERS = 99.

IF sy-subrc EQ 0.

<b> SUBMIT rsconn01 WITH mode = 'INT' AND RETURN.</b>

ENDIF.

so, just write the SUBMIT after the SY_SUBRC.

or else you need to check the SCOT trnsaction code wether the Mail has delived or not, so instead of the SCOT , just write the line which is in BOLD,

Please close this if you got answer

Thanks

Sudheer

Read only

0 Likes
737

In many development and test ambients mail delivery is closed, becose users caould recieve mails when you are testing your programs. If that is the case, a SUBMIT like Sudheer says could be really dangerous... all the stopped mails will be sended.

Regards.

Read only

0 Likes
737

Hi all,

peluka, Thank you very much for the information.

All of you thank you very much for the quick and prompt responses.

Regards,

Varun.

Read only

Former Member
0 Likes
737

Check if RECEIVER-RETRN_CODE = 0 or not after the function module.

Also check if the exception DOCUMENT_NOT_SENT is being raised or not.

Regards,

Ravi

Read only

Former Member
0 Likes
737

HI,

I hope your SMTP is not configured

Go to tcode SCOT

Choose the node SMTP

There configure the relevant data

Next in INTERNET button,

enter the domains to which u can send mail.

Thanks,

Pramod