Skip to Content
author's profile photo Former Member
Former Member

Sender mail id format - Mail by action

Hi All,

When action triggers mail receiver gets sender's id as "First Name<space>Last Name <Email id of sender maintained in SU01>"

Is there any way to remove "First Name<space>Last Name" from sender mail id? Can only email id maintained in SU01 be shown in receivers inbox?

Regards,

Nikhil

Add a comment
10|10000 characters needed characters exceeded

Assigned Tags

Related questions

1 Answer

  • Best Answer
    Posted on Aug 22, 2011 at 11:27 AM

    instade of mail sending through action mail option

    use method call badi

    it will work only for text not attached smartform

    use following fode

    
    
      CLEAR: mail_data, mail_content, receivers.
      REFRESH: mail_content, receivers.
    
      mail_data-obj_name = 'NewUser'.                           "#EC NOTEXT
      MOVE 'Meeting Appointment Request' TO mail_data-obj_descr. "#EC NOTEXT
      mail_data-obj_langu = sy-langu.
    
    *  append wa_mail_data to mail_data.
    
      MOVE 'Dear Sir/Madam,' TO wa_mail_content-line.           "#EC NOTEXT
      APPEND wa_mail_content TO mail_content.
    
      MOVE '' TO wa_mail_content-line.                          "#EC NOTEXT
      APPEND wa_mail_content TO mail_content.
    
      MOVE 'Please check below Appointment details.' TO wa_mail_content-line. "#EC NOTEXT
      APPEND wa_mail_content TO mail_content.
    
      MOVE ' ' TO wa_mail_content-line.                         "#EC NOTEXT
      APPEND wa_mail_content TO mail_content.
    
      CONCATENATE 'Appointment Number              :' ls_orderadm_h-object_id INTO wa_mail_content-line SEPARATED BY space.
      APPEND wa_mail_content TO mail_content.
    
      CONCATENATE 'Appointment Description         :' ls_orderadm_h-description INTO wa_mail_content-line SEPARATED BY space."#EC NOTEXT
      APPEND wa_mail_content TO mail_content.
    
      LOOP AT lt_partner INTO ls_partner WHERE partner_fct = 'ZATTENDE'.
        CLEAR  wa_adr6 .
        SELECT SINGLE * FROM adr6 INTO wa_adr6 WHERE addrnumber = ls_partner-addr_nr
                                    AND persnumber = ls_partner-addr_np.
        CLEAR wa_receivers.
        wa_receivers-receiver = wa_adr6-smtp_addr.
        wa_receivers-rec_type = 'U'.
        wa_receivers-com_type = 'INT'.
        APPEND wa_receivers TO receivers.
    
      ENDLOOP.
    
    *  COMMIT WORK.
      CALL FUNCTION 'SO_NEW_DOCUMENT_SEND_API1'
        EXPORTING
          document_data              = mail_data
        TABLES
          object_content             = mail_content
          receivers                  = receivers
        EXCEPTIONS
          too_many_receivers         = 1
          document_not_sent          = 2
          document_type_not_exist    = 3
          operation_no_authorization = 4
          parameter_error            = 5
          x_error                    = 6
          enqueue_error              = 7
          OTHERS                     = 8.
    

    Add a comment
    10|10000 characters needed characters exceeded

Before answering

You should only submit an answer when you are proposing a solution to the poster's problem. If you want the poster to clarify the question or provide more information, please leave a comment instead, requesting additional details. When answering, please include specifics, such as step-by-step instructions, context for the solution, and links to useful resources. Also, please make sure that you answer complies with our Rules of Engagement.
You must be Logged in to submit an answer.

Up to 10 attachments (including images) can be used with a maximum of 1.0 MB each and 10.5 MB total.