‎2008 Jun 02 7:54 AM
Hello ppl,
Is there any standard FM to validate the email address.
In my report program, I am allowing the user to enter the email address in the selection screen.
I want to validate this email address before sending a mail.
Declaration:
PARAMETERS: p_mailid TYPE recacommmailpar-smtp_addr. "Mail ID
I am calling the FM: SO_NEW_DOCUMENT_ATT_SEND_API1 to send the email to specified user.
Thanks,
Dawood.
‎2008 Jun 02 8:00 AM
hi
try this
Try with FM - > SX_INTERNET_ADDRESS_TO_NORMAL to validate the email address.
Now run the FM and see...
use cl_http_client class and send a dummy http request to the site to see whether its available or not.
check out the following program for sample code
RSWF_TEST_HTTP
NOTE: if you are connecting to internet via proxy and the url you are trying to reach is on internet.
SICF GOTO->HTTP client proxy settings
in global settings tab
check the check box "proxy setting is active"
and in the "HTTP log" tab
enter proxy host name e.g proxy.sap.com....
enter the proxy server port (generally 80)
if required you need to enter
proxy server authentication (uid/pwd)
‎2008 Jun 02 8:01 AM
Hi,
I'm not sure about any FM which can validate an email id.
But I can give you an alternate solution - If there are only a specific set of email ids that the user will use, then you can create a custom table to hold all those email ids & validate the user input against the data in that table.
Hope this helps you.
Regards
Sayee
‎2008 Jun 02 8:05 AM