EMAIL to external server like Yahoo through SAP

Hi all,
I want to send a mail to the vendor when a PO is created through SAP. Please tell me what is the procedure to follow to do it and what all are the setings need to be done in SAP to send Email through SAP to external server like yahoo, rediff etc.
Thanks

*&      Form  F_SEND_MAIL
      Send the mail to  corresponding user
FORM F_SEND_MAIL.
  DATA : LV_TABLE_LINES LIKE SY-TABIX.                   " table index
  CLEAR: V_MSG1, IT_RECLIST.
  REFRESH IT_RECLIST.
*-popualate email ids
  IT_RECLIST-RECEIVER = V_UNAME.
  IT_RECLIST-REC_TYPE = 'B'.
  IT_RECLIST-SAP_BODY = C_X.
  IT_RECLIST-EXPRESS = C_X.
*-append receiver table
  APPEND IT_RECLIST.
  CLEAR  IT_RECLIST.
*-populate document attributes
  CLEAR: X_DOC_CHNG.
  X_DOC_CHNG-OBJ_NAME = 'Error'(M01).
  X_DOC_CHNG-OBJ_DESCR = 'ERROR REPORT'(M02).
*-populate body text
  IT_OBJTXT = 'Error file is attached'(M03).
  APPEND IT_OBJTXT.
*-document size
  CLEAR : LV_TABLE_LINES.
  DESCRIBE TABLE IT_OBJTXT LINES LV_TABLE_LINES.
  READ TABLE IT_OBJTXT INDEX LV_TABLE_LINES.
  X_DOC_CHNG-DOC_SIZE =
               ( LV_TABLE_LINES - 1 ) * 255 + STRLEN( IT_OBJTXT ).
*-populate packing list for body text
  CLEAR IT_OBJPACK-TRANSF_BIN.
  IT_OBJPACK-HEAD_START = 1.
  IT_OBJPACK-HEAD_NUM = 0.
  IT_OBJPACK-BODY_START = 1.
  IT_OBJPACK-BODY_NUM = LV_TABLE_LINES.
  IT_OBJPACK-DOC_TYPE = C_DOCTYP.
  APPEND IT_OBJPACK.
  CLEAR IT_OBJPACK.
*-populate object header
  IT_OBJHEAD = 'INET TO SAP Error Report'(M04).
  APPEND IT_OBJHEAD.
  CLEAR  IT_OBJHEAD.
*--for attachment ---start
*-populate object bin table for attachment
*-column header
  LOOP AT IT_MAIL.
    IT_OBJBIN = IT_MAIL.
    APPEND IT_OBJBIN.
    CLEAR  IT_OBJBIN.
  ENDLOOP.
*-get total no.of lines of Object table(attachment)
  CLEAR : LV_TABLE_LINES.
  DESCRIBE TABLE IT_OBJBIN LINES LV_TABLE_LINES.
*-populate object header
  IT_OBJHEAD = 'Report'(M05).
  APPEND IT_OBJHEAD.
  CLEAR  IT_OBJHEAD.
*-packing list for attachment
  IT_OBJPACK-TRANSF_BIN = C_X.
  IT_OBJPACK-HEAD_START = 1.
  IT_OBJPACK-HEAD_NUM = 1.
  IT_OBJPACK-BODY_START = 1.
  IT_OBJPACK-BODY_NUM = LV_TABLE_LINES .
  IT_OBJPACK-DOC_TYPE = C_DOCTYP .
  IT_OBJPACK-OBJ_NAME = 'ABCD'.
  IT_OBJPACK-OBJ_DESCR = 'ERROR REPORT'(M02).
  IT_OBJPACK-DOC_SIZE = LV_TABLE_LINES * 255.
  APPEND IT_OBJPACK.
  CLEAR  IT_OBJPACK.
