Utl.mail - smtp_out_server parameter

Message was edited by:
seth

You can use any SMTP server for UTL_MAIL. The basic requirement is that the SMTP server much be reachable from the Oracle server platform.
You can test this as follows. On the Oracle server platform, open a console/shell/ssh window and try to telnet on port 25 into that SMTP server. E.g.
/home/billy> telnet localhost 25
Trying 127.0.0.1...
Connected to localhost.localdomain.
Escape character is '^]'.
220 .... ESMTP Exim 4.63 Fri, 22 Feb 2008 11:40:31 +0200
Secondly, the article stated that you need to authorise yourself using your gmail account details. Again, you can use telnet as shown above and see how this process works. You will need to send SMTP auth command(s) to the server, using your gmail account name and password.
I've never dealt with a SMTP server requiring authorisation and cannot comment on these commands.
You must realise though that SMTP is a clear text protocol - it is not encrypted. And should you transmit your gmail account details like this, it can be very easily sniffed and intercepted. And your gmail account will be compromised.
This make me wonder if the gmail SMTP server actually uses clear text SMTP. This would seem to be very insecure - I would have expected this to use some form of encryption, if not for the entire conversation (SSL), at least for the authentication part.
Unfortunately I'm behind numerous firewalls at the moment and cannot test how gmail's SMTP server works. But telnet is your friend in situations like this and I suggest that you first figure out how to interact with gmail's SMTP server, before attempting to write a single line of PL/SQL code to do this.

