Setting Mail sender name manually

hi
I am using 'SO_NEW_DOCUMENT_SEND_API1' function module to send mails. This function module takes the current user name as the  mail sender name and sender mail ID.
Is there any way to set the mail sender name or sender mail id manually.
Thanks in advance,
Padmini

Hi.
First populate the Receiver ID's.
eMail Id of the Selected Employee
  IF not P_RECV is initial.   
    reclist-receiver = p_recv.
    reclist-rec_type = 'U'.
    APPEND reclist.
    CLEAR  reclist.
  endif.                      
Individual Email ID's
  LOOP AT s_mail.
    reclist-receiver = s_mail-low .
    reclist-rec_type = 'U'.
    APPEND reclist.
    CLEAR  reclist.
  ENDLOOP.
  sort reclist by receiver.
  delete adjacent duplicates from reclist comparing receiver.
Then use the FM you have used.
data: lv_pernr type pa0105-pernr.
  DATA: v_send_address LIKE soextreci1-receiver. "Sender add
  DATA: lv_reclist like reclist occurs 0 with header line.
        lv_reclist[] = reclist[].
Get Email of Current User {
  select pernr from pa0105
   into lv_pernr
   where subty = '0001'
     and usrid = sy-uname
     and endda ge sy-datum
     and begda le sy-datum.
  endselect.
  if sy-subrc = 0.
    select usrid_long from pa0105
     into v_send_address
     where pernr = lv_pernr
       and subty = '0010'
       and endda ge sy-datum
       and begda le sy-datum.
    endselect.
  endif.
} Get Email of Current User
  CALL FUNCTION 'SO_DOCUMENT_SEND_API1'
    EXPORTING
      document_data                   = doc_chng
      put_in_outbox                   = 'X'
      sender_address                  = v_send_address
      sender_address_type             = 'SMTP'
    TABLES
      packing_list  = objpack
      object_header = objhead
      contents_bin  = objbin
      contents_txt  = obj_head
    CONTENTS_HEX                     =
    OBJECT_PARA                      =
    OBJECT_PARB                      =
      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.
  IF sy-subrc <> 0.
    MESSAGE i000(zz) WITH 'Error while sending the e-Mail'(023).
    Leave to screen 1000.
  ELSE.
    MESSAGE s000(zz) WITH 'e-Mail sent successfully'(024).
  ENDIF.
  reclist[] = lv_reclist[].
  refresh: lv_Reclist.
Guess this should work.
Thanks and regards,
Maheshwari.V

