Send E-mail from Oracle (9.2.0.1) : SMTP transient error: 421 Service not a

I have used Oracle 9i server (9.2.0.1 version) on Windows XP machine(with SP2).I want to send Email from PL/SQL procedure.
My Question is what sort of configuration needed to perform this activity?
I have installed IIS (Internet Information Service)
in my machine, then configure my SMTP mail server
with a valid email id and password given TCP port 465.
Later I came to know that to send Email from PL/SQL I have to install Oracle JServer Code. Follow three steps. the steps are
1. Execute the script as sys "$ORACLE_HOME\javavm\install\initjvm.sql"
2. Execute the loadjava classfile as
$ORACLE_HOME\plsql\jlib>loadjava -f -v -r -u sys/**** plsql.jar
3. Execute the script as sys "$ORACLE_HOME\rdbms\admin\initplsj.sql"
I sucessfully executed the first step, but for the second step iam not able to locate the plsql.jar file in the specified path.
So Please tell me if there is any other method to perform this task
My code is as follows.
CREATE OR REPLACE PROCEDURE SEND_MAIL (
                              msg_to varchar2,
                              msg_subject varchar2,
                              msg_text varchar2
                              IS
                              c utl_smtp.connection;
                              rc integer;
                              msg_from varchar2(50) := '[email protected]';
                              mailhost VARCHAR2(30) := 'mail.google.com';
                         BEGIN
                              c := utl_smtp.open_connection(mailhost, 465);
                              utl_smtp.helo(c, mailhost);
                              utl_smtp.mail(c, msg_from);
                              utl_smtp.rcpt(c, msg_to);
                              dbms_output.put_line(' Start Sending data');
                              utl_smtp.data(c,'From: Oracle Database' || utl_tcp.crlf ||
                              'To: ' || msg_to || utl_tcp.crlf ||
                              'Subject: ' || msg_subject ||
                              utl_tcp.crlf || msg_text);
                              dbms_output.put_line(' Finish Sending data');
                              utl_smtp.quit(c);
          EXCEPTION
               WHEN UTL_SMTP.INVALID_OPERATION THEN
dbms_output.put_line(' Invalid Operation in Mail attempt using UTL_SMTP.');
               WHEN UTL_SMTP.TRANSIENT_ERROR THEN
dbms_output.put_line(' Temporary e-mail issue - try again');
WHEN UTL_SMTP.PERMANENT_ERROR THEN
dbms_output.put_line(' Permanent Error Encountered.');
END;
Procedure Created.
SQL> execute prc_send_mail('[email protected]','[email protected]','Good Morning.');
BEGIN prc_send_mail('[email protected]','[email protected]','Good Morning.'); END;
ERROR at line 1:
ORA-29278: SMTP transient error: 421 Service not available
ORA-06512: at "SYS.UTL_SMTP", line 17
ORA-06512: at "SYS.UTL_SMTP", line 96
ORA-06512: at "SYS.UTL_SMTP", line 374
ORA-06512: at "SCOTT.PRC_SEND_MAIL", line 19
ORA-29278: SMTP transient error: 421 Service not available
ORA-06512: at line 1.
Please tell me how to solve this problem.
Thank You.

1) Why did you install an SMTP server locally and then tell your code to try to use the server mail.google.com?
2) The error you're getting is from mail.google.com indicating that Google isn't running an open SMTP server there. I would be very surprised if Google were running a publicly available SMTP server anywhere since that would be an invitation for spammers.
Justin

Similar Messages

  • ORA-29278: SMTP transient error:421 Service not available on oracle 10g

    HIi,
    I am trying to send e-mails by using PL/Sql procedure . I am using UTL_MAIL/UTL_SMTP on oracle 10g R1 database.
    There is no problem in creating procedure,but when i am doing execution i am getting the mention error.
    I am trying to send mail with attachment as excel file.
    ORA-20001: The following error has occured: ORA-29278: SMTP transient error:
    421 Service not available
    ORA-06512: at "SCOTT.MAIL_ATT_RAW", line 64
    ORA-06512: at line 1
    -----my procedure code------
    CREATE OR REPLACE PROCEDURE mail_att_raw(filename varchar2) AS
    fil BFILE;
    file_len PLS_INTEGER;
    MAX_LINE_WIDTH PLS_INTEGER := 54;
    buf RAW(2100);
    amt BINARY_INTEGER := 2000;
    pos PLS_INTEGER := 1; /* pointer for each piece */
    filepos PLS_INTEGER := 1; /* pointer for the file */
    filenm VARCHAR2(50) := filename; /* binary file attachment */
    data RAW(2100);
    chunks PLS_INTEGER;
    len PLS_INTEGER;
    modulo PLS_INTEGER;
    pieces PLS_INTEGER;
    err_num NUMBER;
    err_msg VARCHAR2(100);
    resultraw RAW(32000);
    BEGIN
    /* Assign the file a handle */
    fil := BFILENAME('BFILE_DIR', filenm);
    /* Get the length of the file in bytes */
    file_len := dbms_lob.getlength(fil);
    /* Get the remainer when we divide by amt */
    modulo := mod(file_len, amt);
    /* How many pieces? */
    pieces := trunc(file_len / amt);if (modulo <> 0) then
    pieces := pieces + 1;end if;/* Open the file */
    dbms_lob.fileopen(fil, dbms_lob.file_readonly);/* Read the first amt into the buffer */
    dbms_lob.read(fil, amt, filepos, buf);/* For each piece of the file . . . */
    FOR i IN 1..pieces LOOP/* Position file pointer for next read */
    filepos := i * amt + 1;/* Calculate remaining file length */
    file_len := file_len - amt;/* Stick the buffer contents into data */
    data := utl_raw.concat(data, buf);/* Calculate the number of chunks in this piece */
    chunks := trunc(utl_raw.length(data) / MAX_LINE_WIDTH);/* Don't want too many chunks */
    IF (i <> pieces) THEN
    chunks := chunks - 1;
    END IF;/* For each chunk in this piece . . . */
    FOR j IN 0..chunks LOOP/* Position ourselves in this piece */
    pos := j * MAX_LINE_WIDTH + 1;/* Is this the last chunk in this piece? */
    IF (j <> chunks) THEN len := MAX_LINE_WIDTH;
    ELSE
    len := utl_raw.length(data) - pos + 1;
    IF (len > MAX_LINE_width) THEN
    len := MAX_LINE_WIDTH;
    END IF;
    END IF;/* If we got something, let's write it */
    IF (len > 0 ) THEN
    resultraw := resultraw || utl_raw.substr(data, pos, len);
    END IF;
    END LOOP;/* Point at the rest of the data buffer */
    IF (pos + len <= utl_raw.length(data)) THEN
    data := utl_raw.substr(data, pos + len);
    ELSE
    data := NULL;
    END IF;/* We're running out of file, only get the rest of it */
    if (file_len < amt and file_len > 0) then
    amt := file_len;
    end if;/* Read the next amount into the buffer */dbms_lob.read(fil, amt, filepos, buf);
    END LOOP;/* Don't forget to close the file */
    dbms_lob.fileclose(fil);
    SYS.UTL_MAIL.SEND_ATTACH_RAW(sender => '[email protected]', recipients => '[email protected]',subject => 'Testmail', message => 'Hallo', attachment => resultraw, att_filename => filename);
    EXCEPTION
    WHEN OTHERS THEN--dbms_output.put_line('Fehler');
    raise_application_error(-20001,'The following error has occured: ' || sqlerrm);
    END;
    Please suggest me what settings i need to change. This same procedure is running on another maching,but not on my machine.
    If somebody is having any other simple procedure ,please help me.
    My SMTP port -25
    Thanks in advance.

    Hi Justin,
    Please get the answers of your queries
    The error you're getting is coming from the SMTP server you are trying to connect to.
    - What SMTP server is your database configured to use?
    Reply - I am using IIS(5.0)
    - What SMTP server is the database where this code is working configured to use?
    Reply - Same IIS. Database is installed locally on my machine only. I am trying to send mail locally to me only,Not to the outside person.
    - Has the SMTP server been configured to allow connections from both machines?
    Reply - Yes
    One more query, do we really require to set the SMTP_OUT_SERVER parameter for SCOPE=BOTH
    ALTER SYSTEM SET smtp_out_server = '172.16.1.10' SCOPE=BOTH
    I am not able to set like this for BOTH,only for SPFILE i can set ?.
    My SMTP Server IP=172.16.1.10
    PORT- 25
    Thanks
    Manoj

  • Mail Error: ORA-29278: SMTP transient error: 421 Service not available

    I write process to send mail, it is running ok, but I have error ORA-29278: SMTP transient error: 421 Service not available.
    SMTP Host Address : localhost
    SMTP Host Port : 25
    When I connect to database as SYS and run : exec apex_mail.push_queue result is :
    Pushing email: 1225814842675154
    Pushed email: 1225814842675154
    PL/SQL procedure successfully completed.
    Please explain me what is happened!

    Hi;
    What is DB version?
    Please see:
    From Master Note For PL/SQL UTL_SMTP and UTL_MAIL Packages [ID 1137673.1] check Note 604763.1 "ORA-29278: SMTP transient error: 421 Service not available" When Using UTL_SMTP to Send Email.
    Regard
    Helios

  • Sending mail - ORA-29278: SMTP transient error: 421 Service not available

    Hi everybody,
    I am trying to send mail using
    http://www.oracle.com/technology/sample_code/tech/pl_sql/htdocs/Utl_Smtp_Sample.html
    But getting the error as mentioned in the title.
    I searched the forum and find so many threads.
    But not sure what to do.
    Can anyone help me,please?
    Thanks,
    jeneesh

    Hi
    Send you the code we use.
    PROCEDURE send_email (from_name varchar2,to_name varchar2,subject varchar2,message varchar2,max_size number default 9999999999,file_name varchar2 default null) is
    v_smtp_server varchar2(100) := your_smtp_server;
    v_smtp_server_port number := 25;
    v_directory_name varchar2(100);
    v_file_name varchar2(100);
    v_line varchar2(1000);
    crlf varchar2(2):= chr(13) || chr(10);
    mesg varchar2(32767);
    conn UTL_SMTP.CONNECTION;
    v_slash_pos number;
    v_file_handle utl_file.file_type;
    invalid_path exception;
    begin
    conn:= utl_smtp.open_connection( v_smtp_server, v_smtp_server_port );
    utl_smtp.helo( conn, v_smtp_server );
    utl_smtp.mail( conn, from_name );
    utl_smtp.rcpt( conn, to_name );
    utl_smtp.open_data ( conn );
    mesg:= 'Date: ' || TO_CHAR( SYSDATE, 'dd Mon yy hh24:mi:ss' ) || crlf ||
    'From: ' || from_name || crlf ||
    'Subject: ' || subject || crlf ||
    'To: ' || to_name || crlf ||
    'Mime-Version: 1.0' || crlf ||
    'Content-Type: multipart/mixed; boundary="DMW.Boundary.605592468"' ||
    crlf ||
    '' || crlf ||
    '--DMW.Boundary.605592468' || crlf ||
    'Content-Type: text/plain; name="message.txt"; charset=US-ASCII' ||
    crlf ||
    'Content-Disposition: inline; filename="message.txt"' || crlf ||
    'Content-Transfer-Encoding: 7bit' || crlf ||
    '' || crlf ||
    message || crlf ;
    utl_smtp.write_data ( conn, mesg );
    if file_name is not null then
              begin
                        v_slash_pos := instr(file_name, '/', -1 );
                        if v_slash_pos = 0 then
                                  v_slash_pos := instr(file_name, '\', -1 );
                        end if;
                        v_directory_name := substr(file_name, 1, v_slash_pos - 1 );
                        v_file_name := substr(file_name, v_slash_pos + 1 );
                        v_file_handle := utl_file.fopen(v_directory_name, v_file_name, 'r');
                        mesg := crlf || '--DMW.Boundary.605592468' || crlf ||
                        'Content-Type: application/octet-stream; name="' || v_file_name ||
                        '"' || crlf ||
                        'Content-Disposition: attachment; filename="' || v_file_name ||
                        '"' || crlf ||
                        'Content-Transfer-Encoding: 7bit' || crlf || crlf ;
                        utl_smtp.write_data ( conn, mesg );
                        loop
                                  utl_file.get_line(v_file_handle, v_line);
                                  mesg := v_line || crlf;
                                  utl_smtp.write_data ( conn, mesg );
                        end loop;
                        exception
                             when utl_file.invalid_path then
                             dbms_output.put_line('Error in opening attachment ' || file_name);
                             when others then
                             null;
              end;
    end if;
    mesg := crlf || '--DMW.Boundary.605592468--' || crlf;
    utl_smtp.close_data( conn );
    utl_smtp.quit( conn );
    EXCEPTION
    WHEN OTHERS THEN
    dbms_output.put_line(sqlerrm);
    dbms_output.put_line(sqlcode);
    end;
    Hope it helps u

  • Sending a mail from oracle database

    Hi,
    I have a requirement to send a mail from oracle database.I use UTL_TCP package for this.Although my procedure is executed successfully,i dont get the mails in my inbox.Please help me to figure out a solution.
    Thanks in advance....

    Hi, you must use UTL_SMTP package for send emails, it has more performance and features for debug. You must look the next code, this is a example for send emails.
    DECLARE
    c UTL_SMTP.CONNECTION;
    PROCEDURE send_header(name IN VARCHAR2, header IN VARCHAR2) AS
    BEGIN
    UTL_SMTP.WRITE_DATA(c, name || ': ' || header || UTL_TCP.CRLF);
    END;
    BEGIN
    c := UTL_SMTP.OPEN_CONNECTION('smtp-server.acme.com');
    UTL_SMTP.HELO(c, 'foo.com');
    UTL_SMTP.MAIL(c, '[email protected]');
    UTL_SMTP.RCPT(c, '[email protected]');
    UTL_SMTP.OPEN_DATA(c);
    send_header('From', '"Sender" <[email protected]>');
    send_header('To', '"Recipient" <[email protected]>');
    send_header('Subject', 'Hello');
    UTL_SMTP.WRITE_DATA(c, UTL_TCP.CRLF || 'Hello, world!');
    UTL_SMTP.CLOSE_DATA(c);
    UTL_SMTP.QUIT(c);
    EXCEPTION
    WHEN utl_smtp.transient_error OR utl_smtp.permanent_error THEN
    BEGIN
    UTL_SMTP.QUIT(c);
    EXCEPTION
    WHEN UTL_SMTP.TRANSIENT_ERROR OR UTL_SMTP.PERMANENT_ERROR THEN
    NULL; -- When the SMTP server is down or unavailable, we don't have
    -- a connection to the server. The QUIT call will raise an
    -- exception that we can ignore.
    END;
    raise_application_error(-20000,
    'Failed to send mail due to the following error: ' || sqlerrm);
    END;
    Also review the next link for get more information about the UTL_SMTP packege.
    http://download.oracle.com/docs/cd/B19306_01/appdev.102/b14258/u_smtp.htm#sthref15587
    Regards.

  • How a send a mail from  Oracle   ----- urgent

    Hi,
    I am working in oracle9i and linux 2.4. i need to a send mail from oracle .Please send the procedure to me in a detail manner.
    I am having one procedure .plz check and change if possible...
    declare
    l_maicon utl_smtp.connection;
    begin
    l_maicon :=utl_smtp.open_connection('mail.com');
    utl_smtp.helo(l_maicon,'mail.com');
    utl_smtp.mail(l_maicon,'[email protected]');
    utl_smtp.rcpt(l_maicon,'[email protected]');
    utl_smtp.data(l_maicon,'From: [email protected]' || utl_tcp.crlf||
    'To: [email protected]' || utl_tcp.crlf ||
    'Subject: database e-mail option' || utl_tcp.crlf ||
    'You have received this mail from database!');
    utl_smtp.quit(l_maicon);
    end;
    Please explain me in detail
    Gobi....

    If I do a Google search on the terms "Oracle mail", this askTom thread is the second hit
    http://asktom.oracle.com/pls/ask/f?p=4950:8:::::F4950_P8_DISPLAYID:255615160805
    Did you already find this thread? If so, did it not answer your question sufficiently?
    Additionally, it would be quite helpful if you would post the results of running the code you posted. You've given no indication whether there is an error, what error might be generated, whether you're not seeing the expected behavior, whether the code crashes your system, etc. That leaves us to guess about what problems you might have between syntax errors, permission problems, configuration problems on the database, configuration problems on the SMTP server, operating system problems, network problems (the list goes on).
    Justin

  • Send e-mail from oracle forms

    how can i send e-mail from within the form and without opening any e-mail program
    just one click on a button in the form the mail will be sent
    i'm working on nt os

    I use a program called BLAT which is a command line utility to send SMTP messages.
    ( Use the HOST built-in ).
    I tried using MAPI products but they did not work well on the web.
    null

  • Send e-mail from Oracle 9i (9.2.0.1)

    Hi,
    Iam using oracle 9iR2(9.2.0.1) on Widows XP Platform. I want to send mail thru oracle 9i(9.2.0.1) database.
    for that i got a procedure from net. Also they asked to follow three steps. the steps are
    1. Execute the script as sys "D:\Oracle\Ora92\javavm\install\initjvm.sql"
    2. Execute the loadjava classfile as
    D:\Oracle\Ora92\plsql\jlib>loadjava -f -v -r -u sys/**** plsql.jar
    3. Execute the script as sys "$ORACLE_HOME\rdbms\admin\initplsj.sql"
    I sucessfully executed the first step, but for the second step i am not able to locate the plsql.jar file in the specified path.
    So Please tell me if there is any other method to perform this task
    Regards
    Prasanta Pramanik.

    Is there some reason not to use the built-in UTL_SMTP package?
    http://www.psoug.org/reference/utl_smtp.html
    It has been available since 8.1.7.

  • Sending E-mail from Oracle

    Hi,
    I written the below email procedure.I am facing an issues now. I am receving the mail but it does not have any content.
    CREATE OR REPLACE PROCEDURE IIBWP.SEND_MAIL
    is
    l_mailhost VARCHAR2(64) := 'us.ingerrand.com';
    l_from VARCHAR2(64) := '[email protected]';
    l_subject VARCHAR2(64) := 'Duplicate records details';
    l_to VARCHAR2(64) := '[email protected]';
    l_mail_conn UTL_SMTP.connection;
    v_cnt number;
    cursor c1 is select * from error_log_table where trunc(error_timestamp) =trunc(sysdate);
    BEGIN
    select count(*) into v_cnt
    from error_log_table
    where trunc(error_timestamp) =trunc(sysdate);
    --if v_cnt>=1 then
    l_mail_conn := UTL_SMTP.open_connection(l_mailhost, 25);
    UTL_SMTP.helo(l_mail_conn, l_mailhost);
    UTL_SMTP.mail(l_mail_conn, l_from);
    UTL_SMTP.rcpt(l_mail_conn, l_to);
    utl_smtp.data(l_mail_conn, 'CHINNATHAMBI');
    UTL_SMTP.open_data(l_mail_conn);
    UTL_SMTP.write_data(l_mail_conn, UTL_TCP.CRLF ||'Date: ' || TO_CHAR(SYSDATE, 'DD-MON-YYYY HH24:MI:SS') || Chr(13));
    UTL_SMTP.write_data(l_mail_conn, UTL_TCP.CRLF ||'From: ' || l_from || Chr(13));
    UTL_SMTP.write_data(l_mail_conn, UTL_TCP.CRLF ||'Subject: ' || l_subject || Chr(13));
    UTL_SMTP.write_data(l_mail_conn, UTL_TCP.CRLF ||'To: ' || l_to || Chr(13));
    UTL_SMTP.write_data(l_mail_conn, '' || Chr(13));
    FOR i IN c1 LOOP
    UTL_SMTP.write_data(l_mail_conn, i.error_details);
    END LOOP;
    UTL_SMTP.close_data(l_mail_conn);
    UTL_SMTP.quit(l_mail_conn);
    --end if;
    END;
    Please help me to fix this issues.
    the mail which i received is only having the from email address. it is not showing the to mail address, and the messages.
    with regards
    chinnathambi

    user607786 wrote:
    I written the below email procedure.I am facing an issues now. I am receving the mail but it does not have any content.Invalid Mime body is created by your code.
    UTL_SMTP.helo(l_mail_conn, l_mailhost);Not really correct (soft error, usually ignored by SMTP server). You need to define your IP host in the HELO command - not pass the mail server its hostname.
    utl_smtp.data(l_mail_conn, 'CHINNATHAMBI');
    UTL_SMTP.open_data(l_mail_conn);Huh? The DATA command is intended to use a single call to send the entire e-mail (headers and body). This contains the text string "+CHINNATHAMBI+". This is not valid.
    The document describes this call as follows:
    UTL_SMTP.DATA (
       c     IN OUT NOCOPY connection
       body  IN VARCHAR2 CHARACTER SET ANY_CS);
    Parameter      Description
    c               The SMTP Connection.
    body            The text of the message to be sent, including headers, in [RFC822] format.Is that string in RFC822 format? Nope - not even close.
    Then straight after that, you now use multiple commands to create another e-mail body... This is not a valid SMTP command sequence. You have already supplied complete e-mail data - you cannot now supply yet more e-mail data!
    UTL_SMTP.write_data(l_mail_conn, UTL_TCP.CRLF ||'Date: ' || TO_CHAR(SYSDATE, 'DD-MON-YYYY HH24:MI:SS') || Chr(13));
    UTL_SMTP.write_data(l_mail_conn, UTL_TCP.CRLF ||'From: ' || l_from || Chr(13));
    UTL_SMTP.write_data(l_mail_conn, UTL_TCP.CRLF ||'Subject: ' || l_subject || Chr(13));
    UTL_SMTP.write_data(l_mail_conn, UTL_TCP.CRLF ||'To: ' || l_to || Chr(13));
    UTL_SMTP.write_data(l_mail_conn, '' || Chr(13));Also wrong. Here you are attempting to write an e-mail header. There should not be an empty line as the first line - as an empty line is used to separate the header from the body in the mail.
    The header lines must be written first (no empty lines). Then a single empty line to indicate the start of the body. Then the body itself (using local headers per body part if this a mixed multi-type Mime message).
    I suggest you first get to grips with how a physical e-mail looks like, before you attempt to manually create one. You can use your mail reader and select the "+view source/raw e-mail+" option to look at the actual physical text structure of e-mails. You should also have a look at the RFC's (Request For Comments) memo's that specifies the Internet standards for Mime bodies, such as RFC822 (Internet Message Format). Use google to look up these RFC's.
    Constructing e-mails is easy - but that requires you to know the basic structure of an Internet Message. Not guessing like you have done in your code.

  • When sending html mail from ocfo or direct telnet smtp_in returns an error

    <lots of markup/>
    ......<snip>
    <P class=MsoNormal><FONT face=Arial size=2><SPAN
    style="FONT-SIZE: 10pt"><o:p> </o:p></SPAN></FONT></P></DIV></BLOCKQUOTE></BODY></HTML>
    500 5.6.0 Data command failed: too many headers
    550 5.7.1 Closing connection
    Connection closed by foreign host.
    Has anyone seen this problem? I get the feeling that smtp_in is counting every html tag as a header, should I increase the "Maximum Number of Headers Allowed in a Message" parameter in smtp_in to fix this problem? If so what might be a reasonable setting? I increased it from 1000 to 2500 but could not get a particular email to send. Small amounts of HTML send ok.
    thanks!

    OK, I think I have narrowed this to a problem somewhere between the listener and SMTP_IN. This problem only occurs when using SMTP over SSL. I switched my two SMTP_IN processes, I made the non-SSL into SSL and vice-versa. The problem followed the process with the SSL configuration. I have no idea what in the listener configuration (or the smtp_in config as its shown through em) could caused this kind of problem. Small html mails with basic markup in them work fine over SMTP SSL, but big html mails with lots of nasty markup alway fail, they just stay in the outbox and then ofco needs several folder refreshes (or restart) in order to be able to again view any of the "mail" type folders (imap).
    Thunderbird also has these symptoms minus the need to refresh/restart after a failed html mail sending attempt.
    Anyone seen/seeing anything like this?

  • How to send an email from oracle?

    Hi I want to send email from oracle database.
    i have tried following procedure
    create or replace
    2 PROCEDURE send_mail (p_sender IN VARCHAR2,
    3 p_recipient IN VARCHAR2,
    4 p_message IN VARCHAR2)
    5 as
    6 l_mailhost VARCHAR2(255) := 'aria.us.oracle.com';
    7 l_mail_conn utl_smtp.connection;
    8 BEGIN
    9 l_mail_conn := utl_smtp.open_connection(l_mailhost, 25);
    10 utl_smtp.helo(l_mail_conn, l_mailhost);
    11 utl_smtp.mail(l_mail_conn, p_sender);
    12 utl_smtp.rcpt(l_mail_conn, p_recipient);
    13 utl_smtp.open_data(l_mail_conn );
    14 utl_smtp.write_data(l_mail_conn, p_message);
    15 utl_smtp.close_data(l_mail_conn );
    16 utl_smtp.quit(l_mail_conn);
    17 end;
    and when i execute the following
    begin
    send_mail( '[email protected]',
    '[email protected]',
    'Hello arun' );
    end;
    I get the following errors
    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 "TEST.SEND_MAIL", line 8
    ORA-06512: at line 2
    Please help
    Regards
    Arun

    C:\>telnet aria.us.oracle.com 25Only if you work ofr Oracle & start behind their firewall would I expect this to work.
    The SMTP server to which PL/SQL connects needs to be YOUR corporate email (MTA) server & configured to RELAY message.
    Contact your LOCAL postmaster/Network Admin
    NONE of this is related to Oracle RDBMS!

  • Sending E-Mail from PL/SQL

    I have used Oracle 9i (9.2.0.1) on windows Xp machine. I want to send e-mail
    from PL/SQL procedure.
    I execuete the procedure as follows friom SQL prompt in SCOTT user..
    execute prc_send_mail('[email protected]','[email protected]','Test message');
    before that I create the procedure in scott user and it is created successfully in scott user..
    Procedue is as follows...
    CREATE OR REPLACE PROCEDURE prc_send_mail (p_sender IN VARCHAR2,
    p_recipient IN VARCHAR2,
    p_message IN VARCHAR2)
    as
    l_mailhost VARCHAR2(255) := 'mail.yahoo.com';
    l_mail_conn utl_smtp.connection;
    BEGIN
    l_mail_conn := utl_smtp.open_connection(l_mailhost, 25);
    utl_smtp.helo(l_mail_conn, l_mailhost);
    utl_smtp.mail(l_mail_conn, p_sender);
    utl_smtp.rcpt(l_mail_conn, p_recipient);
    utl_smtp.open_data(l_mail_conn );
    utl_smtp.write_data(l_mail_conn, p_message);
    utl_smtp.close_data(l_mail_conn );
    utl_smtp.quit(l_mail_conn);
    end;
    unfortunately i have receiveed some error which I mentioned below...
    ERROR at line 1:
    ORA-29278: SMTP transient error: 421 Service not available
    ORA-06512: at "SYS.UTL_SMTP", line 17
    ORA-06512: at "SYS.UTL_SMTP", line 96
    ORA-06512: at "SYS.UTL_SMTP", line 138
    ORA-06512: at "SCOTT.PRC_SEND_MAIL", line 9
    ORA-06512: at line 1.
    Please anyone giove me the solution..

    > ORA-29278: SMTP transient error: 421 Service not available
    Not an Oracle error. This is the SMTP server telling you to go and get stuffed. It does not want to talk to you.
    See http://www.faqs.org/rfcs/rfc821.html.
    The RFC says that this type of response code can be for example when the SMTP server is about to shutdown - thus informing the client that it cannot be serviced.
    But seeing that you're trying to hijack mail.yahoo.com as your SMTP server.. I'm not surprise that the server is giving you the bird.

  • ORA-29278: SMTP transient error: 401 4.1.7 Bad sender address syntax

    Hello All,
    I am Facing an Error as below while trying to Execute a Developed EMAIL Trigger in DB :
    ORA-29278: SMTP transient error: 401 4.1.7 Bad sender address syntax
    I am totally surprised as i have checked both the addresses : Sender as well as Receivers..
    My Senders Address is : '[email protected]'
    and Receivers Address is : '[email protected]'
    Any Help related to it will be highly appreciated..
    Regards,
    Deepak
    Below Script is being used :
    CREATE OR REPLACE PROCEDURE TESTMAIL(fromm VARCHAR2,too VARCHAR2,sub VARCHAR2,body VARCHAR2,port NUMBER)
    IS
    objConnection UTL_SMTP.CONNECTION;
    vrData VARCHAR2(32000);
    BEGIN
    objConnection := UTL_SMTP.OPEN_CONNECTION('mail.maxmsp.com',PORT);
    UTL_SMTP.HELO(objConnection, 'mail.maxmsp.com');
    UTL_SMTP.MAIL(objConnection, fromm);
    UTL_SMTP.RCPT(objConnection, too);
    UTL_SMTP.OPEN_DATA(objConnection);
    UTL_SMTP.WRITE_DATA(objConnection, 'From: '||fromm || UTL_TCP.CRLF);
    UTL_SMTP.WRITE_DATA(objConnection, 'To: '||too || UTL_TCP.CRLF);
    UTL_SMTP.WRITE_DATA(objConnection, 'Subject: ' || sub || UTL_tcp.CRLF);
    UTL_SMTP.WRITE_DATA(objConnection, 'MIME-Version: ' || '1.0' || UTL_tcp.CRLF);
    UTL_SMTP.WRITE_DATA(objConnection, 'Content-Type: ' || 'text/html;');
    UTL_SMTP.WRITE_DATA(objConnection, 'Content-Transfer-Encoding: ' || '"8Bit"' || UTL_TCP.CRLF);
    UTL_SMTP.WRITE_DATA(objConnection,UTL_TCP.CRLF);
    UTL_SMTP.WRITE_DATA(objConnection,UTL_TCP.CRLF||'<HTML>');
    UTL_SMTP.WRITE_DATA(objConnection,UTL_TCP.CRLF||'<BODY>');
    UTL_SMTP.WRITE_DATA(objConnection,UTL_TCP.CRLF||'<FONT COLOR="red" FACE="Courier New">'||body||'</FONT>');
    UTL_SMTP.WRITE_DATA(objConnection,UTL_TCP.CRLF||'</BODY>');
    UTL_SMTP.WRITE_DATA(objConnection,UTL_TCP.CRLF||'</HTML>');
    UTL_SMTP.CLOSE_DATA(objConnection);
    UTL_SMTP.QUIT(objConnection);
    EXCEPTION
    WHEN UTL_SMTP.TRANSIENT_ERROR OR UTL_SMTP.PERMANENT_ERROR THEN
    UTL_SMTP.QUIT(objConnection);
    DBMS_OUTPUT.PUT_LINE(SQLERRM);
    WHEN OTHERS THEN
    UTL_SMTP.QUIT(objconnection);
    DBMS_OUTPUT.PUT_LINE(SQLERRM);
    END TESTMAIL;
    DECLARE
    Vdate Varchar2(25);
    BEGIN
    Vdate := to_char(sysdate,'dd-mon-yyyy HH:MI:SS AM');
    TESTMAIL('[email protected]', '[email protected]', 'TESTMAIL','This is a UTL_SMTP-generated email at '|| Vdate,25);
    END;

    Hello Helios,
    I am trying the same script in the provided
    Check SMTP Server Availability for ORA-29278 or ORA-29279 errors using UTL_SMTP to Send Email. [ID 604763.1]
    Earlier it was reverting with Error :
    ORA-29278: SMTP transient error: 421 Service not available
    but after using the above Document ID we came to know that we are unable to TELNET mail server with Port 25
    Issue got solved but now its reverting with Error as below :
    ORA-29278: SMTP transient error: 401 4.1.7 Bad sender address syntax
    I then tried UTL_MAIL instead of UTL_SMTP as sugested by someone but it is also reverting with same Error.
    + I am using the same code as provided in document ID 604763.1 +
    Regards,
    Deepak Arora

  • Can you send e-mails from ipod touch using a .mac alias?

    hi everyone,
    i have a number of .mac email aliases set up on my email account, for instance for signing up to websites. when i send e-mail on my mac, i can select which alias i want the e-mail to be sent from. however, i don't seem to have that option on my ipod touch - mail is automatically sent from my main mac.com e-mail address.
    is there anyway to send e-mail from one of my .mac aliases on my ipod touch?

    Not at this time, no. You can submit a feature request to Apple:
    http://www.apple.com/feedback/ipodtouch.html

  • How to Send a Mail From the Oracle Applications.

    Hi,
    I was assigned a task to send a mail from the front end i.e., from oracle applications.
    but i have no idea.
    i am working on oracle apps R12.1.1 and 10g reports.
    First i have to create an rdf file and that rdf file i want to send as an attachment through mail from the apps.
    Any Advice will be of great help and i will follow accordingly.
    Thanks in Advance,
    Regards,
    Bharathi.S

    Hi,
    I was assigned a task to send a mail from the front end i.e., from oracle applications.
    but i have no idea.
    i am working on oracle apps R12.1.1 and 10g reports.
    First i have to create an rdf file and that rdf file i want to send as an attachment through mail from the apps.
    Any Advice will be of great help and i will follow accordingly.
    Thanks in Advance,
    Regards,
    Bharathi.S

Maybe you are looking for

  • How do I add to "=COUNTIF(Indicator,1)" formula in Workout Tracker Template

    I'm using the Workout Tracker template to create a chart that counts each time I've selected different items in a pop-up menu. When you pull up the Workout Tracker template there are four sheets. I'm concentrating on the 1st sheet called Summary. I c

  • Why does Google Chat not work with Firefox v9.0

    When I use Internet Explorer 8.0/7601 Go0gleTalk works fine. However, when I use Firefox I get the message that the contact I want to talk to is offline. I can see that they are online in IE8 But, on this computer it does not work. On my Laptop all i

  • Airport password not working

    I have been trying to connect a Brother MFC 7480W printer wirelessly. It doesn't like my password, and in all of the shenanigans I have been trying, my Airport Model A1034, 2005, password started acting differently. On my computer, I no longer need t

  • Problem in setting CLASSPATH and PATH

    I am a newbie in java. I downloaded and run the "j2eesdk-1_4_01-windows.exe" from Internet. By default, it creates a new user variable, which is "PATH = C:\Sun\AppServer\bin". My problem is when I try to compile a java, I get an error message, which

  • AR812 print landscape with ghostscript

    hallo, printing landscape pages under CUPS with PCL-filter (foomatic-rip) cannot be rotate on paper and then the right site is cuted. This effect is also reproducible with printing in a file and viewing with a PS-viewer e.g. gv or gsview - page canno