Application Development 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: 

Check whether the email from SAP has been sent

Former Member
0 Kudos

Hello,

I have developed a requirement where my program will send a PDF document to the external mail id.

Through the program we can set the variables to get the acknowledgement ,which is fine,

But my client is asking, how to get the failure delivery notice which means it could be wrong email id address or

some other problem due to which the email has not been sent,

So the user who runs the report has to get the failure delivery notice same as acknowledgement. (Acknowledgement part I have worked on). Kindly let me know your views on this please.....

I am using SO_DOCUMENT_SEND_API1 function module.

Thanks,

Archana

14 REPLIES 14

former_member320332
Contributor
0 Kudos

Hi Archana,

You will get the sent mail status in SOST tcode.

Regards,

Pawan

0 Kudos

Hello,

In SOST we can see the status...but its job is to send the mails out from SAP.

It will just validate the email domain (like @gmail.com...etc). If that is exists then it will consider as a correct email id and send out from the queue,even though we give the wrong email address. (which is before @ ) and the message says mail sent successfully.

But in my case,if the email address is wrong, and after sending the mail from SOST to middleware or outside the SAP, then

the failure delivery notice has to come to SAP Inbox or email id from which the mail has gone.

In SCOT ,from the menu Setting, we have confirm receipt option which should be enable if we want the return receipt when it

is successfull, but incase failure there are no settings avaliable.....

Please let me know if you find anything more

0 Kudos

Hi!

If the mail has been sent (normally done by a job in a specific period), the mail will be forwarded by a mail server of your company. Ih the receiver is unknown, the sender will get the information.

If your sender in the FM is an internet adress (type "U"), he should get this information automatically, but there is nothing more you can do in your program, because the sending time will be anytime in the future ...

Regards,

Klaus

0 Kudos

hi,

I have given sender address pf type U also, still not working

0 Kudos

Hi AV,

Go to Transaction SBWP and Create a new Mail. In the recipient list, select External mail address and Give any user ID an Send the mail.

Then check the transaction SOST. You can check the Status here. If it is a SCOT configuration, then you will get the status using transaction SOST.

In the workflow point of view, Some configuration's are needed in Transaction SWU3 to sen mail. Im not sure about the FM.

Thanks,

Viji.

0 Kudos

I had a similar problem. I beleive the solution we are going to look at is the SMTP server receiving the failed delivery message back.

The sender email address will be <yourcompany>@<someplace>.com. The recipients will differ. A failed delivery message will be sent back to <yourcompany>@<someplace>.com. The SMTP server can then be set to forward these emails to specific users in your company.

0 Kudos

Hi,

I try to send a mail to a wrong reciptant but I got msg 872 in SOST( Reciptant is Unknown).

Please note I send the mail in the same domain, may be this is the resone I got this status,

Please check from your side.

Thanks,

Anmol

0 Kudos

I am giving wrong email address with the correct domain, and processed from SOST, then it says successfully sent with the message number 712. Please advice

0 Kudos

I have written SUBMIT RSCONN01 statement also...no luck

Former Member
0 Kudos

Hi!

You might check out the SapConnect transaction SCOT as well, maybe you can use this.

Regards

Tamá

Former Member
0 Kudos

Hi Archana,

Thanks for posting this query .

I am also looking for a solution if email id is wrong.

Regards,

Vengal Rao.

tushar_shukla
Active Participant
0 Kudos

After FM 'SO_DOCUMENT_SEND_API1' call you can send the email immediately by calling the report RSCONN01 . This report has a selection scree parameter OUTPUT , if this has been set to X , the result will be send to basic list .

Here is sample code

   
 WAIT UP TO 1 SECONDS.
      SUBMIT RSCONN01 WITH MODE = 'INT'
             WITH OUTPUT = 'X '
             AND RETURN.

- Tushar Shukla

0 Kudos

Hi Tushar,

The report program " RSCONN01 " is generally used in place of SOST . It is used if we want to send emails automatically instead of eveytime going to executing SOST. I am using the same program to execute the email and send in background.

By selecting 'X' the spool is generated like successful or not.

But will this spool is send to the email Sendor?

Thanks,

Vengal Rao.

kesavadas_thekkillath
Active Contributor
0 Kudos

I donot know whether this fm has any flag which indicates the failure. But you can use the BCS classes and methods where you can capture the failure in the method send .

For example in this thread check reply given by Aaron Morden.

Note the part


  sent_to_all = send_request->send( ).
  IF sent_to_all = 'X'.   "if not equal to X then failed
    MESSAGE i022(so).
  ENDIF.

For exmples you can goto se38 and search for bcsexample . Its better than this function module because this fm doesnot support all the codepages.