Similar Messages

  • UTL.MAIL error ORA-29279: SMTP permanent error: 501 Address Syntax Error in

    Hi,
    I am new to the forum so please excuse if I post incorrectly without conforming to the standards.
    We need to send mails using the UTL.MAIL package and have installed them on the database.
    Whenever I am trying to send an email I am getting the following error:
    ERROR at line 1:
    ORA-29279: SMTP permanent error: 501 Address Syntax Error in
    [email protected]
    ORA-06512: at "SYS.UTL_MAIL", line 654
    ORA-06512: at "SYS.UTL_MAIL", line 671
    ORA-06512: at line 2
    The test code which I am running is as follows:
    BEGIN
    UTL_MAIL.send(sender => 'test <[email protected]>',
    recipients => '[email protected]',
    subject => 'UTL_MAIL test subject',
    message => 'UTL_MAIL test body');
    END;
    I have tried different combinations:
    BEGIN
    UTL_MAIL.send(sender => 'test "<[email protected]>"',
    recipients => '[email protected]',
    subject => 'UTL_MAIL test subject',
    message => 'UTL_MAIL test body');
    END;
    even tried
    BEGIN
    UTL_MAIL.send(sender => '[email protected]',
    recipients => '[email protected]',
    subject => 'UTL_MAIL test subject',
    message => 'UTL_MAIL test body');
    END;
    Everytime I am getting the same error.
    This seems to be working with an exchange mail server but never on the SMTP server.
    In the SMTP server logs the sender address is not having the angular brackets <> unlike the other mails which are being sent over.
    It seems that the SMTP server is pretty strict and the SMTP admin will not change any settings on the server.
    The oracle version is as follows
    Oracle Database 11g Release 11.2.0.1.0 - 64bit Production
    Could you please help me out with a solution.
    Some how the angular brackets are geting stripped off (which UTL MAIL package generally does), Is there any way in which I can include the angular brackets.
    Edited by: 984757 on 29-Jan-2013 02:56
    Edited by: 984757 on 29-Jan-2013 02:57

    I dislike UTL_MAIL - clunky and poor abstraction interface, and not well written.
    Had a look at the code. It does this:
    WHILE (ALL_RCPTS IS NOT NULL) LOOP
          UTL_SMTP.RCPT(MAIL_CONN,'&lt;' || GET_ADDRESS(ALL_RCPTS) || '&gt;');
    END LOOP;The GET_ADDRESS() function process the ALL_RCPTS parameter, returns the 1st address from it, and updates the (in/out) parameter with the remaining string.
    SQL> var address varchar2(200);
    SQL> exec :address := '<[email protected]>,[email protected]';
    PL/SQL procedure successfully completed.
    SQL> exec dbms_output.put_line( 'get_address='||UTL_MAIL.GET_ADDRESS(:address)||' address='||:address );
    get_address=[email protected] address=[email protected]
    PL/SQL procedure successfully completed.
    SQL> exec dbms_output.put_line( 'get_address='||UTL_MAIL.GET_ADDRESS(:address)||' address='||:address );
    get_address=[email protected] address=
    PL/SQL procedure successfully completed.
    SQL> The address is explicitly surrounded by brackets as per the RFC. So that is what your SMTP server should see.
    If not - perhaps then our UTL_MAIL versions do not match. Cannot recall from what version I pulled and unwrapped the UTL_MAIL package code I have.
    Personally though, I've ceased using UTL_MAIL a while back. It lacks in may respects. I have written my own mail package that supports multiple attachment, complex Mime formatting, attachments of 20+ MB in size, and so on - running on the UTL_SMTP interface (that provides the transport layer for sending mail). And for issues like you are facing, I suggest considering using UTL_SMTP directly.
    Edited by: Billy Verreynne on Jan 29, 2013 12:52 PM
    (Updated the code with HTML entity names to get the code snippet to render correctly)

  • Whts size limit of UTL MAIL VARCHAR2 can i send large mail from utl mail?

    hi
    i like to send email from oracle as attachment
    is there any facility to send large email from oracle UTL MAIL utlity
    and i want to attach my file to email which is on server at particular
    can i attach file directly from server?

    See, http://www.psoug.org/reference/utl_mail.html
    might help you.

  • UTL Mail fields instead of items

    Do you know the syntax on adding a field to an email message section using utl mail?
    I wanted to know how I can grab the registration_id, full_name, course_name fields and put it in the message rather than specific items.
    UTL_MAIL.send
    ( sender => '[email protected]',
    recipients => :P1_EMAIL,
    subject => 'Wait List',
    message => registration_id, full_name, course_name
    );

    Hi,
    just assign the values to variables and use them. In APEX you can write normal PL/SQL code, only the bind variable syntax for referencing page items with :PAGE_ITEM is a special syntax, everything else is normal PL/SQL code.
    eg.
    DECLARE
        vCourseName VARCHAR2(40);
    BEGIN
        SELECT NAME
          INTO vCourseName
          FROM COURSE
         WHERE ID = :P1_COURSE_ID
        UTL_MAIL.send
          ( sender => '[email protected]',
            recipients => :P1_EMAIL,
            subject => 'Wait List',
            message => 'course_name '||vCourseName
    END;Patrick

  • UTL MAIL a positional parameter association may not follow a named associat

    I am trying to sale 2 emails, I got the code like this
    {code|
    utl_mail.send(sender => '[email protected]',
    recipients => '[email protected]','[email protected]',
    subject => 'Banner Duplicate Report '||trunc(sysdate)||' Process for Managing Known Duplicate Reports',
    message => 'You are about to receive a report with possible duplicates in the Database, THIS IS A TEST' ||chr(10)||chr(13)||
    I am getting this error...
    PLS-00312 a positional parameter association may not follow a named association....
    I try to separate the email by ; does not work either...
    Thank you 
    Ps I changed the real emails by xxxx                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                       

    842471 wrote:
    I am getting this error...
    PLS-00312 a positional parameter association may not follow a named association.... The reason for the error. You are writing this:
    utl_mail.send(
      sender     =>  '[email protected]', 
      recipients => '[email protected]',
      '[email protected]',
       subject    => 'Banner Duplicate Report '||trunc(sysdate)||' Process for Managing Known Duplicate Reports',
      ..etc..
    );The compiler/parser sees that you are specifying the parameter name followed by the value. So:
    This is fine:
    sender     =>  '[email protected]',
    So is this:
    recipients => '[email protected]',
    But what is this? Parameters are separated with commas. Where is the parameter name?
    +'[email protected]',+
    PL/SQL can either support the call where you do not specify the parameter name. For example: (using positional parameters)
    DBMS_OUTPUT.put_line( 'hello world' );
    Or support where you do specify the parameter names. For example: (using named parameters)
    DBMS_OUTPUT.put_line( a => 'hello world' );
    But you cannot mix these two methods as you have done. Thus the error message stating exactly this.
    The recipients parameter is scalar value. It expects a single string value. Not multiples values.
    The string itself can contain a comma delimited list of recipients. E.g.
    recipients => '[email protected],[email protected],[email protected]',

  • Sending Output of SQL Through UTL Mail

    Hello,
    We have oracle 10gR2 on sun solaris.
    I need to email an output of a SQL Qurey by using utl_mail or some other method.
    Can anyone of you point on how I can do that.
    Thanks

    I am spooling the output to a file and trying to send as an attachment. I receive the mail with an text.txt attachment , but it does not show the actual data. Am I doing wrong in any declaration.And that is the wrong thing to do. Do not spool anything to file. It is not needed.
    First you need to understand how an e-mail looks like. It has a header - this includes the subject, the recipients, the sender, and so on. A blank line. Then the e-mail body follows. The e-mail body can have boundary lines, splitting the body into parts. A part can be, for example, an attachment. This part will contain the type of data in that boundary. And in the case of an attachment, the filename to use to save that boundary's contents as a file.
    And this is what UTL_MAIL does - it creates such an e-mail body for you. It puts the contents of the attachment parameter into the e-mail body. It uses the filename in the header part of that boundary to tell the e-mail reader what the filename is for that contents.
    Using the following UTL_MAIL code:
    SQL> declare
      2  begin
      3          SYS.UTL_MAIL.send_attach_varchar2(
      4                  sender => '[email protected]'
      5                  ,recipients => '[email protected]'
      6                  ,cc => NULL
      7                  ,bcc => NULL
      8                  ,subject => 'Sample Mail from UTL_MAIL'
      9                  ,message => 'This line will be written to message '||
    10                                  'body - a boundary will be written after it to write the attachment.'
    11                  ,mime_type => 'text/plain; charset=us-ascii'
    12                  ,priority => 2
    13                  ,attachment => '<html><table><tr><td>Row 1</td><td>data..</td></tr>'||
    14                                  '<tr><td>Row 2</td><td>data..</td></tr></table></html>'
    15                  ,att_inline => TRUE
    16                  ,att_mime_type => 'text/html'
    17                  ,att_filename => 'sample-attachment.html'
    18          );
    19  end;
    20  /
    PL/SQL procedure successfully completed.Results in the following e-mail being generated and send via SMTP:
    From: [email protected]
    To: [email protected]
    Subject: =?ISO-8859-1?Q?Sample=20Mail=20from=20UTL=5FMAIL?=
    X-Priority: 2
    Content-Type: multipart/mixed; boundary="------------4D8C24=_23F7E4A13B2357B3"
    Return-Path: [email protected]
    Date: 12 Nov 2009 07:20:52 +0200
    Mime-Version: 1.0
    This is a multi-part message in MIME format.
    --------------4D8C24=_23F7E4A13B2357B3
    Content-Type: text/plain; charset=us-ascii
    Content-Transfer-Encoding: 7bit
    This line will be written to message body - a boundary will be written after it to write the attachment.
    --------------4D8C24=_23F7E4A13B2357B3
    Content-Type: text/html; name="sample-attachment.html"
    Content-Transfer-Encoding: quoted-printable
    Content-Disposition: inline; filename="sample-attachment.html"
    <html><table><tr><td>Row 1</td><td>data..</td></tr><tr><td>Row 2</td><td>da=
    ta..</td></tr></table></html>
    --------------4D8C24=_23F7E4A13B2357B3--

  • Hw to write txt in mail body using UTL mail when sending mail with attachme

    hi all
    i m using oracle demo mail package to send csv file as attachment to different users its successfull and i can also able to attach text file to it
    but i m unable to write any text in mail body .
    e.g.
    mail body can be--
    hi
    This is test mail.
    Regds
    Sender.
    can anyone suggest some way?

    u can try this code
    this code takes the file from database and attach with mail and also send the body with it
    it works fine.
    CREATE OR REPLACE
    procedure pdf_mail(
    p_sender varchar2, -- sender, example: 'Me '
    p_recipients varchar2, -- recipients, example: 'Someone '
    p_subject varchar2, -- subject
    p_text long, -- text
    p_case_id number,
    p_email_log_id number
    -- p_filename varchar2, -- name of pdf file
    p_blob   blob     pdf file
    ) is
    conn utl_smtp.connection;
    i number;
    len number;
    p_message_part varchar2(32767);
    cursor c1 is
    select file_name,document_pic
    from clm_case_attachments ca,email_log_detail em
    where
    case_id = p_case_id
    and ca.CASE_ATTACHMENT_ID = em.ATTACHMENT_ID
    and em.ACTIVE = 'Y'
    and em.EMAIL_LOG_ID = p_email_log_id;
    BEGIN
    conn := demo_mail.begin_mail(
    sender => p_sender,
    recipients => p_recipients,
    subject => p_subject,
    mime_type => demo_mail.MULTIPART_MIME_TYPE);
    demo_mail.attach_text(
    conn => conn,
    data => p_text,
    mime_type => 'text/html');
    for lp in c1 loop
    demo_mail.begin_attachment(
    conn => conn,
    mime_type => 'application/pdf',
    inline => TRUE,
    filename => lp.file_name,
    transfer_enc => 'base64');
    -- split the Base64 encoded attachment into multiple lines
    i := 1;
    len := DBMS_LOB.getLength(lp.document_pic);
    WHILE (i < len) LOOP
    IF(i + demo_mail.MAX_BASE64_LINE_WIDTH < len)THEN
    UTL_SMTP.Write_Raw_Data (conn
    , UTL_ENCODE.Base64_Encode(
    DBMS_LOB.Substr(lp.document_pic, demo_mail.MAX_BASE64_LINE_WIDTH, i)));
    ELSE
    UTL_SMTP.Write_Raw_Data (conn
    , UTL_ENCODE.Base64_Encode(
    DBMS_LOB.Substr(lp.document_pic, (len - i)+1, i)));
    END IF;
    UTL_SMTP.Write_Data(conn, UTL_TCP.CRLF);
    i := i + demo_mail.MAX_BASE64_LINE_WIDTH;
    END LOOP;
    demo_mail.end_attachment(conn => conn);
    end loop;
    demo_mail.end_mail( conn => conn );
    END;
    /

  • How to send a mail using utl_mail

    Dear Experts
    i am facing problem while using the utl_mail package. whatever steps i have follow is underwritten.
    have a look.......
    SQL> ALTER SYSTEM SET SMTP_OUT_SERVER='smtp.gmail.com' SCOPE=SPFILE;
    System altered.
    SQL> @?/rdbms/admin/utlmail.sql
    Package created.
    Synonym created.
    SQL> @?/rdbms/admin/prvtmail.plb
    Package body created.
    No errors.
    SQL> BEGIN
    2 UTL_MAIL.SEND(SENDER => '[email protected]',recipients => '[email protected]',message => 'all is well', subject =>'wishes 4 u');
    3 END;
    4 /
    BEGIN
    ERROR at line 1:
    ORA-29279: SMTP permanent error: 530 5.7.0 Must issue a STARTTLS command first.
    39sm1824546yxd.6
    ORA-06512: at "SYS.UTL_SMTP", line 21
    ORA-06512: at "SYS.UTL_SMTP", line 99
    ORA-06512: at "SYS.UTL_SMTP", line 222
    ORA-06512: at "SYS.UTL_MAIL", line 407
    ORA-06512: at "SYS.UTL_MAIL", line 594
    ORA-06512: at line 2
    please do needful..
    thanks in advance.
    regards
    dharmendra

    But, you apparently do have an internet account (usually nowadays internet and email etc. is 'all included'), else you wouldn't be posting here. So, let's assume your provider is ACME and you live in Holland (= .nl), then you could try:
    ALTER SYSTEM SET smtp_out_server='smtp.acme.nl' SCOPE=SPFILE;
    You need to figure that out yourself, since we don't know who provides you internet access (nor whether it would work).
    That would be the simplest way.
    Not sure whether you can get gmail etc. to 'work with you': Re: utl.mail - smtp_out_server parameter

  • Sending mail with attachment

    Hello Team,
    We have scheduled a script to run every night which will generate a report file(html).we would like to receive that report (html file) to our inbox through mail.
    please suggest the best way to do that.
    Apps 11.5.10.2
    DB 10.2.0.4
    Regards,
    SRk

    Hi Sujoy,
    Thanks for the reply.in UTL_MAIL package how to passs the value for *'smtp_out_server'* parameter?
    when i checked that in DB it is showing the following
    SQL> sho parameter SMTP_OUT_SERVER
    NAME                                 TYPE        VALUE
    smtp_out_server                      string
    where else i can check out the value of smtp_out_server

  • E-Mail using UTL_MAIL

    Hi All,
    I am using Oracle 10g database and am trying to send e-mail using the UTL_MAIL.SEND functions.
    I followed the instructions given here: http://technotes.towardsjob.com/oracle/utl-mail-package-oracle-10g/
    The code that I am trying to execute is :
    DECLARE
    sender varchar2(64);
    recipients varchar2(64);
    subject varchar2(64);
    message varchar2(64);
    pri number;
    BEGIN
    sender:= '[email protected]';
    recipients:= '[email protected]';
    subject:= 'Test';
    message:= 'Test Message';
    UTL_MAIL.SEND(sender,recipients,'[email protected]','[email protected]','null',2);
    END;
    and I am getting the error
    ORA-04063: package body "STERLING.UTL_MAIL" has errors
    ORA-06508: PL/SQL: could not find program unit being called
    Please help as to what I can do now.
    Thanks in advance
    Sid

    hi,
    You must both install UTL_MAIL and define the SMTP_OUT_SERVER.
    To install UTL_MAIL:
    sqlplus sys/<pwd>
    SQL> @$ORACLE_HOME/rdbms/admin/utlmail.sql
    SQL> @$ORACLE_HOME/rdbms/admin/prvtmail.plb
    to give perminssion to a user to send mail
    grant execute on utl_mail to username;
    EXECUTE UTL_MAIL.send(sender =>'[email protected]',recipients =>'[email protected]',subject =>'Test Mail',message => 'Hello World',mime_type => 'text; charset=us-ascii',priority => 3);
    hope this help
    regards,
    deepak

  • Mail package in 10g

    hi,
    i have just compiled a package called UTL_MAIL from utlmail.sql as sys user
    can i give priveleges to other users to access this package, coz i have failed in doing so
    it gives an error , table/view doesnot exist
    after i run the following command
    grant execute on SYS.UTL_MAIL to HR;

    UTL_MAIL,
    The UTL_MAIL package provides a simple API to allow email to be sent from PL/SQL. In prior versions this was possible using the UTL_SMTP package, but this required knowledge of the SMTP protocol.
    The package is loaded by running the following scripts:
    CONN sys/password AS SYSDBA
    @$ORACLE_HOME/rdbms/admin/utlmail.sql
    @$ORACLE_HOME/rdbms/admin/prvtmail.plb
    In addition the SMTP_OUT_SERVER parameter must be set to identify the SMTP server:
    CONN sys/password AS SYSDBA
    ALTER SYSTEM SET smtp_out_server='smtp.domain.com' SCOPE=SPFILE;
    SHUTDOWN IMMEDIATE
    STARTUP
    With the configuration complete we can now send a mail using:
    BEGIN
      UTL_MAIL.send(sender     => '[email protected]',
                    recipients => '[email protected],[email protected]',
                    cc         => '[email protected]',
                    bcc        => '[email protected]',
                    subject    => 'UTL_MAIL Test',
                    message    => 'If you get this message it worked!');
    END;
    /Best Regards,
    Francisco Munoz Alvarez
    www.oraclenz.com

  • Unable to send mails from apex3.0

    Hi friends,
    When i am trying to push the mail queue i am getting this error..please help me
    ORA-29278: SMTP transient error: 421 Service not available
    Regards,
    Rags.

    Hi Rags,
    Look wether the SMTP Service is running.
    Try to set smtp_out_server parameter to a valid smtp server.
    Have a look at another thread:
    ORA-29278: SMTP transient error: 421 Service not available
    Also you have to read this document:
    http://www.oracle.com/technology/products/database/application_express/howtos/howto_workflow.html
    Could be the bug described in doc.id 4083461.8 on metalink, affects
    all version prior to 10.2
    Hope you find the solution,
    ben

  • SMTP service on in oracle database to send mail directly from oracle databa

    I want to send mail from my oracle database.
    I have followed the steps below:
    1> Run utlmail.sql & prvtmail.plb
    2>set smtp_out_server parameter
    3>To send mail, execute utl_mail.send(sender=>'',recipients=>'',message=>'ABC');
    My concept is to provide smtp/mail server ip & port in smtp_out_server parameter's value.
    But One person said that oracle database server can make itself as a smtp server.So that we can assign database server ip & port in smtp_out_server parameter's value.We have to just on the smtp service in oracle database itself.There is no requirement of smtp/mail server ip & port.Is it true?How can we do that?
    In google to Add an SMTP Service,the document said in the 1st line that on the Services tab on the left, select a Process tree node (for example, the default Oracle Enterprise Gateway).
    I am sorry to say that I did not find that.Anyone can help me please?
    Please reply anyone.
    Edited by: 979620 on Feb 6, 2013 3:20 AM

    Hi Richa:
    As you mentioned, it has been working for the last six moneth. Was there any changes before it stopped working?
    Also you mentioned you were able to recieve mails from Domain user. Could you please get the Internet Headers: Open a mail from domain sender -> file ->property -> Internet Headers, send it with a mail to me:[email protected]
    Meanwhile, as this is a Office 365 related issue, it is better to post your quesetion in
    this forum. Thank you.

  • Send mail from my oracle database

    I want to send mail from my oracle database.
    I have followed the steps below:
    1> Run utlmail.sql & prvtmail.plb
    2>set smtp_out_server parameter
    3>To send mail, execute utl_mail.send(sender=>'',recipients=>'',message=>'ABC');
    My concept is to provide smtp/mail server ip & port in smtp_out_server parameter's value.
    But One person said that oracle database server can make itself as a smtp server.So that we can assign database server ip & port in smtp_out_server parameter's value.We have to just on the smtp service in oracle database itself.There is no requirement of smtp/mail server ip & port.Is it true?How can we do that?
    In google to Add an SMTP Service,the document said in the 1st line that on the Services tab on the left, select a Process tree node (for example, the default Oracle Enterprise Gateway).
    I am sorry to say that I did not find that.Anyone can help me please?
    Please reply anyone.

    979620 wrote:
    But One person said that oracle database server can make itself as a smtp server.So that we can assign database server ip & port in smtp_out_server parameter's value.We have to just on the smtp service in oracle database itself.There is no requirement of smtp/mail server ip & port.Is it true?How can we do that?Not true - I cannot recall ever seeing a native service in the Oracle database that acts as a SMTP server.
    PL/SQL code can only create and use tcp client sockets via UTL_TCP. A tcp server socket is needed for a SMTP server.
    The Oracle database also does not listen and accept incoming client tcp connections - the Oracle Listener does that (separate process/layer).
    The Oracle database instance registers the services it has available with the Listener. There are 3 basic type of services that the instance will register:
    - dedicated services (supporting Oracle client connections)
    - dispatchers for shared services (supporting Oracle client connections)
    - http/ftp services (supporting XMLDB WebDav, WebService and EPG servlets access for web based clients)
    There is no support for a SMTP service.
    You can install SMTP server s/w on the same platform as the Oracle server s/w. You may even (via Oracle Collaboration services I think) use the Oracle database for mail drops and mail boxes (storage). But I have not yet seen an actual SMTP server running as PL/SQL or Java code inside a database instance as a database server process.

  • UTL_MAIL: ORA-29279..... 501 badly formatted MAIL FROM user - no " "

    Hi guys,
    I’m trying to redesign a current process that requires a large amount of manual intervention. As such I’d like to utilise UTL_MAIL to send notifications of system events but have been unable to get it to execute on my dev database (installed on my local PC).
    O/S ver:
    Windows XP SP3
    Oracle ver:
    BANNER
    Oracle Database 10g Enterprise Edition Release 10.2.0.3.0 - Prod
    PL/SQL Release 10.2.0.3.0 - Production
    CORE    10.2.0.3.0      Production
    TNS for 32-bit Windows: Version 10.2.0.3.0 - Production
    NLSRTL Version 10.2.0.3.0 - Production
    I’ve configured the smtp_out_server parameter:
    SQL> sho parameter smtp_out_server;
    NAME                                 TYPE        VALUE
    smtp_out_server                  string        XXX.XXX.XXX.80:25
    And installed the required Oracle built in packages:
    SQL> @C:\oracle_builtins\utlmail.sql
    Package created.
    Synonym created.
    SQL> @C:\oracle_builtins\prvtmail.plb
    Package body created.
    No errors.
    I’ve compiled a simple test version of the code:
    CREATE OR REPLACE PROCEDURE test_email IS
    BEGIN
    UTL_MAIL.send(sender     => '[email protected]',
    recipients => '[email protected]',
    subject    => 'UTL_MAIL test subject',
    message    => 'UTL_MAIL test body');
    END;
    +/+
    SQL> @C:\procs\email_proc.sql
    Procedure created.
    However when I execute it I get the attached error(s):
    SQL> execute test_email ;
    BEGIN test_email ; END;
    *+
    ERROR at line 1:
    ORA-29279: SMTP permanent error: 501 badly formatted MAIL FROM user - no <
    ORA-06512: at "SYS.UTL_SMTP", line 21
    ORA-06512: at "SYS.UTL_SMTP", line 99
    ORA-06512: at "SYS.UTL_SMTP", line 222
    ORA-06512: at "SYS.UTL_MAIL", line 397
    ORA-06512: at "SYS.UTL_MAIL", line 608
    ORA-06512: at "SYS.TEST_EMAIL", line 3
    ORA-06512: at line 1
    I’ve also confirmed with our mail team that the sender is included in our firewall config and should not be being blocked……
    Any ideas? Does the package produce any log files / alerts that I could check or is it possible to execute in a verbose mode so I can debug?
    Thanks,
    Chris

    Welcome to the forum.
    That error comes from your SMTP server, and it indicates there's something wrong with the email address.
    You could try the following and see if that works:
    CREATE OR REPLACE PROCEDURE test_email
    IS
    BEGIN
      UTL_MAIL.send(sender => 'test <[email protected]>',
                    recipients => '[email protected]',
                    subject => 'UTL_MAIL test subject',
                    message => 'UTL_MAIL test body'
    END;
    /Some more inputs can be read here: Reg.SMTP Error while using UTL_MAIL in Oracle 10g
    Also, when you want post formatted examples, just use the {noformat}{noformat} tag before and after your examples.
    So, when you type:
    {noformat}select *
    from dual;{noformat}
    it will appear as:select *
    from dual;when you post it.                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                           

Maybe you are looking for

  • How to read file at server? URGENT

    hi, I got stucked to read a file which is at the server, i used this code : java.io.FileInputStream fis; String ipaddr=""; int ch; try      fis=new java.io.FileInputStream("server.ini");      while((ch=fis.read())!=-1)           ipaddr=ipaddr+(char)c

  • Data driven subscription using c#

    I am getting the following error "System.Web.Services.Protocols.SoapException: The required field Field is missing from the input structure. ---> Microsoft.ReportingServices.Diagnostics.Utilities.MissingElementException: The required field Field is m

  • MOS Document:  Convert from Oracle to MySQL

    An Oracle tech just pointed out this note: Oracle VM Manager 3.2.1 database Migration from Oracle RDBMS to or from MySQL (Doc ID 1522460.1) Good stuff! Rob

  • Service pack 3

    i recently purchased Adobe Acrobat XI Pro Student and Teacher Ed (Windows, English).  during installation it stopped with the message "require Service Pack 3".  what is this, and where / how do download?  aslo, how do i remove all other / previous ve

  • Mail doesn't correct spelling

    I'm running the latest Mavericks. When I compose an email, misspelled words do not automatically correct (as they do in TextEdit and other apps). I have gone into Mail Preferences:Composing and chosen "Check spelling as I type".  It doesn't. I've als