Problem in sending mail to external id from customer exit

Hello All,
I have a problem that I am sending mail to supervisor. I have written code and it is working correctly in se38 program.
This code If I keep in an exit and run tcode then it is not working and it is giving message no mail sent.
Why is this so? The same code is working in SE38 program and not working in an EXIT.
Pls give me solution as soon as possible.
Thanks in advance.
nallani

>>Why is this so? The same code is working in SE38 program and not working in an EXIT.
It is because the Email function has a COMMIT WORK statement & you cannot/should not COMMIT inside a User exit.. to avoid this conflict, simply SUBMIT the Report ie pla cethe email function omdule inside a Report program & call it from the User exit using the SUBMIT statement.
~Suresh

Similar Messages

  • Sending mail to external mailid from user exit EXIT_SAPLEBNF_005

    Hai ALL,
    iam facing problem with sending mail to external id from user exit exit_saplebnf_005 , this user exit for ROLE Determination of releasing of PO .
    in this user exit i passed a user name for this role from one z table.
    through workflow the mails are send to workplace of resposible person maintained in ztable.
    now user requirement is they want some intimation in their outlook for they got mail in workplace .
    can anybody help me.
    Thanks .
    sushmita.k

    they can either define automatic forwarding in their SAP office to external e-mail OR they can set their external e-mail as preferred method of communication and they should receive mail to their external mailbox assuming that sending to external mail is supported in your system (check with BASIS folks).

  • Problem while sending mail to external mail ids

    Hi All,
    while trying to send mail to external mail ids through some custom program, i'm facing an error as "recipient not in address management".
    Can anyone giude me why this is occuring and actually what is this Address management?
    Thanks & Regards,
    Anil.

    Hi,
    Check this sample code..
    http://www.sapdevelopment.co.uk/reporting/email/email_mbody.htm
    * Add the recipients email address
      clear it_receivers.
      refresh it_receivers.
    <b>  it_receivers-receiver = p_email.
      it_receivers-rec_type = 'U'.
      it_receivers-com_type = 'INT'.</b>
      it_receivers-notif_del = 'X'.
      it_receivers-notif_ndel = 'X'.
      append it_receivers.
    what Fm you are using..?are you specifying like above for e-mail address..
    Regards
    vijay

  • Problem in sending mail from VF03

    Hi
    I am just getting a problem in sending mail to the recipient from script.
    please find the below code and let me know why there is no data in otf_tab table.
    DATA:  otf_tab TYPE TABLE OF itcoo WITH HEADER LINE.
    CALL FUNCTION 'CLOSE_FORM'
        IMPORTING
          RESULT  = i_itcpp
        TABLES
          otfdata = otf_tab
        EXCEPTIONS
          OTHERS  = 1.
    IF otf_tab[] IS NOT INITIAL.
          TRY.
              CREATE OBJECT mailer
                EXPORTING
                  i_nast = nast.
         mailer->get_mail_address( EXPORTING i_adrnr = vbdkr-adrnr ).
              mailer->get_mail_address( EXPORTING i_adrnr = vbdkr-adrnr
                                                     i_vkorg = vbdkr-vkorg
                                                    i_vtweg = vbdkr-vtweg ).
            zcl_sd_mail_output=>convert_otf_to_pdf( IMPORTING pdf_xstring =
            gv_pdf_string
                                                    CHANGING  otf_table   =
                                                    otf_tab[] ).
              mailer->build_and_send_email( EXPORTING pdf_xstring =
              gv_pdf_string ).
            CATCH zcx_sd_mail_no_mailid INTO error.
              error_txt = error->get_text( ).
              zcl_sd_mail_output=>protocol_update( msg_id = 'VN'
                                                   msg_nr = '902'
                                                   msg_ty = 'E'
                                                   msg_v1 = error_txt ).
              retcode = 1.
              CLEAR error_txt.
          ENDTRY.
        ENDIF.
    Since my OTf_tab is initial i am unable to send mails.

    Hi,
    If the OTF Data table is blank then you might have missed the parameter "GETOTFDATA" at the time of calling "OPEN_FORM". Please pass field TDGETOTF = "X" in paramter "OPTIONS" when you are calling "OPEN_FORM".
    You can also visit this link for more information.
    http://www.sdn.sap.com/irj/scn/go/portal/prtroot/docs/library/uuid/49e15474-0e01-0010-9cba-e62df8244556?QuickLink=index&overridelayout=true
    Cheers,

  • Error while sending mail to external id

    Hai all,
    I am trying to send mail to external mail id using the FM SO_NEW_DOCUMENT_ATT_SEND_API1. After executing when i check in sost i m getting an error 'Cannot process message, no route from sapuserto external mail id.
    Can anyone help me resolve this issue pls.
    Thanks in advance,
    Neela

    Hi,
    You have to fill the tables parameter 'PACKING_LIST'.
    try with these values
    wa_objpack-TRANSF_BIN = space.
    wa_objpack-HEAD_START = 1.
    wa_objpack-HEAD_NUM   = 0.
    wa_objpack-BODY_START = 1.
    wa_objpack-DOC_TYPE   = 'RAW'.
    APPEND wa_objpack to it_objpack.
    Regards,
    Daz.

  • Problem: Cannot send mail unless Password is transmitted insecurely & Port is set to 587.. Can receive mail but can't send..

    Problem: Cannot send mail unless Password is transmitted insecurely & Port is set to 587.. Can receive mail but can't send Code 501..
    Need help with T-bird.. My OS is Win XP-64..Have been using Mozilla for about 10 years with little or no problems.. This happened when I upgraded to 3.17.. Spent hours on T-Bird diagnostics web site.. Called Comcast & talked to a net tech.. he ran some tests on his end & had me log into my Comcast e-mail account & all worked well,, so he concluded the problem was in T-Bird.. He had me change my port to 587 & disable connection security & authentication to none & I was able to send mail.. That was all he could do.. Comcast was working.. the problem is in T-Bird.. Can any one help with this problem.. I don't want to send mail with my password transmitted insecurely..
    Thanks
    Richard

    It was not intended to be "snide". You said two separate things that at face value would be out of the ordinary.
    I considered if it might be a typo for 31.7. Since 31.5 is the current formal release, I would have to thank you for volunteering to test a pre-release beta version. If it was truly 3.1.7 then it would appear that you have chosen, or have become stuck with a somewhat ancient version. In either case it's harder to reach out to you with any meaningful comments or advice. However I do watch various other sites and newsgroups and I don't see a clamour of distressed users, so it seems fair to suppose that this feature isn't actually broken in 31.7.
    And you said XP 64. XP is obsolete and no longer supported and if there is a 64-bit version, then again you have set yourself apart from the mainstream.
    I had a look at the comcast site and found some puzzling recommendations. Some users come here asking how to set up a secured connection in Thunderbird when it isn't offered by the server. Comcast are different, in that they mention the ports 143 and 587, and also 993 and 465. So far so good, in that security is actually on offer, but they also suggest that you enable SSL, regardless of which port is being used. It would be unusual and unconventional to offer TLS or SSL on ports 143 and 587. STARTTLS would be more credible on these ports.
    Have you tried IMAP on 993 and SMTP on 465? SMTP on 587 with SSL, or TLS, is not impossible, but is improbable.

  • Problem in sending mails to multiple persons

    Hi,
    I have a problem in sending mails to multiple people....
    My mail is using the local smtp server...The mail is to be send to multiple addresses in to and cc.
    for e.g the to address will have --> [email protected];[email protected]
    cc address will have --> [email protected];[email protected]
    How do this i.e set multiple to and cc address...
    My function that sends mail from my ejb looks like this...
    // create some properties and get the default Session
         Properties props = new Properties();
         props.put("mail.smtp.host", host);
         Session session = Session.getDefaultInstance(props, null);
         try{
         Message msg = new MimeMessage(session);
         msg.setFrom(new InternetAddress(from));
    //I HAVE TO SET MULTIPLE "TO" ADDRESSES HERE INSTEAD OF JUST 1
         InternetAddress[] address = {new InternetAddress(to)};
         msg.setRecipients(Message.RecipientType.TO, address);
    //I HAVE TO SET MULTIPLE "CC" ADDRESSES HERE INSTEAD OF JUST 1
    InternetAddress[] addresscc = {new InternetAddress(cc)};
         msg.setRecipients(Message.RecipientType.CC, addresscc);
         msg.setSubject(msgSubj);
         msg.setSentDate(new java.util.Date());
         msg.setText(msgText);
         Transport.send(msg);
         }catch (MessagingException ex) {
    System.out.println("\nException handling in javaMail.java :" + ex);
    Please help me out with a solution!!!Thanks in advance.
    Thanks
    Rahul

    Hi all,
    Got the solution...
    We have to use addRecipients method of the Message class to add as many receipts we want to set.
    example: Message.addRecipients(type,address).
    Thanks
    Rahul

  • PROBLEM IN SENDING MAIL TO POSITIONS THROUGH SEND MAIL STEP

    Hi Experts,
    I am facing some problems in sending mail to positions from the organization structure from the send mail step.When I am using user as the recipient type it is working fine...but when i am choosing S position as the recipient type it is giving the error in the workflow log stating that method SENDTASKDESCRIPTION cannot be executed.
    I need to find a solution urgently...any suggestion would be sincerely appreciated.
    thanks.
    Narsingh

    Well you have probably tried this.. but just a recheck.
    1 . send email setep select Organizational Object
    2. Recipient Type Organizational Unit
    3. Here do an F4 and then select the Unit...
    Try this SAP behaves weirdly at times...
    after this do Refresh Buffers.. and Org Unit...
    Let us know if this works

  • Send mail to external address using send mail step.

    Hi all,
    I have one question.
    In a send mail step of workflow, when the recipient type is a Organizational Object and Org Unit, the mail is only sent to workplace? I would need to send the mail to external address from all users of Org Unit. Is possible it?
    Thanks
    Regards,
    David.

    Hi,
    1) In the Recipient type select the E-Mail address from the drop down
    2) And give the email id (in the text box)
    3) Then save & test it.
    4) Once it execute goto t.code SOST and see the email entry.
    5) If entry not found, the SCOT settings is not done then check with Basis Team
    6) If found, select it and execute.
    7) And check you email
    Regards,
    Surjith

  • Failed to send mail to external domain via portal

    Hi Gurus,
    By following the configuraion instructions in <b>SAP library - Collaboration - Groupware - Installing and Configuring E-Mail Connectivity</b>, I managed to send mail to recipients who reside in same domain e.g. <b>[email protected]</b> via portal.
    However, I failed to send mail to external domain e.g. <b>[email protected]</b>. I got the following error message:
    The mail could not be sent to the specified recipients com.sap.ip.collaboration.gw.impl.transport.javamail.exception.MailSendException: The mail could not be sent to the specified recipients
         at com.sap.ip.collaboration.gw.impl.transport.javamail.JavaMailTransport.sendMail(JavaMailTransport.java:183)
    --------- exception is chained. Original exception ------------
    javax.mail.SendFailedException: Invalid Addresses;
      nested exception is:
         javax.mail.SendFailedException: 553 sorry, that domain isn't in my list of allowed rcpthosts (#5.7.1)
         at com.sun.mail.smtp.SMTPTransport.rcptTo(SMTPTransport.java:804)
         at com.sun.mail.smtp.SMTPTransport.sendMessage(SMTPTransport.java:320)
    Please help.
    Thanks alot.

    Hi Ajey,
    Thanks for your reply. I had tried your suggestion but same problem occurred with same error output.
    Actually, I encounterred this error message before in my <b>Microsoft Outlook</b>, where System Admin returned me a mail saying that, my mail was undeliverable with the same error message. But this can be solved by applying the <b>Internet Email Account Setting - Outgoing Server - My outgoing server (SMTP) require authentication</b>.
    So I am wondering,
    1) This problem is caused by SMTP server?
    2) Is there any workaround (like the Outlook Setting) I can configure in Portal?
    Do you have any idea?
    Thanks,
    HauChee

  • Sending mail to external system in sap 4.6c

    Hi WF experts,
    We are configuring sending mails to external system in sap4.6c.
    sxdump20.exe is kept on the frontend and created RFC destination with path to sxdump20.exe.
    same RFC destination is given while configuring in SCOT trxn.
    From SAP, mails are successfully sent and getting message in SOST as delivered to recipent.
    But recipent is not receiving mails in his inbox ( outlook express,gmail,hotmail etc ).
    Any solution from you will be of great help.
    simha

    Hi,
    Make sure that the mail sent from SAP 4.6C are not declared as "Bad Mails" at your Mail Server/SMTP Gateways, possibly due to some technical reason. (such as sender address is not correct, any other SMTP errors,  etc...etc.).
    Ask your network/system admin to verify it.
    Regards,
    Bhavik G. Shroff

  • Problem with sending mail throgh java mail api

    hi folks,
    We are having problem regarding sending mail using java mail api.
    we are using msgsendsample.java file from demo folder contained in javamail-1.3.3_01 folder.
    we are using following command at dos prompt.:
    java msgsendsample [email protected] [email protected] smtp.mail.yahoo.com false
    It gives following Exception:
    --Exception handling in msgsendsample.java
    com.sun.mail.smtp.SMTPSendFailedException: 530 authentication required - for hel
    p go to http://help.yahoo.com/help/us/mail/pop/pop-11.html
    at com.sun.mail.smtp.SMTPTransport.issueSendCommand(SMTPTransport.java:1
    333) at com.sun.mail.smtp.SMTPTransport.mailFrom(SMTPTransport.java:906)
    at com.sun.mail.smtp.SMTPTransport.sendMessage(SMTPTransport.java:535)
    at javax.mail.Transport.send0(Transport.java:151)
    at javax.mail.Transport.send(Transport.java:80)
    at msgsendsample.main(msgsendsample.java:93)
    ** ValidUnsent Addresses
    [email protected]
    Thanking in Advance...
    Please give us guidance to any alternate solution if exists.

    hi
    the smtp server u are using should allow u to send mail to other smtp server like if u r sending mail to yahoo account u have to use yahoo smtp server only .....
    bye

  • How to send mails to external maild like yahoo

    I am using 'SO_NEW_DOCUMENT_ATT_SEND_API1'
    funtion module to send mails to internal office mail ids and working correctly .
    Not the requirement changed . I need to send mail to external mail id like
    per at the rateyahoo dot com also.
    What can I do to send mail to external mailids like yahoo.
    Do I need to use flag some thing ?
    THANSK IN ADVANCE.

    Hi,
    Hi,
    It is posible to send the mail to external address usign the above FM . But some configurations have to be maitnaied in SCOT Tcode for INT (Internet) ->SMTP protocal. we need to give the Mail Host and Mail Port all this information is usually done by the BASIS. Please approach them for these settings and try again with the FM. Here we have to configure it to Yahoo so that we can send the mail.
    Regards
    Lekha

  • Problem in sending mail

    Hi all,
    I'm having some problem in sending mail. I did all configuration regarding this. After that when i tried to send mail, its giving some error, tht is, "SendMailService is not available".
    Can anybody help me on this.
    Thanks,
    Raj

    Hi Raj,
    Go to System Administrator > System Configuration > Knowledge Management > Content Management > Global Services > Mailing Service and make active option true, then restart your portal. Hope it'll work fine.
    Regards,
    Ganpati Jha

  • Problem in sending mail through dynamics actions

    Hi Friends,
    I have a problem in sending mail through dynamics actions . In this  we pass a subroutine in dynamics actions which send an mail when promotion action occured.
    Problem is that sometimes it will  send an mail or sometimes not. I have no idea to solve this problem.
    Can anyone suggest me .
    Thanks ,
    Anish
    Moderator message : Duplicate post locked.
    Edited by: Vinod Kumar on Sep 5, 2011 9:45 AM

    Hi,
    Check that all the bindings have been done in proper way as it is configured.. Try to do the binding manualy..This could also be the problem..
    thank You

Maybe you are looking for

  • Not able to add groups to the user ODSEE via OIM 11g R2

    Hi, I have created some groups in ODSEE and ran the recon job to sync these groups in OIM 11g R2. Groups are populated in OIM 11g R2 and while raising the request for ODSEE Application Instance I can see these groups. Now following are the issues I a

  • Missing fonts in Numbers on iPad

    Every time, when I open files in Numbers I see notification, that few fonts is missing. Problem appears when I update IOS from IOS6 to that $^&^&* IOS7. Numbers updated to last version. After updating from IOS7 to IOS8 I still have that problem. To m

  • Colors not displaying properly

    Lightroom displays my Canon RAW files with a yellow tint over them. However, when the file is exported to jpeg from Lightroom, the file looks fine. The file also displays properly in all other programs including DPP and Photoshop. http://www.petelope

  • ORA-02020 too many database links

    Hello, I'm getting the ORA-02020 too many database links error in my Apex application. This error occurs when I run an interactive report in a page. There are 21 pages and 7 database links in the application. Each page has one interactive report that

  • Antireflective vs glossy

    Is there any difference in appearance between the shiny and the matte screen in Mac Book Pro? And wich one do you recommend for Photoshop, Final Cut, etc.