UTL_SMTP Send E-Mail Externally

I need to to send emails external to our organisational domain using UTL_SMTP. UTL_SMTP allows the sender to be set to anything you want (eg: [email protected]). I want to authenticate limit the sender to those people who have an account on our MS Exchange Server.
Is there anyway I can use UTL_SMTP to authenticate to an Exchange server account before sending an email.
Thanks,
Jay
I have not been able to send emails outside the organisation.
In both cases the emails are being sent from an e-mail address that has privileges to send external emails utl_smtp.mail( conn, '[email protected]' );
I presume this isn't working because emails sent from Oracle aren't using the Exchange server account for '[email protected]' (I can send emails from so this is definitely the case).
My question is, when I send an e-mail from Oracle, even through the utl_smtp.mail is set to a user defined e-mail address, which is the actual e-mail account it is being sent from? (eg: [email protected]) I can then change the privileges for this account on our Exchange server.
Thanks in advance.
Jayesh Kavia

Our Novell email server rejects senders that are not in the address book, so I guess you'd have to look at the Exchange configuration. You could try using the VRFY command if it is implemented. RFC 2821 (which superceeds RFC 821, and is available from http://www.faqs.org/rfcs/ and many other sources) explains the guts of SMTP.

Similar Messages

  • I need a program to send a mail when sap starts

    I need a program to send a mail (external mail) each time sap start or something similar.
    Does anybody know something about this ?
    Thank you .

    Hi,
    this is not a perfect answer, but it may help you,
    In SM04 transaction code, you will know which user is loged to SAP and which transaction is using, there we have a option to send the mails also
    have a look at it, and try to solve your problem
    Regards
    Sudheer

  • How to use alias in "From" field when I send a mail with utl_smtp ?

    Hi all,
    I'm using a PL/SQL package with an Oracle 11G database to send mails. It works fine but instead of use of my mail in "From" field like "[email protected]" as sender E-mail address, I would like to have "Toto" in the sender address. I tryied to use utl_smtp.mail(l_connection, '<toto> [email protected]') but it doesn't work. The only way I can send mail is when I set utl_smtp.mail(l_connection, '<[email protected]>') directly. When I use the Alias, I have an error from smtp server telling that I use a bad syntax address.
    Does someone know how to use the alias ? Where do I do a mistake ?
    Thank you for your help.
    sis2b

    Thank you, I find how to solve the problem thanks to your link.
    I try to send HTML E-mail so I had the From in the from field writen in the header of the mail and not to initialize the connection.
    sis2b.

  • Sending e-mail using utl_smtp on oracle 9i

    Hello
    I have problem with sending e-mails using utl_smtp package.
    My code looks like this:
    lv_mail_conn := utl_smtp.open_connection(lv_mailhost_txt);
    utl_smtp.ehlo(lv_mail_conn, lv_mailhost_txt);
    res :=     utl_smtp.command(lv_mail_conn, 'AUTH LOGIN');
    res := utl_smtp.command(lv_mail_conn, <login in base64>);
    res := utl_smtp.command(lv_mail_conn, <password in base64>);
    And I get en error after sending a password to SMTP server.
    Error code: 535, text: 5.7.3 Authentication unsuccessful.
    This happens on oracle 9i.
    I have another server for testing which has oracle 10g installed. This code works fine on oracle 10g but doesn't work on oracle 9i.
    Do you have any ideas what's wrong? I assume that SMTP server (microsoft exchange) work correctlys because I can send e-mail from test server.

    Ok problem solved :)
    Problem was between oracle and MS exchange server. Live server oracle 9i is on linux, and testing server works on windows.
    So the problem was with configuration. Our admins corrected it and now works :). I don't know details.

  • How to send sapmails to external mail systems

    Hi,
    how to send sapmails to external mail systems....
    like if we want to mail a purchase order from SAP System to *@yahaoo.com or @.com.
    TY.

    hi manish,
    u can do it.
    chk this .
    chk this code
    DATA: objpack LIKE sopcklsti1 OCCURS 2 WITH HEADER LINE.
    DATA: objhead LIKE solisti1 OCCURS 1 WITH HEADER LINE.
    DATA: objbin LIKE solisti1 OCCURS 10 WITH HEADER LINE.
    DATA: objtxt LIKE solisti1 OCCURS 10 WITH HEADER LINE.
    DATA: reclist LIKE somlreci1 OCCURS 5 WITH HEADER LINE.
    DATA: doc_chng LIKE sodocchgi1.
    *& Form f_send_mail
    text
    --> p1 text
    <-- p2 text
    FORM f_send_mail .
    *store the vendor name, vendor email id , employee name and employee
    *email id in the internal table int_crb
    Creation of the document to be sent
    CLEAR doc_chng.
    REFRESH objpack.
    REFRESH objhead.
    REFRESH reclist.
    REFRESH objtxt.
    File Name
    doc_chng-obj_name = 'SHIPMENT'.
    Mail Subject
    CONCATENATE 'Shipment Document No.' int_crb_mail-shipdocnum
    'Cleared.'
    INTO doc_chng-obj_descr SEPARATED BY ' '.
    Mail Contents
    objtxt-line = 'Hi,'.
    APPEND objtxt.
    objtxt-line = ' '.
    APPEND objtxt.
    CONCATENATE 'Shipment Document Number ' int_crb_mail-shipdocnum
    ' cleared for move.' INTO objtxt-line SEPARATED BY ' '.
    APPEND objtxt.
    objtxt-line = ' '.
    APPEND objtxt.
    CLEAR objtxt.
    objtxt-line = 'Regards '.
    APPEND objtxt.
    objtxt-line = ' '.
    APPEND objtxt.
    objtxt-line = 'SAP '.
    APPEND objtxt.
    CLEAR objtxt.
    APPEND objtxt.
    DESCRIBE TABLE objtxt LINES tab_lines.
    READ TABLE objtxt INDEX tab_lines.
    doc_chng-doc_size = ( tab_lines - 1 ) * 255 + STRLEN(
    objtxt ).
    Creation of the entry for the compressed document
    CLEAR objpack-transf_bin.
    objpack-head_start = 1.
    objpack-head_num = 0.
    objpack-body_start = 1.
    objpack-body_num = tab_lines.
    objpack-doc_type = 'RAW'.
    APPEND objpack.
    Completing the recipient list
    target recipent
    CLEAR reclist.
    reclist-receiver = int_crb_mail-empperid. "employee email ID
    "wf_empperid.
    reclist-express = 'X'.
    reclist-rec_type = 'U'.
    APPEND reclist.
    copy recipents
    CLEAR reclist.
    reclist-receiver = int_crb_mail-smtp_addr."vendor email id
    reclist-express = 'X'.
    reclist-rec_type = 'U'.
    reclist-copy = 'X'.
    APPEND reclist.
    Sending the document
    CALL FUNCTION 'SO_NEW_DOCUMENT_ATT_SEND_API1'
    EXPORTING
    document_data = doc_chng
    TABLES
    packing_list = objpack
    object_header = objhead
    contents_bin = objbin
    contents_txt = objtxt
    receivers = reclist
    EXCEPTIONS
    too_many_receivers = 1
    document_not_sent = 2
    operation_no_authorization = 4
    OTHERS = 99.
    COMMIT WORK.
    SUBMIT rsconn01
    WITH mode = 'INT'
    WITH output = ' '
    AND RETURN.
    ENDFORM. " f_send_mail
    for any clarifiaction pls mail me.
    pls reward points, if this helped u.
    regards,
    anversha.
    [email protected]

  • How to send approval mails to external email ID

    hi all
    i have created a workflow for sales order approval. but now the user can approve only in sap workplace.
    Now the problem is the user has to do the approval from an external mail. Can any one tell me how to do it.

    Hi,
    Sending Mail to Outlook : U need the Following things done for this:-
    1> Use the Mail Step in the WF and Choose the Receipient as the E-Mail Address and Give the E-Mail Address there.
    2> Check the Configurations that need to be done in Transaction SCOT. SMTP Server Settings are done to get the Desired Results.
    When the decision is approved, U can Send a mail to the Earlier Approvers Regarding the Status of the Work-Item.
    To get Workitems in Outlook..for Approval and Rejection!!
    https://www.sdn.sap.com/irj/scn/wiki?path=/display/abap/workflow%252bscenario
    Problem in transferring the workitems into OUTLOOK
    /people/saujanya.gn/blog/2006/12/19/how-to-get-work-items-your-outlook-inbox
    Workflow Items in Outlook
    Let me know if u still face any issues.
    Regards,
    Kanika

  • Send Workitem to external mail ID and Execute?

    Hi all,
    I have requirement to send a WorkItem to Approvers External Mail ID and executes there.I have tried to send text mail to Approver's external mail id using Fm SO_NEW_DOCUMENT_SEND_API1.
    It is working fine but how to send WI to external mail id?
    Is there any way?
    Regards,
    Arpita

    Hi AC,
    there is a way out for the problem which you have where the user doesnt want to put his SAP userid and pwd and wants him to take directly to the SAP screen.
    For this you need to create a shortcut in your SAP logon pad for the transaction.
    and since you want him/her to go directly to the tcode, you need to put an entry in your sapshortcut.ini
    -pw "password"
    So what this entry does is the moment user clicks the workitem in Outlook, it would directly take him to the t-code for which you have created the shortcut, without asking him/her credentials.
    For your second issue, yes if 2 users get workitem, if any one reserves or executes the workitem, it automatically deletes from the other users SAP inbox.
    Hope it helps.
    Aditya

  • HOW TO SEND MULTIPLE MAILS USING EXTERNAL COMMUNICATION IN ACTIONS

    Hi all,
    we are working on a sales scenario in crm 5.0 ,currently we are able to send a mail to the particular BP only,what we want is mail should go to the multiple partners like contact person,prospect and user.can anyone help on this.
    Thanks in advance
    bye
    ram

    You can use the BADI: EXEC_METHODCALL_PPF for this. Use the piece of code below to get the guid, and then you can use CRM_ORDER_READ to get the partners. After that you can use the FM to send mails(Dont' remember the name right now) to send mails to all the partners. Hope this will help.
      "ASSIGN io_appl_object to
      DATA: lv_appl_object TYPE REF TO cl_doc_crm_order.
    cast object to application object
      lv_appl_object ?= io_appl_object.
      CALL METHOD lv_appl_object->get_crm_obj_guid
        RECEIVING
          result = ls_guid.

  • Suddendly (no external shock) Thunderbird stopped finding the address book, but it finds the right addresses when sending a mail with a name existing in the Boo

    The phrase is all what happens. If ask for the address of, say, Joe (existing in the book), it gives nothing. If I write an e-mail message to Joe, Thunderbird inserts the correct address to Joe, and if I send it, it goes correctly. The Address book looks "strange" its content (nearly empty) does not correspond to what it was. I am working in Linux Mint 17.1 with great satisfaction fo the rest.
    Thanks for helping. Giancarlo.

    Thanks for answering,
    however I miss what to send you: The address book is missing most of my contacts (they were there, before), but if I send a mail to one of those missing contacts Thunderbird attach the correct address without my intervention: funny. Mau be a virus did that, bu how can I recover the missing address book (hidden somewhere, certainly). I cannot show in a screen copy the facts I describe here. Anyway I enclose the screenshot of the opening of the actual address book. Please ask me any useful question on the above.
    Again thank and greetings,
    giancarlo.

  • Ex2010 -Probem with sending internal and external e-mail

    Hi
    In night we have a problem with time sync on VMWare Host so our Exchange Environment stopped working. Edge server (Ex 2010 SP3 full update) stopped transfer e-mails to mailbox server (Ex 2010 SP3 full update). After time synchronization e-mails were
    treansfered to mailbox server. Users was able to send e-mail inside and outside but after 20-40 minutes users cannot send e-mails - between themselves and outside.
    I don't see any e-mails in mailbox queues or using get-messagetrackinlog. I sent e-mail to our test e-mail mailbox on gmail and outlook.com. They wrere not be delivered by mailbox server. I can't find it using get-messagetrackinglog or in mailbox qeue.
    What was happen? How to solve this problem?

    Hi,
    Please disable 3rd party AVs for a little while as Ed mentioned.
    Also check whether there is any related error message in App Log.
    Thanks
    Mavis Huang
    TechNet Community Support

  • Send SAP-Mail by external app with SAP Mail-Interface

    Hi!
    I need to send a SAP Mail from a third party application. I found a way to send a mail without interface using functions like "so_new_document_att_send_api1" or "so_object_send". But what I need is a function which shows a SAPGui with an interface like in SO01 where the user can change the subject or the message and of course I need to initialize some fields like subject and I need to add an attachment (SAP BO -> a document).
    Thanks for any answer,
    Konrad

    Hi!
    I need to send a SAP Mail from a third party application. I found a way to send a mail without interface using functions like "so_new_document_att_send_api1" or "so_object_send". But what I need is a function which shows a SAPGui with an interface like in SO01 where the user can change the subject or the message and of course I need to initialize some fields like subject and I need to add an attachment (SAP BO -> a document).
    Thanks for any answer,
    Konrad

  • I can receive e-mails, but can't send them from external account

    I have my school e-mail account attached to my iPhone. I can receive e-mails without a problem, but whenever I try to send e-mail to someone outside the .edu server, I receive the error message: "The server rejected one of the recipient's addresses. The message has been placed in your outbox." How can I fix this problem? Thank you for your help!

    This indicates the account's SMTP server is not authenticated.
    Most, if not all internet service providers block the use of SMTP servers that are outside of the ISP's network or not provided by the ISP being used for your internet connection at the time unless the SMTP server is authenticated. When connected to a cell phone carrier's cellular network for internet access is no exception. Does this occur when connected to the school's wi-fi network in addition when connected to AT&T's cellular network?

  • Sending e-mail to external addresses from business activities

    Hi Experts,
    I’m customizing CRM 5.0 and I want to send e-mails to other employees, when I’m maintaining a business activity.
    These employees can have no SAP user, so I need this e-mail to go to the address maintained in BP transaction (e.g. alda.lobato@enterprises’sname.net).
    So, I tried to customize in trx. CRMC_ACTION_CONF, the following data / conditions:
    Tab “Overview” – "Partner Determination"
    - Partner Function: 00000014
    - Description: Employee Responsible
    - Partner Number: blank
    Tab “Processing Details” – "Details of Selected Processing" – "Recipient(s)"
    - Recipient Type: U Internet address
    - Address: blank
    - Archive Mode: 1 Mail Only
    However, all the e-mails remain to being sent to the Employee Business Workplace (trx. SBWP), as we were sending the email to his SAP user.
    Please advise.
    Many thanks.
    Alda Lobato

    Hi Patrik,
    First of all, thanks for your quick answer.
    I maintained the Email address in “Communication” area (as already maintained) and in “Address-Independent Communication” area, but the Emails remain to being sent to Employee Business Workplace (trx. SBWP).
    The “Standard Address” area that you indicated, only have the fields “Street/House number”, “Postal code/City”, “Country”, “Region” and Time zone” - I don’t have the field Email address – so I figured out that you talking about the “Address-Independent Communication” area.
    After this, I did another test, which was maintaining the Email address only in “Address-Independent Communication” area. When I sent the Email through the business activity, appears the error message “Action could not be successfully executed”.
    This mean that the Email address must be maintained in “Communication” area but it seems that independently the Email address maintained here, the Email is always sent to Employee Business Workplace.
    Please advise.
    Many thanks,
    Alda Lobato

  • Error while sending a mail using UTP_MAIL package in Oracle 10g

    Hi,
    We are using UTP_MAIL package to send a mail from Oracle 10g.We have follwed the following steps ...
    SQL> connect sys/password as sysdba
    Connected.
    SQL> @$ORACLE_HOME/rdbms/admin/utlmail.sql
    Package created.
    Synonym created.
    SQL> @$ORACLE_HOME /rdbms/admin/prvtmail.plb
    Package body created.
    SQL > alter system set smtp_out_server = '<mail_server_ip:25>' scope =spfile;
    System altered..
    Now we try the code
    begin
    utl_mail.send(
    sender => 'sender's mail',
    recipients => 'receiver mail',
    CC => 'optional',
    subject => 'Testing utl_mail',
    message => 'Test Mail'
    end;
    But we get the following error...
    ERROR at line 1:
    ORA-29278: SMTP transient error: 421 Service not available
    ORA-06512: at "SYS.UTL_SMTP", line 21
    ORA-06512: at "SYS.UTL_SMTP", line 97
    ORA-06512: at "SYS.UTL_SMTP", line 139
    ORA-06512: at "SYS.UTL_MAIL", line 405
    ORA-06512: at "SYS.UTL_MAIL", line 594
    ORA-06512: at line 2
    We also tried connecting to the mail server through telnet .But it is not getting connected..
    Please help us to solve the issue.

    From your own posting you may have the clue, if you try to access your mail server through telnet and it is not successful, it means the service is down or there are networking issues.
    On pre 10gR2 versions there was a bug 4083461.8. It could affect you if you are on 10gR1
    "Bug 4083461 - UTL_SMTP.OPEN_CONNECTION in shared server fails with ORA-29278 Doc ID:      Note:4083461.8"
    This was fixed on 10gR2 base and on 9.2.0.8.0
    ~ Madrid

  • Send email to external user using fm 'SO_NEW_DOCUMENT_ATT_SEND_API1'

    Hi friends,
    I wrote this code to send mail to external user from sap.
    It did not work properly can anyone help me to send email to extenal user.
    The return code after executing the function module is 2.
    DATA: OBJPACK LIKE SOPCKLSTI1 OCCURS  2 WITH HEADER LINE.
    DATA: OBJHEAD LIKE SOLISTI1   OCCURS  1 WITH HEADER LINE.
    DATA: OBJBIN  LIKE SOLISTI1   OCCURS 10 WITH HEADER LINE.
    DATA: OBJTXT  LIKE SOLISTI1   OCCURS 10 WITH HEADER LINE.
    DATA: RECLIST LIKE SOMLRECI1  OCCURS  5 WITH HEADER LINE.
    DATA: DOC_CHNG LIKE SODOCCHGI1.
    DATA: TAB_LINES LIKE SY-TABIX.
    Creating the document to be sent
    DOC_CHNG-OBJ_NAME = 'OFFER'.
    DOC_CHNG-OBJ_DESCR = 'abcd'.
    OBJTXT = 'aaaaaaaaaaa:'.
    APPEND OBJTXT.
    OBJTXT = 'bbbbbbbbbb'.
    APPEND OBJTXT.
    OBJTXT = 'ccccccccccccc.'.
    APPEND OBJTXT.
    DESCRIBE TABLE OBJTXT LINES TAB_LINES.
    READ TABLE OBJTXT INDEX TAB_LINES.
    DOC_CHNG-DOC_SIZE = ( TAB_LINES - 1 ) * 255 + STRLEN( OBJTXT ).
    RECLIST-RECEIVER = mail address.
    RECLIST-REC_TYPE = 'U'.
    RECLIST-COM_TYPE = 'INT'.
    RECLIST-NOTIF_DEL = 'X'.
    RECLIST-NOIF_NDEL = 'X'.
    APPEND RECLIST.
    Creating the entry for the compressed document
    CLEAR OBJPACK-TRANSF_BIN.
    OBJPACK-HEAD_START = 1.
    OBJPACK-HEAD_NUM   = 0.
    OBJPACK-BODY_START = 1.
    OBJPACK-BODY_NUM   = TAB_LINES.
    OBJPACK-DOC_TYPE   = 'RAW'.
    APPEND OBJPACK.
    Creating the document attachment
    (Assume the data in OBJBIN are given in BMP format)
    OBJBIN = ' \O/ '. APPEND OBJBIN.
    OBJBIN = '     '. APPEND OBJBIN.
    OBJBIN = ' / \ '. APPEND OBJBIN.
    DESCRIBE TABLE OBJBIN LINES TAB_LINES.
    OBJHEAD = 'picasso.bmp'. APPEND OBJHEAD.
    Creating the entry for the compressed attachment
    OBJPACK-TRANSF_BIN = 'X'.
    OBJPACK-HEAD_START = 1.
    OBJPACK-HEAD_NUM   = 1.
    OBJPACK-BODY_START = 1.
    OBJPACK-BODY_NUM   = TAB_LINES.
    OBJPACK-DOC_TYPE   = 'BMP'.
    OBJPACK-OBJ_NAME   = 'ATTACHMENT'.
    OBJPACK-OBJ_DESCR = 'Reproduction object 138'.
    OBJPACK-DOC_SIZE   = TAB_LINES * 255.
      APPEND OBJPACK..
    Sending the document
    CALL FUNCTION 'SO_NEW_DOCUMENT_ATT_SEND_API1'
         EXPORTING
              DOCUMENT_DATA = DOC_CHNG
              PUT_IN_OUTBOX = 'X'
              COMMIT_WORK   = 'X'
         TABLES
              PACKING_LIST  = OBJPACK
              OBJECT_HEADER = OBJHEAD
             CONTENTS_BIN  = OBJBIN
               CONTENTS_TXT  = OBJTXT
               RECEIVERS     = RECLIST
          EXCEPTIONS
               TOO_MANY_RECEIVERS = 1
               DOCUMENT_NOT_SENT  = 2
               OPERATION_NO_AUTHORIZATION = 4
               OTHERS = 99.
    IF SY-SUBRC NE 0.
    MESSAGE ID SY-MSGID TYPE SY-MSGTY NUMBER SY-MSGNO
    WITH SY-MSGV1 SY-MSGV2 SY-MSGV3 SY-MSGV4.
    ENDIF.

    Hi,
    Check in SCOT t-code whether it has been properly configred to send the mails
    Regards,
    siva chalasani.

Maybe you are looking for