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: 

How to achieve email ID validations (for Multiple Recipients)

Former Member
0 Kudos

How to achieve Multiple email ID validations (Recipients) .

I have developed one application for sending mail using CL_BCS class.  Now i want to validate email ID

(for Multiple Recipients) . << Urgency Removed >>

Message was edited by: Kesavadas Thekkillath

11 REPLIES 11

Former Member
0 Kudos

Hello Padma,

Try FM SX_INTERNET_ADDRESS_TO_NORMAL with following Parameters in ADDRESS_UNSTRUCT

TYPE = INT

ADDRESS : email id

You will get results.

Regards,

Deepti

0 Kudos

Hi Deepti,

That FM validates only Single Recipient address, I need to validate Multiple email ID`s

0 Kudos

Hello Padma,

You need to loop it out your internal table of email address and pass into Funtion module one by one for validation.

Regards,

Deepti

0 Kudos

Hi Deepti,

       same thing i have done as you said, but it checks only abc@xyz

I want to validate ( . ) also.

Thanks

0 Kudos

It is giving error message if i check abc.xyz

Pls provide example. Also check below link, this might help you.

https://scn.sap.com/message/3395034

Regards,

Deepti

0 Kudos

Deepti,

    What is the maximum file attachment size  using CL_BCS class.

Please reply me...

0 Kudos

Deepti,

    What is the maximum file attachment size  using CL_BCS class.

Please reply me...

0 Kudos

Hello Padma,

I am not sure but usely it works well with all types. Exception is always there for a huge file size.

If you want to see how to calculate file size then check below

http://scn.sap.com/thread/1832037

Regards,

Deepti

0 Kudos

Hi Padmanabha,

Do you want to validate domain also. or you want to directly validate SAP User's Mail ID given in SU01.

I dont want to tell how to validate SU01 Mail ID. Because u know how to do it.

Please check the below program for external mail id's.

  PARAMETERS: p_mail(100) LOWER CASE.      " E-Mail id to beverified
DATA: http_client TYPE REF TO if_http_client .
DATA: w_string TYPE string ,
      w_result TYPE string ,
      r_str    TYPE string .
DATA: result_tab TYPE TABLE OF string.

START-OF-SELECTION .
  CLEAR w_string .
  CONCATENATE
  'http://www.webservicex.net/ValidateEmail.asmx/IsValidEmail?Email='
p_mail
INTO
  w_string .
  CALL METHOD cl_http_client=>create_by_url
    EXPORTING
      url                = w_string
    IMPORTING
      client             = http_client
    EXCEPTIONS
      argument_not_found = 1
      plugin_not_active  = 2
      internal_error     = 3
      OTHERS             = 4.
  CALL METHOD http_client->send
    EXCEPTIONS
      http_communication_failure = 1
      http_invalid_state         = 2.
  CALL METHOD http_client->receive
    EXCEPTIONS
      http_communication_failure = 1
      http_invalid_state         = 2
      http_processing_failed     = 3.
  CLEAR w_result .
  w_result = http_client->response->get_cdata( ).
  REFRESH result_tab .
  SPLIT w_result AT cl_abap_char_utilities=>cr_lf INTO TABLE
result_tab .

andrewdiaz2000
Active Participant
0 Kudos

Hi Padma,

Have you tried appending ';' as seperator for multiple emails..try this may be it would work. or else the suggested answer of looping the fm for every email only stands good.

for example: xyz@xyz.com; abc@abc.com; .....

Regards,

Andrew.

andrewdiaz2000
Active Participant
0 Kudos

Hi,

Have you tried for the web-service for the issue. it would complicate if the requirement is not projected to use web-service

Regards,

Andrew