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

Sending external mail using SO_NEW_DOCUMENT_ATT_SEND_API1

former_member282968
Contributor
0 Likes
2,484

When i use this RFC by appending the internal table receiver with receiver: sapuser name and rec_type B it triggers mail to the sap user login .But when i give external email address for receiver with rec_type 'U' it is not triggering any mail.Can anyone please tell me how to use this RFC in sending external mails??

1 ACCEPTED SOLUTION
Read only

Former Member
0 Likes
2,026

Hello,

I remember that I had the same issue. Lots of trial and error and I found the following which worked.

If you give external email address for receiver then use rec_type 'INT'.

Good luck

Karsten

When i use this RFC by appending the internal table receiver with receiver: sapuser name and rec_type B it triggers mail to the sap user login .But when i give external email address for receiver with rec_type 'U' it is not triggering any mail.Can anyone please tell me how to use this RFC in sending external mails??

15 REPLIES 15
Read only

Former Member
0 Likes
2,026

Check the return code of function module. If no errors occured while sending mail using FM do the following.

Check with basis colleagues if they have configured the mail.

If mail is configured then check in transaction code SOST if the mail got struck.

Read only

0 Likes
2,026

Sudhakar thanks for the answer.I checked in the SOST transaction.

Here for the send requests , status is green for some with msg 73 and for some its yellow with message with msg 672.

Read only

0 Likes
2,026

If you see green message with status 73 the mail is sent successfully. Sometimes the mail goes into Junk Mail. Check it also if you don't find it in your inbox.

Status 672 means the mail is not sent. Usually basis consultants either allows the message delivery or some times they schdule background jobs which pick up these mails & send to mail receipients. If you want to send the message manually you can select the message & click on execute button.

Read only

Former Member
0 Likes
2,026

Hi,

there is a Filter kept by Basis people to restrict mail to external user in cases like HR data or FI data.

So always better to check Baiss people about the gateway or Port restricted to external mail-id.

Prabhudas

Read only

Former Member
0 Likes
2,027

Hello,

I remember that I had the same issue. Lots of trial and error and I found the following which worked.

If you give external email address for receiver then use rec_type 'INT'.

Good luck

Karsten

Read only

0 Likes
2,026

Sudhakar..Thanks for the inputs..But though it says successfull i havent recived the mail..

Karsten...Is it rec_type or com_type...

Still its not sending external mails...i have tried all things replied by u guys..please help me

Read only

0 Likes
2,026

Hello Naveen,

You can also try the following two things:

-> Goto transaction SCOT. There select the node INT, double click it and put * in the field

-> Also, if possible, goto SU01 transaction and remove the email id if mentioned from your user address data.

Hopefully, the things should work after this.

Please let me know if they work or not.

Thanks/Regards,

Himanshu

Read only

0 Likes
2,026

Thanks HImanshu,

I checked SCOT and configuration seems to be OK...* is there in the set of INT..SMTP is in green ..domain name is mentioned too and i am passing e-mail address explicitly from the program through reciver with rec_type U..com_type 'INT'

Read only

0 Likes
2,026

I went back and you are right "INT" was not the REC_TYPE it was the COM_TYPE.

Sorry for any confusion caused.

However,

I suggest 2 more tests and then I give up and can not think about anything else.

Try:

#1

REC_TYPE = 'X'.

if it does not work.

#2

REC_TYPE = 'R'.

Hope that will do the trick. I was trying a lot when I had to get that working some time ago.

And surely the other colleagues point to something which must be setup as well. Transaction SCOT the SMTP settings.

Furthermore there could be another issue. I remember that I worked at a client who had turned off the send settings on their email server. So SAP finished everything and handed the emails on to a mail server. The mail server had a setting to block any emails from the development environment.

So that might be another cause of your issue.

Read only

0 Likes
2,026

pass the parameter PUT_IN_OUTBOX = 'X' and check the status of the mail from your sap mail box in SBWP transaction.

Or pass your sap id in the same mail's distribution list and check the status of the mail in ur sap mail box.

Read only

0 Likes
2,026

Karsten Thank you so much for your inputs

I think REC_TYPE should be 'U' for internet

'X' for x.400 address

'R' for SAP user in another SAP system

Thanks Gopal...i have made put_in_outbox = 'X'.

Karsten ...What i observed is mail is triggering only for default domain in SCOT not to any other external mail id..I think as u said some config settings which i am not sure...

Read only

0 Likes
2,026

If i have to send CC mail using this RFC ..what parameters i need to pass ???

Any particular configuration settings for external mail ID's????

Read only

0 Likes
2,026

Hi,

To send it in cc you need to pass it as ADR_FLG = 'C'.

Also check for the SCOT settings.

-Keerthi

Read only

0 Likes
2,026

thanks

Read only

0 Likes
2,026

Thanks all for all your help..My code is working!!