Skip to Content
avatar image
Former Member

Send mail with PDF attachment not correct for multiple address

Hello all,

When i try to send mail for multiple address and not correct in case there is one wrong address

(In my case the email address contain some chinese character ).

Ex: i have 10 address need to be sent and the number 5 is wrong then the address number 6 to 10 can not be sent although they are correct.So, I just send only from address 1 to 5.

My current FM is SO_NEW_DOCUMENT_SEND_API1. But i tried the class send mail BCL and i got same issue.

So, i tried to validate to avoid wrong address with FM : SX_INTERNET_ADDRESS_TO_NORMAL and i got issue that quite similar to issue send mail above.( if the address number fine is wrong then the address from 6 to 10 return with sy-subrc <> 0 although these address are correct).

Could you have me how to resolve this issue ?

Thank you so much.

Regards,

Tan Tai

Add comment
10|10000 characters needed characters exceeded

  • Follow
  • Get RSS Feed

3 Answers

  • Best Answer
    avatar image
    Former Member
    Apr 04, 2016 at 11:15 AM

    Hi,

    When you have E-mail address in Chinese, Did you try to pass Language as Chinese? May be it can work. I am not sure how you are getting mail address.But if you are using select for tables, You can link language details using tables ADRP and USR21.

    Thanks,

    Hardik

    Add comment
    10|10000 characters needed characters exceeded

    • Former Member Former Member

      Hi Hardik Patel,

      I tried to duplicate issue in other system and it worked fine. Mybe after EHP7 upgrade cause this.

      I tried to delete all email contain chinese chracters out of customer for temporary solution.

      Thanks for your help.

  • avatar image
    Former Member
    Mar 30, 2016 at 02:08 AM

    Can you share your code for this part so we can check?

    I assume you are looping the receiver internal table to validate each email address. If only address 5 is wrong, then check if you clear every value you pass to FM. Sample:

    DATA: receiver TYPE SX_ADDRESS.

    LOOP AT table_reciever INTO wa_reciever.

    receiver-type = 'INT'.

    receiver-address = wa_reciever-email_address.

    CALL FUNCTION 'SX_INTERNET_ADDRESS_TO_NORMAL'

    EXPORTING

    address_unstruct = receiver

    EXCEPTIONS

    ERROR_ADDRESS_TYPE = 1

    ERROR_ADDRESS = 2

    ERROR_GROUP_ADDRESS = 3

    OTHERS = 4.

    IF sy-subrc EQ 0. "Email is valid

    "Pass to new table the valid email address

    APPEND wa_reciever TO valid_reciever.

    ENDIF.

    CLEAR: receiver, wa_reciever.

    ENDLOOP.

    Add comment
    10|10000 characters needed characters exceeded

    • Former Member

      Hello Elzkie La,

      I did a example like yours. But in my wrong address number contain some chinese characters

      like : abcdef@sdec.com.cn (收获联系人) then all the address follow this will be check with sy-subrc <> 0 (Funtion module not working).

      If the address be wrong without chinese characters then all address follow will be check correct.

      I guest the reason because of chinese character. But i do not know how to restrict this.

      Thanks,

      TanTai

  • avatar image
    Former Member
    Apr 04, 2016 at 10:39 AM

    Hello all,

    Can anybody help me ?

    As i removed all the error emails then program will send many more email, but we can not send to all emails. i do not know why ?

    I do not know whether SAP config restrict the quantity email send out or not.

    Thanks,

    TanTai

    Add comment
    10|10000 characters needed characters exceeded