cancel
Showing results for 
Search instead for 
Did you mean: 

Unable to send email using CL_CRM_EMAIL_DATA

Former Member
0 Kudos
201

Hi,

I am trying to send an email using this code:


      DATA: lr_email_data TYPE REF TO cl_crm_email_data.
      DATA: ls_recipient    TYPE crms_email_recipient.
      DATA: ls_content      TYPE crms_email_mime_struc.

      CREATE OBJECT lr_email_data.
       ls_recipient-id = 'em@ S.DE'.
       ls_recipient-address = 'em@ S.DE'.
       ls_recipient-channel = space.
       APPEND ls_recipient TO lr_email_data->to.

       ls_content-content_ascii = 'this is a test email.'.
       ls_content-mime_type = 'text/plain'.
       APPEND ls_content TO lr_email_data->body.

       lr_email_data->subject = 'Notification'.
       cl_crm_email_utility=>send_email( lr_email_data ).

But when I check in transaction SO01, I see this message:

Send status for document: Notification

Status received for this document:

Notification

Sent on:

23.02.2011 11:05:46

Sent by:

Rohan John Fernandes

Status for Recipient em@ s.de:

Cannot process message; no node determined for em@ S.DE

And the email is not actually sent. How do I ensure that the email get sent to that email id?

Note: I added space in the email id, because it wouldn't let me post the text here.

View Entire Topic
SARK
Product and Topic Expert
Product and Topic Expert
0 Kudos

Hi Rohan,

pls go to scot transaction and add your email address or receipent address.. then it will work fine...

Regards,

Sathish