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

Email check

Former Member
0 Likes
1,475

Hi,

Is there a way to check if the email address in the receipent list is valid or not?

Even if I give wrong mail adress, in the out box it shows as message sent to the given address with out errors.

thanks

Hi,

Is there a way to check if the email address in the receipent list is valid or not?

Even if I give wrong mail adress, in the out box it shows as message sent to the given address with out errors.

thanks

6 REPLIES 6
Read only

Former Member
0 Likes
737

I think, it is not possible. Let me know if you find out.

Thanks & Regards,

Govind.

Read only

Former Member
0 Likes
737

Hi Srikanth,

If you are looking for the logic to check whether the e-mail id is valid or not, you can refer the standard BAPI: "BUPA_ADDRESS_CHANGE". It returns and error message saying e-mail is not valid, when invalid e-mail is entered.

regards,

Raj

Read only

0 Likes
737

Hi Raj,

It is possible to check an internet mail address.

But we need to give the partner number???

Read only

Former Member
0 Likes
737

Hi Srikanth,

In the earlier post I had given the BAPI name that you can use as ref to build a logic to check if the e-mail is valid, in the sense it has an "@" ".com" and so on.

If you need to check whether the e-mail address is the correct one for the Business Partner, you need to check the "ADSMTP" field in the table "BP030" (Business partner Address table) by using the Business Partner Number.

Please award points if found useful.

regards,

Raj

Read only

Former Member
0 Likes
737

Hi Srikanth,

The mthod IF_RECIPIENT_DIALOG_BCS~CHECK_RECIPIENT_NAME of the class CL_CAM_ADDRESS_BCS Checks a String as to Whether it Can Be a Recipient.

Regards,

Vidya.

Read only

Former Member
0 Likes
737

You can check a valid emailaddress using the following code.


DATA: iv_email TYPE STING.

* Email address check

  IF iv_email CP '+*.+*@+*.++*' OR
     iv_email CP '+*@+*.++*'    OR
*   Email format is correct. Do further checks.
*   Check for invalid characters
    CONDENSE iv_email NO-GAPS.
    IF iv_email CO 'abcdefghijklmnopqrstuvwxyzABCDEFGHIJKLMNOPQRSTUVWXYZ1234567890.@-_ '.
*     Email address is correct.
    ELSE.
*     Email address contains invalid characters
    ENDIF.
  ELSE.
*   Email address has wrong format.  
  ENDIF.

Hope that helps.

Regards, Adam