Skip to Content
author's profile photo Former Member
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 a comment
10|10000 characters needed characters exceeded

Related questions

2 Answers

  • Posted on 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 a comment
    10|10000 characters needed characters exceeded

  • author's profile photo Former Member
    Former Member
    Posted on Sep 07, 2007 at 05:00 PM

    Hi there

    I am using the Business transaction

    SAMPLE_PROCESS_00002040

    can i do it here ?

    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.