Skip to Content
avatar image
Former Member

Changing sender email address while sending email

Can I change the sender address while sending an email to some recipient . I can find the paramater for passing recepient email id , but the sender one is taken from user master . I want to change it to some other address . Is that possible .

Any help wud be appreciated ..

Thanks

Add comment
10|10000 characters needed characters exceeded

  • Get RSS Feed

2 Answers

  • Sep 07, 2007 at 04:50 PM

    I think you can do this using BCS. Are you using BCS? If not, then you can do it also this way.

    
    
    * In order to send a mail from someone
    * other than the current user, you must
    * use the funciton module SO_OBJECT_SEND
    * and give parameters to the ORGINATOR
    *
    *  ORIGINATOR = me@mycompany.com'.
    *  ORIGINATOR_TYPE = 'U'.
    
    report zrich_0003 .
    
    
    data: maildata type sood1.
    data: mailtxt  type table of solisti1 with header line.
    data: mailrec  type table of soos1  with header line.
    
    
    start-of-selection.
    
      clear:    maildata, mailtxt,  mailrec.
      refresh:  mailtxt, mailrec.
    
    
      mailtxt-line = 'This is a test'.
      append mailtxt.
    
    
          mailrec-recextnam = 'you@yourcompany.com'.
          mailrec-recesc    = 'E'.
          mailrec-sndpri    = '1'.
          mailrec-sndart    = 'INT'.
          mailrec-mailstatus = 'E'.
          append mailrec.
    
    
        maildata-objnam = 'Test'  .
        maildata-objdes = 'Test' .
        maildata-objla  = sy-langu.
    
    
        call function 'SO_OBJECT_SEND'
             exporting
                  object_hd_change           = maildata
                  object_type                = 'RAW'
                  outbox_flag                = 'X'
                  originator                 = 'donotreply@yourcompany.com'  "Sender
                  originator_type            = 'U'
             tables
                  objcont                    = mailtxt
                  objhead                    = mailtxt
                  receivers                  = mailrec
             exceptions
                  object_not_sent            = 15
                  object_type_not_exist      = 17
                  operation_no_authorization = 21
                  parameter_error            = 23
                  too_much_receivers         = 73
                  others                     = 1000.
    
      endif.
    
    * submit rsconn01 with mode = 'INT' and return.
    
    

    Regards,

    RIch Heilman

    Add comment
    10|10000 characters needed characters exceeded

  • avatar image
    Former Member
    Sep 07, 2007 at 05:00 PM

    Hi there

    I am using the Business transaction

    SAMPLE_PROCESS_00002040

    can i do it here ?

    Add comment
    10|10000 characters needed characters exceeded