Similar Messages

  • Changing the default mail sender name in Application server

    Hi,
    how do I change default mail sender name in application server.
    It is administrator@application by default.

    Does the email send from the operating system (sendmail ) or from the IAS?
    If its from the ias , then its in the httpd.conf.
    If its from the Operating system then I dont rememeber
    If you have a non windows platform (like unix) easiest way will be to do a grep for "administrator@application "
    Best Regards
    Rajesh Alex

  • I can not change my mail sender name

    When I use iCloud.com for email, my sender name is incorrect and I can't get it to change, even though the correct name is set in the iCloud preferences and in my Apple ID.  Any suggestions?

    There is many kind of methods to do this but none of them can do in one shot for all, means change in one place (ipad, iphone, mac pc) and them forget the others, it depends from where you would send your mails you have to change in that place the id information, here is the tree methods whatever device you have.
    FROM IPAD IPHONE
    1. OPEN SETTING (GEAR ICON)
    2. GO TO MAIL, CONTACTS, CALENDARS
    3. OPEN ICLOUD MAIL ACCOUNT
    4. HIT ON "ACCOUNT"
    5. INSIDE OF ACCOUNT WINDOW HIT ON "MAIL" OPTION
    6. CHANGE THE "NAME" AS YOU DESIRE, THEN "DONE" (3 TIMES UNTIL EVERYTHING CLOSE)
    FROM ICLOUD EMAIL (PC OR MAC)
    1. OPEN "MAIL" ON ICLOUD (BLUE ENVELOPE ICON)
    2. HIT ON "GEAR ICON" (TOP RIGHT CORNER)
    3. SELECT "PREFERENCE"
    4. SELECT "ACCOUNT"
    5. CHANGE "FULL NAME" AS YOU DESIRE, THEN DONE
    FROM GMAIL ACCOUNT (if icloud is attached to)
    1. OPEN YOUR GMAIL ACCOUNT
    2. HIT "SETTING" (GEAR ICON AT THE TOP RIGHT CORNER)
    3. SELECT "SETTING"
    4. CHOOSE "ACCOUNTS AND IMPORTS"
    5. POINTING ON YOUR ICLOUD ACCOUNT HIT "EDIT INFO" (AT THE MIDDLE RIGHT SIDE OF YOUR SCREEN)
    6. ON "EDIT EMAIL ADDRESS" SMALL WINDOW CHANGE THE "NAME" AS YOU DESIRE
    7. HIT ON "NEXT STEP"
    8. FINALLY HIT " SAVE CHANGES"

  • How to link nickname on contact to Mail sender name

    On iOs the sender name is replaced in Mail by the nickname described in Contacts.
    On OS X Mail, this does not happen and You still see the complete mail address.
    How to replace the complete mail address with the nickname ?
    Something new on OS X Yosemite ?
    Thanks for your support.
    Kind regards.

    Phil Appleraily wrote:
    On iOs the sender name is replaced in Mail by the nickname described in Contacts.
    On OS X Mail, this does not happen and You still see the complete mail address.
    How to replace the complete mail address with the nickname ?
    Something new on OS X Yosemite ?
    You likely need to wait for Apple to implement the iOS features in OS X. They are very much separate, but getting closer.

  • Mail sender name repeats middle initial

    A small but aggravating issue.
    My name in Address Book has a middle initial: "T". When sending mail it displays the name as "<First> T T <Last>" but not for all accounts.
    I can not find any "T T" names in the system except in previous emails.
    Looked (almost) everywhere.
    This one has got me baffled!

    Looks like I've found "a" solution, hopefully "the" solution by stumbling around in the address book after checking user account, remote server and this here thread.
    I have several email addresses and all of them have my name associated with them but ONE "card" associated with address in particular had a MIDDLE INITIAL entry field, where the rest did not. My hard headed /pragmatic (and i'm sure in the frenzy of setting up one or more of the POP accounts EXPEDIENT) solution was rather than figure out how to access the middle initial window by second guessing some over-clever Cupertino interface guru who made the function of this middle initial this option "so obvious" that it's eludes yours truly I cheated and put the initial in the first field... and since my name W T works like E. B. White's etc etc. this worked fine until ONE of the accounts like this started picking up the initial from the ONE in particular which HAD the initial field and utilized it as designed... Once that was deleted and harmonized with the other myriad "mickey moused" ones it cleared up the problem.
    How to make the middle initial field reappear in all the other address cards save for the ONE is still beyond my understanding so let me know what I'm missing if ya'll know the easter egg to make this reappear...
    Here's to hope this sticks and helps ya'll out, cheers –wt
    2.93 GHZ Intel Core Duo yadda yadda running OSX 10.5.8

  • Set the sender name of message

    Hi all,
    I have given my company mail address as the sender as following.
    message.setFrom("[email protected]");
    In yahoo mail and gmail, it displays "[email protected]" as the sender of the message. I want to display the name of sender rather than email address. Is there anyway to do this programatically?
    Thanks and regards

    i also has same request, it try this but it has some problem. Can anybody explain to me?
    public static void main(String args[]) throws IOException, SQLException, MessagingException
            String host = "mail.company.com";
         String from = "[email protected]";
         String to = "[email protected]";
         // Get system properties
         Properties props = System.getProperties();
         // Setup mail server
         props.put("mail.smtp.host", host);
         // Get session
         Session session = Session.getDefaultInstance(props, null);
         // Define message
         MimeMessage message = new MimeMessage(session);
         message.setFrom("haha<[email protected]>");
         message.addRecipient(Message.RecipientType.TO, new InternetAddress(to));
         message.setSubject("Human Resource Department");
         message.setText("Welcome to JavaMail");
         // Send message
         Transport.send(message);
       }Error message:
    sendMail.java.28: cannot find symbol
    symbol: method setFrom(java.lang.String)
    location: class javax.mail.internet.MimeMessage
    message.setFrom("haha<[email protected]>");
    ^

  • Apple mail sender name different than sender only on my mail

    When I receive an email from my husband, the name in the in box is not his, even though when i open the email his name and address are correct.

    Hello Art Kleimer,
    It may help to rebuild the affected mailboxes in Mail.
    Mail (Mavericks): Rebuild mailboxes
    http://support.apple.com/kb/PH14958
    Cheers,
    Allen

  • ALL CAPS IN NAME APPEARS IN E-MAIL SENDER ADDRESS -

    I am trying to get rid of my name that displays in all caps in my G-Mail sender name along with my e-mail address.  Have deleted my full name everywhere I have found it and think it may be in my Apple and not in G-Mail.  HELP!

    Good work.
    Created new account (would not let me duplicate without deleting existing info)
    This is the field that has to be unique, everything else can be identical...

  • How to change the sender name "workflow system" to Diff name

    Hi ,,
      How to change the mail sender name that is "workflow system" to different name. Whenever the mail is triggered it shows the sender name as "workflow system" . i want to change the name of the sender..Even i changed the name of the WF-Batch(name) user but no use.. Pls advice.
    regards,
    Roops.

    Hi Roops,
    Check if the following [link1|Re: How to change text of wf batch??] [link2|Update should not happen in the name of WF-BATCH] helps you.
    Regards,
    Saumya

  • RSWUWFML2 sender name

    Hi,
    I'm using the RSWUWFML2 report to send mails with WI execution shortcuts. I have programmed a periodic job with a BATCH user for the report execution.
    The problem that I'm having is that the mail sender name is obsolete, I've changed the BATCH user's first and last names through T-SU01 and the mails still coming with the previous one. For example, until yesterday the user's name was XXXXX and today the user name is YYYYY. Today the sender name into the incoming e-mail is XXXXX.
    Why is this happening? Is there any buffer or something?
    Regards.
    Gregory.

    Thanks for your answer Rick.
    I didn't do anything, T-SOST is showing the sender's name wrong. But the incomming e-mail in my inbox has the correct sender's name.
    Regards.
    Gregory.

  • Setting Bitmap Export Names in JSFL

    Hi,
    We have JSFL functions written to automatically create SWF
    files using imported assets. Within these JSFL functions we are
    able to set EXPORT LINKAGE NAMES on Movie Clips - no problem.
    We are NOT able to set EXPORT LINKAGE NAMES on BITMAPS
    however - and we need to do this. We can go into the IDE and set
    the export names manually - but we cannot do this in JSFL. It just
    won't do it.
    We are currently using CS3. Can someone tell me if we can do
    this in CS4? Or if we need to do something different in CS3 to be
    able to do this in JSFL?
    Thanks in advance!!

    I was able to do it with the following code in CS3:
    var lib = fl.getDocumentDOM().library;
    lib.setItemProperty('linkageExportForAS', true);
    lib.setItemProperty('linkageIdentifier', 'test');
    Be sure that you set linkageExportForAS to true before setting the linkage ID. You may get a (silent) error if you try set properties that aren't available on a bitmap (but are available on a movieclip), so check any other properties that you're setting.

  • Setting dynamic attachment name in mail adapter

    Hi experts,
    I have a mail adapter that send e-mails from ECC to several address.
    I have configured dynamically the FROM and TO field using the code showed below in message mapping:
    public String SetMailParameters(String Mail_address_to, Container container){
       //write your code here
      String valueFrom = "my_address";
    DynamicConfiguration conf = (DynamicConfiguration) container.getTransformationParameters().get(StreamTransformationConstants.DYNAMIC_CONFIGURATION);
    DynamicConfigurationKey key1 = DynamicConfigurationKey.create( "http://sap.com/xi/XI/System/Mail",  "THeaderFROM");
    DynamicConfigurationKey key2 = DynamicConfigurationKey.create( "http://sap.com/xi/XI/System/Mail",  "THeaderTO");
    conf.put(key1, valueFrom);
    conf.put(key2, Mail_address_to);
      return  "";
    In communication channel I have checked ASMA and variable transport binding (using XHeaderName1 and 2), mail package is not checked.
    It works fine!
    My question is:
    I need to dynamically configure also the Attachment name: is it possible?
    I've tried adding the code below:
    DynamicConfigurationKey key3 = DynamicConfigurationKey.create("http://sap.com/xi/XI/System/File","FileName");
    conf.put(key3,Attachment_name);
    and also
    Transform.ContentDisposition      attachment;filename=<FileName>
    in Message TransformBean in communication channel, but it doesn't work!!!
    Any idea?
    Thanks
    Fabio Boni

    Hi,
    thanks a lot!!
    ASMA and variable transport binding must be checked or not?
    it raise an error in runtime workbench message monitoring:
    2010-09-02 17:41:15 Success Mail: calling the adpter for processing
    2010-09-02 17:41:15 Error Mail: call failed; com.sap.aii.messaging.util.XMLScanException: expecting end tag: Mail, but found {'}Content_Disposition at state 1
    2010-09-02 17:41:15 Success Mail: sending a delivery error ack ...
    2010-09-02 17:41:15 Success Mail: sent a delivery error ack
    2010-09-02 17:41:15 Error Mail: error occured: com.sap.aii.af.ra.ms.api.RecoverableException: com.sap.aii.messaging.util.XMLScanException: expecting end tag: Mail, but found {'}Content_Disposition at state 1
    2010-09-02 17:41:15 Error MP: Exception caught with cause com.sap.aii.af.ra.ms.api.RecoverableException: com.sap.aii.messaging.util.XMLScanException: expecting end tag: Mail, but found {}Content_Disposition at state 1
    2010-09-02 17:41:15 Error Exception caught by adapter framework: com.sap.aii.messaging.util.XMLScanException: expecting end tag: Mail, but found {}Content_Disposition at state 1
    2010-09-02 17:41:15 Error Delivery of the message to the application using connection Mail_http://sap.com/xi/XI/System failed, due to: com.sap.aii.af.ra.ms.api.RecoverableException: com.sap.aii.messaging.util.XMLScanException: expecting end tag: Mail, but found {}Content_Disposition at state 1.
    This is my message in message monitoring:
    <?xml version="1.0" encoding="UTF-8" ?>
    - <ns1:Mail xmlns:ns1="http://sap.com/xi/XI/Mail/30">
      <Content_Disposition>"attachment; filename="MyFileName.txt"</Content_Disposition>
      <Content>ZLF;0001000079;Dealer Motors UK</Content>
      </ns1:Mail>
    In message mapping with target message mail package I've linked Content_Disposition with the constant
    "attachment; filename="MyFileName.txt"
    If I cancel this relation the mail arrives correctly.
    One other thing: when I took mail.xsd from SAP the fields Content_Disposition and Content_Description weren't in, so I added them manually in XSD.
    thanks
    Edited by: Fabio Boni on Sep 2, 2010 5:42 PM
    Edited by: Fabio Boni on Sep 2, 2010 6:06 PM

  • Change in sender name of mail sended through workflow

    Hi All,
    I have requirement where we want to chage the sender name decription for mails which are going through workflow.When we send mails through send mail step in workflow it is taking sender decription name automatically as "GSAP E1B WORKFLOW SYSTEM".
    I have to change this decription to "OSIRIS Invoice". Is there any way to change sender name?
    We are using SENDTASKDESCRIPTION method of SELFITEM object in send mail step.
    Any help on this regards will be grate help...
    Regards,
    Rahul

    Hello Rahul,
    here, the sender's name is the user's name of the background user performing this task, i.e. usually WF-BATCH.
    If you do not have any other workflow scenarios running that could interfere here you could possibly just change that user's name.
    Otherwise you have to re-program the sendmail step to specifically set the sender description.
    Best regards,
    Florin
    P.S: Workflow issues have a separate forum:
    SAP Business Workflow

  • Java Callout - how to set Sender Name by InstanceName

    I have a following code on Java Callout executed on Listening Channel:
    import oracle.tip.b2b.message.InstanceMessage;
    import oracle.tip.b2b.model.instance.Instancemessage;
    // some other imports //
    public class GetPartner implements Callout {
      public void execute(CalloutContext calloutContext, List input,
      List output) throws CalloutDomainException,
      CalloutSystemException {
      Logger log = Logger.getLogger(TransportCallout.class.getName());
      DiagnosticService.log("MKRTransportCallout: Init");
      try {
      log.setLevel(Level.INFO);
      CalloutMessage message =
      (CalloutMessage)input.get(0); 
      Instancemessage inst = new Instancemessage();
      InstanceMessage instance = new InstanceMessage(inst);
      String name = instance.getSenderId();
      String name2 = instance.getSenderName();
      log.info("SENDER ID FROM JAVA CALL " + name);
      log.info("SENDER NAME FROM JAVA CALL " + name2);
    Both logged values are null.
    My question is - how to connect CalloutMessage variable with Instancemessage variable via Java code?
    My variable "inst" is null, because the context from variable "message" is not related with it - there is no connection between CalloutMessage and Instancemessage. How to set connection like this?

    just a short addition. At the moment i use the following code to generate a MimeMessage:
    try
                // Get session
                Session session = Session.getDefaultInstance(MailQueue.props, null);
                // Define message
                this.message = new MimeMessage(session);
                message.setFrom(new InternetAddress(from));
                message.setRecipients(Message.RecipientType.TO, InternetAddress.parse(to, false));
                message.setSubject(subject);
                // pass the mail content and set the Mime Typ
                message.setContent(msg, MimeTyp);   
            catch (MessagingException me)
            } 

  • Some sender names not showing in Mailbox view, but show in e-mail window

    Some of the e-mails I receive instead of having the sender name appear in the From column in my inbox have their e-mail address appear instead. They are people who are in my Address Book with that e-mail address, and their name does appear in the From line in the e-mail itself.
    Is there some setting I need to change so that their name appears in the From column instead of their e-mail address? Thanks!

    I am seeing very similar behavior. For me, when I view the message in the list of all messages in the InBox window, for a few senders only the e-mail address is displayed. However, when I select that mail message, the person's name is properly displayed in the message viewing panel.
    Have you been able to figure out what is going on?
    - Philip

Maybe you are looking for

  • How to catch a ASSIGN_TYPE_CONFLICT

    Gurus. My badi is working OK, but how can I prevent a short-dump "ASSIGN_TYPE_CONFLICT" if standard "gt_outtab" is changed ? Casting ? IF_EX_ME_POHIST_DISP_CUST~OUTTAB_CHANGE method if_ex_me_pohist_disp_cust~outtab_change. *-The "original" gt_outtab

  • Reset And Reverse Document?

    For Cleared Item generally We Reset First With T Code FBRA and then We Reverse With T code FB08. So we used  two steps, So my Question is Can I Reverse Cleared Item In One Step?( Using Only One T Code?)

  • A problem with my mini..

    I recently wasnt able to recharge my ipod, so it's basically been off the charger until the battery ran low and died. I had it back on the charger for about a day, and all that shows up is the apple logo. I did the center and menu button trick. It wo

  • How do I find games for my IPOD Classic?

    How do I find games for my IPOD Classic?

  • Hp envy series 4500. Can't get icon to appear in dock EVER.

    AT no time does a printer appear in my dock, even when the hp utilities application is open. Can't find any icons that will drag. I am able to connect to the printer. This is a new phenomenon. Icon was always there when the printer was active. Somebo