*--code for attachment -- end
*-Sending the document
  CALL FUNCTION 'SO_NEW_DOCUMENT_ATT_SEND_API1'
       EXPORTING
            DOCUMENT_DATA              = X_DOC_CHNG
           PUT_IN_OUTBOX              =  C_X
   IMPORTING
        SENT_TO_ALL                =
        NEW_OBJECT_ID              =
       TABLES
            PACKING_LIST               = IT_OBJPACK
           OBJECT_HEADER              = IT_OBJHEAD
           CONTENTS_BIN               = IT_OBJBIN
           CONTENTS_TXT               = IT_OBJTXT
        CONTENTS_HEX               =
        OBJECT_PARA                =
        OBJECT_PARB                =
            RECEIVERS                  = IT_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 ID SY-MSGID TYPE SY-MSGTY NUMBER SY-MSGNO
            WITH SY-MSGV1 SY-MSGV2 SY-MSGV3 SY-MSGV4 INTO V_MSG1.
    MESSAGE I000 WITH V_MSG1.
  ENDIF.
Hope this code will be useful

Similar Messages

  • On my ipad mini, when I delete an email from the inbox (and it goes into Trash), it immediately deletes that email from the server (ATT/Yahoo).  I've called support for both ATT and Apple and can't find a way to have the emails remain on the server.

    On my iPad Mini, when I delete an email from the inbox (and it goes into Trash), it immediately deletes that email from the server (ATT/Yahoo).  I've called support for both ATT and Apple and can't find a way to have the emails remain on the server. 
    My husband and I share an email address and if he misses a day checking email on his notebook, he doesn't receive the items that I have sent to Trash on my iPad Mini.
    Appreciate suggestions.
    [The curious thing is, if I "move" the deleted emails from Trash on my iPad Mini into the Inbox, I can go to my notebook, open my online email and they are back in my ATT/Yahoo Inbox.]

    Is your Yahoo account set up as POP3 or IMAP?

  • 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

  • Can we send work item to external mails like yahoo or gmail?

    Hi,
    Is it possible to send work items to external mails like yahoo or gmail? In such case, how does work item execute?
    SS

    Hi,
    This is possible by using Extended notification .
    For Extended Notification, you can look the following blog,
    /people/saujanya.gn/blog/2006/12/19/how-to-get-work-items-your-outlook-inbox
    Reward for useful answer.
    Richard A

  • Problem in workflow sending mails to external domains like yahoo,gmail etc.

    hi
    i have one probs in my workflow that when i am sending mail to an external id it is not going to gmail,yahoo or hotmail etc.
    it is being send to a particular domain say XYZ
    but outside it ,no mail is send
    and error is coming that recepient is unknown
    we have firewalls being placed on smtp
    and each and every setting in SCOT has been checked thorughly
    but still mail except to one domain is not going outside
    i have came across the info that since SAP doesn have any user id authentication but SMTP does has ,so when mail is being send outside the mail sending is failed,one option could be to disable the authentication at SMTP but thats doesn come inside the policy of client
    so i think there must be a way out in SAP to deal with this
    please suggest how can i send the mails externally,i ahve checked each and every thing inside my SMTP configuration ,adress is defined as * here  but still mail is being send to internal domain of the client in which i am working ,but not at all to the external domains like gmail,yahoo etc.
    any help will be highly appreciated
    best regards
    ashish

    Hi Ashish,
    I think you will need to check with your exchange guys because probably the exchange server will not relay the messages form the SAP server to external e-mail domains.
    Regards,
    Martin

  • Quality Server not connect through SAP Routing String

    Hi,
    When remotely access client SAP through SAP routing string in Quality Server it shows error message as
    "timeout occured
    Location : SAP router 37.11 on solman
    Time: Tue May 05 11:19:37 2009
    Component : NI (Network Interface)
    Release : 640
    Version : 37
    Return Code : -93
    Counter : 131 "
    Here GUI version is 7.1(where from connecting). Client SAP version is ECC 5.0 and they use GUI 6.4 version. But Development server is being connected through SAP Routing String.
    Regards,
    Samrat

    You might want to check following things:
    Can you do a ping to the IP address you specified?
    Is the data correct (ip, host, system number,...)?
    Is the gateway with system number 00 running on the server?
    Did you install the SAP RFC SDK dll's?
    Glenn Colpaert - MCTS BizTalk Server - Blog : http://blog.codit.eu

  • Ironport C170 Relay outgoing Email to External Server

    We have a new Ironport C170 and am only using the appliance for Encryption/DLP.  We wish to have incoming and outgoing Email to flow through this appliance.  All incoming Email will be relayed to our Exchange Server and all outgoing Email will be relayed to our SAAS Email Filtering System for processing and delivery.  The incoming part I believe is configured correctly but am having issues figuring out how to relay all outgoing to a specific domain in the cloud.
    Any assistance would be greatly welcomed,
    Stephen

    Hi Stephen,
    You can control all the outgoing mail from SMTP Route configuration, if is in GUI menu > Netowork > SMTP Route.
    You can define the route to next hop based on destination domain, as for default - all other domains (this is the one that goes to SaaS) you can enter your cloud SMTP address and the port number there.
    Hope this helps.
    Thanks,
    Donny

  • How to send emails to HTTP server?

    hi to all,
    iam dont know how to send a emails & receive emails using
    HTTP server like HOTMAIL,SIFY so and so...
    what is the HTTP host of HOTMAIL and so....?
    and successful with SMTP,IMAP,POP3...
    ITS Urgent,
    Nagaraju G

    hi to all,
    iam dont know how to send a emails & receive emails using
    HTTP server like HOTMAIL,SIFY so and so...
    what is the HTTP host of HOTMAIL and so....?
    and successful with SMTP,IMAP,POP3...
    ITS Urgent,
    Nagaraju G

  • Simple Question - Email through SAP Server

    Hi, This is Angeline
    I have very simple question, is that posible Eamil Through SAP application server to hotmail / Yahoo account.. without Mail-server...
    In other words, I don't have Mail server and I want send email to my hotmail or yahoo or gmail account through SMTP...
    Please Advised  Thanks you

    You need a SMTP Server in order to send mails... I can't believe that theres a company using SAP that does not have a mail server.
    Regards
    Juan

  • Error while connecting to external server through SOAP/HTTP adapter

    Hi,
    we are trying to connect to the external server through SOAP adapter. The scenario is proxy to SOAP asynchronous scenario.
    We are getting following error in Communication channel monitoring:
    *Message processing failed. Cause: com.sap.aii.af.ra.ms.api.RecoverableException: SOAP: response message contains an error Application/UNKNOWN/APPLICATION_ERROR - application fault*
    We also tried HTTP adapter in the receiver side. But it is giving red flag in SXMB_MONI with following error:
      <?xml version="1.0" encoding="UTF-8" standalone="yes" ?>
    - <!--  Call Adapter
      -->
    - <SAP:Error xmlns:SAP="http://sap.com/xi/XI/Message/30" xmlns:SOAP="http://schemas.xmlsoap.org/soap/envelope/" SOAP:mustUnderstand="">
      <SAP:Category>XIAdapter</SAP:Category>
      <SAP:Code area="PLAINHTTP_ADAPTER">ATTRIBUTE_SERVER</SAP:Code>
      <SAP:P1>500</SAP:P1>
      <SAP:P2>Internal Server Error</SAP:P2>
      <SAP:P3>Internal Server Error</SAP:P3>
      <SAP:P4 />
      <SAP:AdditionalText />
      <SAP:ApplicationFaultMessage namespace="" />
      <SAP:Stack>HTTP server code 500 reason Internal Server Error explanation Internal Server Error</SAP:Stack>
      <SAP:Retry>M</SAP:Retry>
      </SAP:Error>
    Please help.
    Thanks in advance.
    Regards,
    sriparna

    Make sure that the receiver webservice is up and running and in a state to receive the external calls. Confirm if the data you send is as per the requirement of the webservice and they haven't changed anything at their end.
    Regards,
    Prateek

  • Can we run a java class in a external server through abap program?

    Dear Experts,
    Can we run a java class in an external server ( other than application server and client system )?
    I have tried running it in the client system through a program and it works.
    But i have the requirement of running it in another system. Can it be done?

    Hi,
    If this is the case I think you can call this web service from SAP and triger the execution of the application on the "external server".
    SAP is behaving as a client in this case.
    Another alternative:
    "have tried running it in the client system through a program and it works." please elaborate.
    Regards.

  • Migrating one email domain to external server

    our AD domain "domain1.com" users have @domain1.com, @domain2.com, and @domain3.com (this one is for testing usage) mailboxes/addresses on our internal Exchange 2010 14.01.0438.000 server.   All users are on the same domain regardless
    of the email address they use.  mailboxes with @domain1.com as their primary smtp address are being migrated to an email service outside of our organization/domain but will still remain users on our domain.  For those users we'll be creating a new
    profile in Outlook pointed at that new external mail server to switch over to on the cutover date while leaving the existing profile as is.  Following migration for a period of time we want  @domain1.com users to still be able revert to their current
    Outlook profile and be able to get to our OWA in case any problems/inconsistencies occurred migrating contents to the new service. It's understood that sending/receiving mail would no longer work for them on the internal Exchange server, the point is just
    that they could access the old contacts/calendar/notes/tasks/emails. 
    My testing with migrating @domain3.com indicated that in order for domain2.com senders to be able to send mail to @domain1.com recipients after the cutover date and have the mail arrive at the external server instead of the internal server, the following
    would have to be done:
    -domain1.com removed from gatewayproxy attribute in recipient polices -
    removal of gatewayProxy via ADSI
    -domain1.com removed from exchange >> organization configuration >> hub transport >> accepted domains
    -mx record pointing at external mail server added to internal dns server domain1.com zone
    -domain1.com removed from smtp proxyAddresses attribute on each mailbox
    It seems like there should be a way to achieve the result of getting the mail to the external server without modifying the proxyAddresses attributes so that the users could still get back into the old exchange server after cutover with their original address. 
    any ideas?
    Thanks

    the steps to get [email protected] to [email protected] mail sent to external server are clear from testing and additional testing shows some option for still getting into the old mailboxes from clients/owa but not clear is how it could be done while leaving
    domain1.com mailbox addresses intact on the old Exchange server and the AD user object 'mail' attribute intact as it was pre-cutover.  To expand and rephrase my original post, is there a way to make Exchange determine whether it should route domain1.com
    mail internally vs externally via a global setting that would take priority over and cause to be ignored smtp proxyAddresses attributes on individual mailboxes so these don't have to be stripped/modified causing unwanted AD attribute alteration?
    objective partially achieved -
    AD object for [email protected] mailbox has the following attributes -
    proxyAddresses =  SMTP:[email protected] (Exchange primary reply-to address) & smtp:[email protected]
    'mail' attribute = [email protected]
    if we change primary/reply SMTP in exchange to [email protected] and remove SMTP:[email protected], the result of internal mail sent to [email protected] going to the external server is accomplished but the 'mail' attribute in AD then changes to [email protected]
    which is unwanted.  we still want 'mail' attribute left as is for these users since their email addresses are not changing.  access to mailbox contents on old exchange server via old [email protected]'s old outlook profile + OWA still work which
    is good though. 
    also found that adding a domain to organization configuration >> hub transport >> accepted domains as 'external relay' in addition to a send connector for the domain pointed at the MX for the external server still isn't enough to override/ignore
    any proxyaddresses on the internal mailboxes.  mail willl still end up at the internal mailbox.

  • Can't send email using yahoo through apple devices, any ideas?

    I cannot send an email using yahoo through any of my Apple devices, although email sent get through. It states "connection to the outgoing server ' apple.smpt.mail.yahoo.com' failed.
    Does anyone know how to restore?

    I am sorry that I cannot help you but I am having a similar problem. I can rec/send email but my email is duplicated and a pop up says that my server is not responding. I have spent most of the afternoon trying to get it corrected. I finally decided to take it to my Apple store next week.
    Good luck to us!

  • Allow External Server on Cloud to Relay Email

    Hi Exchange Server Expert,
    I have a query to ask. Currently my company has hosted a web server on the cloud with the public IP address. Since it is a web server, we will need to allow it to relay email via the Microsoft IIS to our exchange server. I have tried before for the internal
    server with private ip to relay email on the exchange server by creating a receive connector. however, I never try for the remote server with public ip address. we would like the remote server to relay email to both our internal email (accepted domain in exchange
    server) and also external recipients with the external domain.
    How am I suppose to perform this task?
    Thanks for your attention.
    Best Regards,
    Henry

    Hi Oliver,
    thanks again for your prompt response.
    I can't login to the web server as it is managed by vendor that configure the web server and we are only being allowed to access the web server via the public URL. basically, i don't know what is the configuration behind. I was being told that they will
    configure the email inside the IIS, which i also don't know how to configure.
    I have tried to configure the relay connector inside the exchange before following the same guide by changing the private IP to the web server public ip. i also allowed the permission group to exchange servers and authentication on "externally secured".
    however after i inform the vendor to test it, it didn't work at all.
    i am not able to test using telnet like what i did when doing relay for my internal server. I can't use telnet to test my web server to check whats wrong with the relay. i would like to test like what the guide do, but it is not allowed me to telnet.
    what should i do to troubleshoot? i think that allowing relay of external server is a security breach which is very risky. am i right?
    thanks
    Regards,
    Henry
    Hi Henry,
    Speak to the vendor that manages the web server for IIS setup and ask 'can I use authentication?' If they come back with a 'yes you can' simply provide them with a user/pass so they can authenticate.
    Personally I wouldn't allow a public IP to relay by configuring an Exchange Organisation to allow anonymous relay for a public IP, and would ask that they authenticate.
    If they come back with a no - then we can troubleshoot your Exchange configuration.
    Oliver Moazzezi | Exchange MVP, MCSA:M, MCITP:Exchange 2010,Exchange 2013, BA (Hons) Anim | http://www.exchange2010.com | http://www.cobweb.com | http://twitter.com/OliverMoazzezi

  • Send email on external email address using sap workflow

    Dear All,
    I wat to send email( on external email address) to all users on under one position in org unit using sap workflow.
    I have retrived all users under given postion using FM   'RH_OM_GET_HOLDER_OF_POSITION'.
    Please let me know how to get their email ids.
    Thanks & Regards
    Rajshree

    Hi Rajasree,
    You can get the email address by passing the PERNR of employee and read the infotype '0105' (communication) with subtype '0010'.
    DATA: lt_p0105 LIKE p0105 OCCURS 0 WITH HEADER LINE.
    CALL FUNCTION 'HR_READ_INFOTYPE'
       EXPORTING
    *   TCLAS                 = 'A'
        pernr                 = pernr
        infty                 = '0105'
        begda                 = sy-datum
        endda                 = sy-datum
    *   BYPASS_BUFFER         = ' '
    *   LEGACY_MODE           = ' '
    * IMPORTING
    *   SUBRC                 =
       TABLES
         infty_tab             = lt_p0105
      EXCEPTIONS
        infty_not_found       = 1
        OTHERS                = 2.
    IF sy-subrc <> 0.
    * Implement suitable error handling here
    ENDIF.
    READ TABLE lt_p0105 WITH KEY subty = '0010'.
    email = lt_p0105-usrid_long.
    Regards,
    Pipit

Maybe you are looking for

  • How to partition external HD for backups and storage?

    Hey All, I'm just setting up a backup system for my computer for the first time and need some help. I have purchased Super Duper and a 1TB Fantom firewire external HD and am ready to start, but don't fully know how to begin. Here are some questions:

  • I like to play spigo...when i try to load game screen comes up black

    i like to play games on spigo.com...i can get into some games...the ones without $ amounts beside them, but, can't get into any of the games with dollar amounts...can anyone help....when they load the screen goes black

  • Photoshop CC lagging - moving layers, video

    Here is my problem: https://www.youtube.com/watch?v=bCMbASsil7Y Any solutions? I need help with lagging. Moving layers with move tool (time: 1:26). Any solutions? PSD only 40MB. Not helped: - Task manager process to High - Switch off integrated video

  • Difference PNP and PNPCH

    Hi Experts, What are major differences between logical database PNP and PNPCH. Thanks, Ankur

  • PS CS5 Extended  updating problems.

    Hi I have CS5 Extended student edition and recently reinstalled on a new computer.  Since installing it, I've been trying to update it and it errors out saying "Error "This serial number is not for a qualifying product..." when installing an upgrade