<?xml version="1.0" encoding="UTF-8"?>
<rss xmlns:content="http://purl.org/rss/1.0/modules/content/" xmlns:dc="http://purl.org/dc/elements/1.1/" xmlns:rdf="http://www.w3.org/1999/02/22-rdf-syntax-ns#" xmlns:taxo="http://purl.org/rss/1.0/modules/taxonomy/" version="2.0">
  <channel>
    <title>topic Re: Send Email with diff user id . in Application Development and Automation Discussions</title>
    <link>https://community.sap.com/t5/application-development-and-automation-discussions/send-email-with-diff-user-id/m-p/5783032#M1308596</link>
    <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Hi,&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Incase you want email id of other users then you will get it from table ADR6.&lt;/P&gt;&lt;P&gt;Join ADR6 and USR21 on BNAME and you can get the email address from the field SMTP ADDR.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Regards,&lt;/P&gt;&lt;P&gt;Ankur Parab&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
    <pubDate>Fri, 19 Jun 2009 06:27:59 GMT</pubDate>
    <dc:creator>Former Member</dc:creator>
    <dc:date>2009-06-19T06:27:59Z</dc:date>
    <item>
      <title>Send Email with diff user id .</title>
      <link>https://community.sap.com/t5/application-development-and-automation-discussions/send-email-with-diff-user-id/m-p/5783030#M1308594</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;hello experts ,&lt;/P&gt;&lt;P&gt;                  i have a program which can send mails to other user but it by default takes my used id as sender's mail id . This program is working fine , but is there any way possible to hide my sender's mail id and show some other mail id in sender to the recipients? &lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;thanks in advance&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Fri, 19 Jun 2009 06:24:09 GMT</pubDate>
      <guid>https://community.sap.com/t5/application-development-and-automation-discussions/send-email-with-diff-user-id/m-p/5783030#M1308594</guid>
      <dc:creator>Former Member</dc:creator>
      <dc:date>2009-06-19T06:24:09Z</dc:date>
    </item>
    <item>
      <title>Re: Send Email with diff user id .</title>
      <link>https://community.sap.com/t5/application-development-and-automation-discussions/send-email-with-diff-user-id/m-p/5783031#M1308595</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Hi,&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Please try this code:&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;PRE&gt;&lt;CODE&gt;

 gs_reclist-rec_date    = sy-datum.
  gs_reclist-rec_type    = 'U' .         " For Internet Address
  gs_reclist-com_type    = 'INT'.
  gs_reclist-notif_ndel  = c_x.
  gs_reclist-receiver    = p_email.       "Email addr of Recip  &amp;lt;------ Parameter on your screen/ Create a range and pass it...
  APPEND gs_reclist TO gt_reclist.
  CLEAR gs_reclist.

&lt;/CODE&gt;&lt;/PRE&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Are you sending some attachemnet also.. I mean are you using the FM 'SO_NEW_DOCUMENT_ATT_SEND_API1' to send email&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Fri, 19 Jun 2009 06:27:32 GMT</pubDate>
      <guid>https://community.sap.com/t5/application-development-and-automation-discussions/send-email-with-diff-user-id/m-p/5783031#M1308595</guid>
      <dc:creator>Former Member</dc:creator>
      <dc:date>2009-06-19T06:27:32Z</dc:date>
    </item>
    <item>
      <title>Re: Send Email with diff user id .</title>
      <link>https://community.sap.com/t5/application-development-and-automation-discussions/send-email-with-diff-user-id/m-p/5783032#M1308596</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Hi,&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Incase you want email id of other users then you will get it from table ADR6.&lt;/P&gt;&lt;P&gt;Join ADR6 and USR21 on BNAME and you can get the email address from the field SMTP ADDR.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Regards,&lt;/P&gt;&lt;P&gt;Ankur Parab&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Fri, 19 Jun 2009 06:27:59 GMT</pubDate>
      <guid>https://community.sap.com/t5/application-development-and-automation-discussions/send-email-with-diff-user-id/m-p/5783032#M1308596</guid>
      <dc:creator>Former Member</dc:creator>
      <dc:date>2009-06-19T06:27:59Z</dc:date>
    </item>
    <item>
      <title>Re: Send Email with diff user id .</title>
      <link>https://community.sap.com/t5/application-development-and-automation-discussions/send-email-with-diff-user-id/m-p/5783033#M1308597</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Hi Vivek,&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Chk this program once,BCS_TEST04 .&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;go thru this link once.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;A class="jive_macro jive_macro_message" href="https://community.sap.com/" __jive_macro_name="message" modifiedtitle="true" __default_attr="1567289"&gt;&lt;/A&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Regards,&lt;/P&gt;&lt;P&gt;Lakshman.&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Fri, 19 Jun 2009 06:29:32 GMT</pubDate>
      <guid>https://community.sap.com/t5/application-development-and-automation-discussions/send-email-with-diff-user-id/m-p/5783033#M1308597</guid>
      <dc:creator>former_member209217</dc:creator>
      <dc:date>2009-06-19T06:29:32Z</dc:date>
    </item>
    <item>
      <title>Re: Send Email with diff user id .</title>
      <link>https://community.sap.com/t5/application-development-and-automation-discussions/send-email-with-diff-user-id/m-p/5783034#M1308598</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Hi vivek,&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt; I guess this default is based on how it is maintained in TCODE SU01. In SU01 give your user id and if you change your First name and Last name, this will be used as the senders' id&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Regards&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Fri, 19 Jun 2009 06:45:02 GMT</pubDate>
      <guid>https://community.sap.com/t5/application-development-and-automation-discussions/send-email-with-diff-user-id/m-p/5783034#M1308598</guid>
      <dc:creator>Former Member</dc:creator>
      <dc:date>2009-06-19T06:45:02Z</dc:date>
    </item>
    <item>
      <title>Re: Send Email with diff user id .</title>
      <link>https://community.sap.com/t5/application-development-and-automation-discussions/send-email-with-diff-user-id/m-p/5783035#M1308599</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Hello,&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Either change it in SU01 or use this code to temporarily change it&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;These are the parameters&lt;/P&gt;&lt;P&gt;P_FNAME	TYPE	AD_NAMEFIR  " first name&lt;/P&gt;&lt;P&gt;P_LNAME	TYPE	AD_NAMEFIR  " surname &lt;/P&gt;&lt;P&gt;PX_NAME	TYPE	XFLAG             " name will only be changed if this flag is set&lt;/P&gt;&lt;P&gt;P_FROM	TYPE	AD_SMTPADR " sender email id&lt;/P&gt;&lt;P&gt;PX_FROM	TYPE	XFLAG             " sender email id will only be changed if this flag is set&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;PRE&gt;&lt;CODE&gt;

* populate sender name if specified
  data: lv_persnumber type AD_PERSNUM.
  data: lv_ADDRNUMBER type AD_ADDRNUM.
  data: lv_oldemail type AD_SMTPADR.
  data: lv_oldfname type AD_NAMEFIR.
  data: lv_oldlname type AD_NAMELAS.
  data: lv_oldfullname type AD_NAMTEXT.
  data: lv_newfullname type AD_NAMTEXT.

  if px_from = 'X' or px_name = 'X'.

    select single PERSNUMBER ADDRNUMBER from usr21
      into (lv_persnumber, lv_addrnumber)
      where bname = sy-uname.

    if px_from = 'X'.
      select single SMTP_ADDR from adr6
        into lv_oldemail
        where ADDRNUMBER = lv_ADDRNUMBER
          and PERSNUMBER = lv_PERSNUMBER.
      update adr6
        set SMTP_ADDR = p_from
        where ADDRNUMBER = lv_ADDRNUMBER
          and PERSNUMBER = lv_PERSNUMBER.
    endif.
    if PX_NAME = 'X'.
      concatenate p_fname p_lname into lv_newfullname
        separated by space.
      select single NAME_FIRST NAME_LAST NAME_TEXT from adrp
        into (lv_oldfname, lv_oldlname, lv_oldfullname)
        where PERSNUMBER = lv_PERSNUMBER.
      update adrp
        set name_first = p_fname
        name_last = p_lname
        NAME_TEXT = lv_newfullname
        where PERSNUMBER = lv_PERSNUMBER.
    endif.

    commit work.

  endif.

&lt;/CODE&gt;&lt;/PRE&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;after calling your FM, don't forget to change it back&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;PRE&gt;&lt;CODE&gt;
* reset email id and name back to old value if set earlier
    if px_from = 'X'.
      update adr6
        set SMTP_ADDR = lv_oldemail
        where ADDRNUMBER = lv_ADDRNUMBER
          and PERSNUMBER = lv_PERSNUMBER.
    endif.
    if PX_NAME = 'X'.
      update adrp
        set name_first = lv_oldfname
        name_last = lv_oldlname
        NAME_TEXT = lv_oldfullname
        where PERSNUMBER = lv_PERSNUMBER.
    endif.
    if sy-subrc = 0 and ( px_from = 'X' or px_name = 'X' ).
      commit work.
    endif.
&lt;/CODE&gt;&lt;/PRE&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Edited by: Kris Donald on Jun 19, 2009 1:02 PM&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Fri, 19 Jun 2009 07:29:55 GMT</pubDate>
      <guid>https://community.sap.com/t5/application-development-and-automation-discussions/send-email-with-diff-user-id/m-p/5783035#M1308599</guid>
      <dc:creator>former_member189059</dc:creator>
      <dc:date>2009-06-19T07:29:55Z</dc:date>
    </item>
    <item>
      <title>Re: Send Email with diff user id .</title>
      <link>https://community.sap.com/t5/application-development-and-automation-discussions/send-email-with-diff-user-id/m-p/5783036#M1308600</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Create an SAP user (let's say "ZMAILUSER")  in SU01 and assign any internet mail address.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Now set sender_address as the sap user name and sender address_type = "B". It will send the mail from the internet mail address defined for the user.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;    CALL FUNCTION 'SO_DOCUMENT_SEND_API1'&lt;/P&gt;&lt;P&gt;      EXPORTING&lt;/P&gt;&lt;P&gt;        DOCUMENT_DATA              = LW_DOC&lt;/P&gt;&lt;P&gt;        &lt;STRONG&gt;SENDER_ADDRESS             = 'ZMAILUSER'&lt;/STRONG&gt;&lt;/P&gt;&lt;P&gt;        &lt;STRONG&gt;SENDER_ADDRESS_TYPE        = 'B'&lt;/STRONG&gt;&lt;/P&gt;&lt;P&gt;        COMMIT_WORK                = 'X'&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Hope this will work.&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Fri, 19 Jun 2009 07:39:16 GMT</pubDate>
      <guid>https://community.sap.com/t5/application-development-and-automation-discussions/send-email-with-diff-user-id/m-p/5783036#M1308600</guid>
      <dc:creator>Former Member</dc:creator>
      <dc:date>2009-06-19T07:39:16Z</dc:date>
    </item>
    <item>
      <title>Re: Send Email with diff user id .</title>
      <link>https://community.sap.com/t5/application-development-and-automation-discussions/send-email-with-diff-user-id/m-p/5783037#M1308601</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Hi vivek&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Try this code:-&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;    &lt;/P&gt;&lt;PRE&gt;&lt;CODE&gt;CALL FUNCTION 'SO_DOCUMENT_SEND_API1'
      EXPORTING
        DOCUMENT_DATA              = DOC_CHNG
        PUT_IN_OUTBOX                 = 'X'
        SENDER_ADDRESS             = 'zmail'   "SU01 User id- e-mail id not userid.
        SENDER_ADDRESS_TYPE        = 'INT'               " Pass address type INT
        COMMIT_WORK                = 'X'
      TABLES
        PACKING_LIST               = T_PACKING_LIST[]
        CONTENTS_TXT               = OBJCONT[]
        RECEIVERS                  = RECLIST[]
      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.&lt;/CODE&gt;&lt;/PRE&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Thanks &amp;amp; regards&lt;/P&gt;&lt;P&gt;Rahul&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Fri, 19 Jun 2009 08:46:03 GMT</pubDate>
      <guid>https://community.sap.com/t5/application-development-and-automation-discussions/send-email-with-diff-user-id/m-p/5783037#M1308601</guid>
      <dc:creator>Former Member</dc:creator>
      <dc:date>2009-06-19T08:46:03Z</dc:date>
    </item>
    <item>
      <title>Re: Send Email with diff user id .</title>
      <link>https://community.sap.com/t5/application-development-and-automation-discussions/send-email-with-diff-user-id/m-p/5783038#M1308602</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;thanks a lot &lt;SPAN __jive_emoticon_name="happy" __jive_macro_name="emoticon" class="jive_macro jive_emote" src="https://community.sap.com/111/images/emoticons/happy.gif"&gt;&lt;/SPAN&gt; works butter smooth&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Wed, 08 Jun 2016 05:53:20 GMT</pubDate>
      <guid>https://community.sap.com/t5/application-development-and-automation-discussions/send-email-with-diff-user-id/m-p/5783038#M1308602</guid>
      <dc:creator>Jay_Kamdar</dc:creator>
      <dc:date>2016-06-08T05:53:20Z</dc:date>
    </item>
  </channel>
</rss>

