EHLO 501 Syntax error in parameters or arguments -

Hello
I have 2 hp-ux 11i boxes one production one demo.... When trying to send e-mail from the production box I am getting the following (see below) If I run the script as root on the production box it is working. Any ideas on where I populate those ehlo response fields? The messages are just going from Internal Unix boxes to an internal SMTP gateway. I have no issues with the scipt on the demo box regardless of which user is running it.
DEBUG: setDebug: JavaMail version 1.4ea
DEBUG: getProvider() returning javax.mail.Provider[TRANSPORT,smtp,com.sun.mail.smtp.SMTPTransport,Sun Microsystems, Inc]
DEBUG SMTP: useEhlo true, useAuth false
DEBUG SMTP: trying to connect to host "172.31.7.20", port 25, isSSL false
220 mydomain.com [ESMTP Server] service ready;ESMTP Server; 02/08/08 14:03:26
DEBUG SMTP: connected to host "172.31.7.20", port: 25
EHLO
501 Syntax error in parameters or arguments -
HELO
501 Syntax error in parameters or arguments -
javax.mail.MessagingException: 501 Syntax error in parameters or arguments -
0
On the demo box
DEBUG: setDebug: JavaMail version 1.4ea
DEBUG: getProvider() returning javax.mail.Provider[TRANSPORT,smtp,com.sun.mail.smtp.SMTPTransport,Sun Microsystems, Inc]
DEBUG SMTP: useEhlo true, useAuth false
DEBUG SMTP: trying to connect to host "172.31.7.20", port 25, isSSL false
220 mydomain.com [ESMTP Server] service ready;ESMTP Server; 02/08/08 14:05:16
DEBUG SMTP: connected to host "172.31.7.20", port: 25
EHLO demoglo
250-mydomain.com
250-SIZE 26214400
250-8BITMIME
250 STARTTLS
DEBUG SMTP: Found extension "SIZE", arg "26214400"
DEBUG SMTP: Found extension "8BITMIME", arg ""
DEBUG SMTP: Found extension "STARTTLS", arg ""
DEBUG SMTP: use8bit false

For some reason (probably misconfiguration of your
machine or name service), the java.net.InetAddress
class isn't able to find out the name of your machine.
You can specify that manually by setting an
appropriate property. See the javadocs for the
com.sun.mail.smtp package.

Similar Messages

  • Error while sending E-Mail -- 501 Syntax error in parameters or arguments

    Dear Friends,
    I was trying to send E-Mail using the NTLM Authentication mechanism using the below program:
    import java.util.Properties;
    import javax.mail.Message;
    import javax.mail.Session;
    import javax.mail.Transport;
    import javax.mail.internet.InternetAddress;
    import javax.mail.internet.MimeMessage;
    import javax.mail.PasswordAuthentication;
    import java.util.Date;
    import com.sun.mail.smtp.*;
    public class MailerWithAuthentication
         private String     smtpServer;
         private String      fromEmailId;
         private String      toEmailId;
         private String      ccEmailId;
         private String      bccEmailId;
         private String      subject;
         private String      message;
         private String host;
         public MailerWithAuthentication(String toemail, String msg,String sub,String fromId,String host)
              this.toEmailId = toemail;;
              this.subject = sub;
              this.message = msg;
              this.fromEmailId=fromId;
              this.host=host;
    public void sendMail()
              String mailContent = "";
              try
                   Authenticator authenticator = new Authenticator();
                   Properties props = new Properties();
              props.put("mail.smtp.host",this.host );
              props.put("mail.smtp.port", "25");
              props.put("mail.smtp.auth", "true");
              props.put("mail.smtp.auth.mechanisms", "NTLM");
              props.put("mail.smtp.auth.ntlm.flags", "0x00000200");          
              props.put("mail.smtp.auth.ntlm.domain","sal.ad");
              props.put("mail.debug", "true");
              Session session = Session.getDefaultInstance(props,authenticator);
    Message msg = new MimeMessage(session);          
              MimeMessage message = new MimeMessage(session);
              message.setContent("This is a test", "text/plain");
              message.setFrom(new InternetAddress(this.fromEmailId));
              message.addRecipient(Message.RecipientType.TO,new InternetAddress(this.toEmailId));
              Transport.send(message);
              catch (Exception e)
                   e.printStackTrace();
                   System.out.println("Exception in MailerThread : run: " + e.getMessage());               
    private class Authenticator extends javax.mail.Authenticator {
              private PasswordAuthentication authentication;
              public Authenticator() {
                   String username= "sal.ad\mailuser";
                   String password = "mail@123";          
                   authentication = new PasswordAuthentication(username, password);
              protected PasswordAuthentication getPasswordAuthentication() {
                   return authentication;
    public static void main(String args[])
              try
                   System.out.println(" Usage : java MailerWithAuthentication <To-Email> <Message> <Subject> <From-Email> <Mail-Server-IP>");
                   MailerWithAuthentication mailer = new MailerWithAuthentication (args[0],args[1],args[2],args[3],args[4]);
                   mailer.sendMail();
              catch(Exception e)
                   e.printStackTrace();
    Following is the output while running the program:
    DEBUG: JavaMail version 1.4ea
    DEBUG: java.io.FileNotFoundException: /usr/java/jdk1.5.0_14/jre/lib/javamail.providers (No such file or directory)
    DEBUG: !anyLoaded
    DEBUG: not loading resource: /META-INF/javamail.providers
    DEBUG: successfully loaded resource: /META-INF/javamail.default.providers
    DEBUG: Tables of loaded providers
    DEBUG: Providers Listed By Class Name: {com.sun.mail.smtp.SMTPSSLTransport=javax.mail.Provider[TRANSPORT,smtps,com.sun.mail.smtp.SMTPSSLTransport,Sun Microsystems, Inc], com.sun.mail.smtp.SMTPTransport=javax.mail.Provider[TRANSPORT,smtp,com.sun.mail.smtp.SMTPTransport,Sun Microsystems, Inc], com.sun.mail.imap.IMAPSSLStore=javax.mail.Provider[STORE,imaps,com.sun.mail.imap.IMAPSSLStore,Sun Microsystems, Inc], com.sun.mail.pop3.POP3SSLStore=javax.mail.Provider[STORE,pop3s,com.sun.mail.pop3.POP3SSLStore,Sun Microsystems, Inc], com.sun.mail.imap.IMAPStore=javax.mail.Provider[STORE,imap,com.sun.mail.imap.IMAPStore,Sun Microsystems, Inc], com.sun.mail.pop3.POP3Store=javax.mail.Provider[STORE,pop3,com.sun.mail.pop3.POP3Store,Sun Microsystems, Inc]}
    DEBUG: Providers Listed By Protocol: {imaps=javax.mail.Provider[STORE,imaps,com.sun.mail.imap.IMAPSSLStore,Sun Microsystems, Inc], imap=javax.mail.Provider[STORE,imap,com.sun.mail.imap.IMAPStore,Sun Microsystems, Inc], smtps=javax.mail.Provider[TRANSPORT,smtps,com.sun.mail.smtp.SMTPSSLTransport,Sun Microsystems, Inc], pop3=javax.mail.Provider[STORE,pop3,com.sun.mail.pop3.POP3Store,Sun Microsystems, Inc], pop3s=javax.mail.Provider[STORE,pop3s,com.sun.mail.pop3.POP3SSLStore,Sun Microsystems, Inc], smtp=javax.mail.Provider[TRANSPORT,smtp,com.sun.mail.smtp.SMTPTransport,Sun Microsystems, Inc]}
    DEBUG: successfully loaded resource: /META-INF/javamail.default.address.map
    DEBUG: !anyLoaded
    DEBUG: not loading resource: /META-INF/javamail.address.map
    DEBUG: java.io.FileNotFoundException: /usr/java/jdk1.5.0_14/jre/lib/javamail.address.map (No such file or directory)
    Mechanishm = NTLM
    DEBUG: getProvider() returning javax.mail.Provider[TRANSPORT,smtp,com.sun.mail.smtp.SMTPTransport,Sun Microsystems, Inc]
    DEBUG SMTP: useEhlo true, useAuth true
    DEBUG SMTP: useEhlo true, useAuth true
    DEBUG SMTP: trying to connect to host "192.168.14.6", port 25, isSSL false
    220 ****************************************************************************
    DEBUG SMTP: connected to host "192.168.14.6", port: 25
    EHLO
    501 Syntax error in parameters or arguments -
    HELO
    501 Syntax error in parameters or arguments -
    javax.mail.MessagingException: 501 Syntax error in parameters or arguments -
    =================================
    The error is :
    EHLO
    501 Syntax error in parameters or arguments -
    HELO
    501 Syntax error in parameters or arguments -
    =================================
    Please tell me what went wrong here. Is it due to any mistake in the program ?
    Thanks in advance.

    hello Anirudh Pucha,
    thanks for your message,
    i'm downloading all the files you advised and one more doubt regarding SOA installation,
    i'm using BPEL Process manager 10.1.3.1.0 installed on my machine and not installed SOA Suite (problem in installing AS Middle tier), i send voice,sms through BPEL PM which works fine, and faced problem in e-mail notification only, according to me with out installing SOA suite we can use BPEL PM or please let me know the procedure to install the downloading files.
    if possible please send me a details in word documents to my mail "[email protected]".
    Thanks again

  • ORA-29279: SMTP permanent error: 501 Syntax error in parameters or argument

    Hello,
    I have this error during send e-mail via Interactive Report subscription. (APEX 4.0 using Apex Listener using Oracle Database 10.2.0.4)
    I tried to use
    APEX_MAIL using this code
    BEGIN
    APEX_MAIL.SEND(
    P_TO => '[email protected]',
    P_FROM => '[email protected]',
    P_BODY => 'Test',
    P_SUBJ => 'Test sub');
    END;
    I get the same error.
    I tried this with success.
    BEGIN
    APEX_MAIL.SEND(
    P_TO => '<[email protected]>',
    P_FROM => '<[email protected]>',
    P_BODY => 'Test',
    P_SUBJ => 'Test sub');
    END;
    My problem is that, when i tried to put <> in my subscription, I have an error invalid email address.
    How must i configure this to be able to send email?
    Regards
    Eric Henrard

    We found what is wrong about this.
    The problem is in CC we had a e-mail address has one space like this test [email protected] so UTL_smtp doesn't like this kind format then we recreated a new e-mail address without space and it works fine.

  • ORA-12012: error on auto execute of job 754461 ORA-29279: SMTP permanent error: ORA-29279: SMTP permanent error: 501 Syntax error, parameters in command "RCPT TO:" unrecognized or missing ORA-06512: at "SYS.UTL_SMTP", line 20 ORA-06512: at "SYS.UTL_SMTP",

    Hi ,
    I am getting below error frequently in alert log of database.
    ORA-12012: error on auto execute of job 754461
    ORA-29279: SMTP permanent error: ORA-29279: SMTP permanent error: 501 Syntax error, parameters in command "RCPT TO:" unrecognized or missing
    ORA-06512: at "SYS.UTL_SMTP", line 20
    ORA-06512: at "SYS.UTL_SMTP", line 98
    ORA-06512: at "SYS.UTL_SMTP", line 240
    ORA-06512: at "APPS.EIS_UTIL_PKG", line 94
    ORA-06512: at "APPS.HKD_PO_ADDON_PKG", line 110
    ORA-06512: at line 1

    You have a job running in the database. Its job ID is 754461
    It looks as if that job runs APPS.HKD_PO_ADDON_PKG
    That job is attempting to send mail using UTL_SMTP and apparently passing some strange value to SMTP server for the RCPT TO: parameter.

  • FTPEx: 501 Syntax errors in parameter in File Adapter

    Hi All,
      I have a scenario idoc to file when I try sending file through the FTP connection I got the below error
    An error occurred while connecting to the FTP server 'ftp-gw.dx.dxxxx.com:21'. The FTP server returned the following error message: 'com.sap.aii.adapter.file.ftp.FTPEx: 501 Syntax errors in parameter.     usage: %[recipient id]%[APRF]       where either [recipient] or [APRF] can be omitted.            (to change your current default SEND relationship).            %% (places you in your 'HOME' TR).   &['s'|'single'] ('get' command gets single file).   &['m'|'multiple'] ('get' command gets multiple files). '. For details, contact your FTP server vendor.
    I have gone through the forum below which is also unanswered
    FTPEx: 501 Syntax errors in parameter - Any Ideas...
    Note: Luis Melgar and Satish Reddy please let me know if this problem is solved and also please share with me if any discussion you have in offline
    Regards,
    Senthil.

    Hi Anand,
    Not sure whether I need to used the variable substituion but the user as specified to send file as
    PUSHING FILES TO FTP Server
    put localfilename %localfilename%CITISECUFLATNA%CITIGPASSIN%%B
    currently I specified in comm. channel as
    File Access parameters
    Target Directory %xi_output.txt%CITISECUFLATNA%CITIGPASSIN%%B
    Unchecked the checkbox Create Target Directory
    File Name Scheme xi_output.txt
    Please let me know if any more details required.
    Regards,
    Dhill

  • Unable to send Email: ORA-29279: SMTP permanent error: 501 Syntax error in

    We have a procedure use utl_smtp in 10g (10.0.4). we got this msg (Unable to send Email: ORA-29279: SMTP permanent error: 501 Syntax error in arguments) when send e-mail to another mail box (internal),
    but we use the same procedure running in 10g(10.03) it works perfectly. Is Oracle 10g(10.0.4 vs. 10.0.3) causing this issue ? Can someone shed some lights on my head ? Thx.

    We found what is wrong about this.
    The problem is in CC we had a e-mail address has one space like this test [email protected] so UTL_smtp doesn't like this kind format then we recreated a new e-mail address without space and it works fine.

  • What am doing work? could not send message: 501 5.5.4 syntax error in parameters scanning

    Ending email to my customers

    if the problem continues, you'll probably have to ask your email-provider for assistance.

  • Help!!!! I am getting a 501 Syntax Error with CFFTP ListDir. I created the file in January of 2014 and today is the first time it has failed.

    <!---Control the timeout--->
    <cfsetting requesttimeout="600">
    <cfset thisDate = now()>
    <cfset today = #DateFormat(thisDate,"mm-dd-yyyy")#>
    <!--- Open ftp connection --->
    <cfftp connection="MyFtp"
        server="#FTPserver#"
        username="#username#"
        password="#password#"
        action="Open"
        stoponerror="Yes">
    <cfftp action="listdir"
    stopOnError="Yes"
    name="Files"
    directory="/export400"
    connection="MyFtp"
    >

    Try removing the quotes from around the connection name in your CFFTP lisdir block.  So change the last line to connection=MyFtp instead of connection="MyFtp".
    -Carl V.

  • 'com.sap.aii.adapter.file.ftp.FTPEx: 501 Unknown error

    Hello ,
    I am facing an error in communication channel while trying to post the file to the FTP server,
    The error is " Message processing failed. Cause: com.sap.engine.interfaces.messaging.api.exception.MessagingException: An error occurred while connecting to the FTP server '10.100.5.00:20'. The FTP server returned the following error message: 'com.sap.aii.adapter.file.ftp.FTPEx: 501 Unknown error'. For details, contact your FTP server vendor"
    Please could you advice what need to be done to resolve this.
    Thanks ,
    Siva

    Hi ,
    FTP 501 Error is: "Syntax error in parameters or arguments"
    Also, i see that the ftp address and port mentioned in your case is:
    10.100.5.00:20
    Hence, i see three probable issues here.
    1. FTP Port :
    Just check if the FTP server's port number '20' mentioned in your case is open as this is the data connection port. Moreover, the default port mentioned while creating a file channel is 21. Just check about the port number '20' with the FTP server administrator if this port number is opened and functioning.
    2. FTP server address:
    Also, try giving your FTP Server's address as 10.100.5.0
    3. Also, check if the FTP server is reachable from the PI Server by using a simple ping command.

  • Why are my emails addressed to yahoo and mindspring clients being rejected for syntax errors?

    Here is the error message:
    Delivery to the following recipient failed permanently:
    Lisa@[email protected]
    Technical details of permanent failure:
    Google tried to deliver your message, but it was rejected by the server for the recipient domain yahoo.com by mta7.am0.yahoodns.net. [98.138.112.37].
    The error that the other server returned was:
    501 Syntax error in parameters or arguments

    Thanks, Zenos! My little test seemed to go through with no problems. One additional piece of information that puzzles me is that I used the address with the superfluous @ for two weeks before the failures - hmmmm.
    Having said that, I should not have used the @ in the address - period. It would be nice to have Thunderbird catch that when I entered the address initially. I am currently using Version 32.0, which I believe to be the latest version.
    Thanks for solving it so quickly!

  • Syntax error in profile relation while retreiving configuration parameters

    Trying to get our Directory Services properly functioning after an IP change. Running
    # kadmin.local -q listprincs
    yesterday revealed that all service principals weren't set up properly. Dig dig dig... found that I might (since this server was originally 10.3--now it's 10.4.4) try
    # slapconfig -kerberize diradmin
    That pointed me in the direction of using Workgroup Manager to fix a couple things with the KerberosClient record for the server. Did that. Reran the command. It complained about an improperly formatted configuration file because it wiped the contents of edu.mit.Kerberos (took out the DNS bits). Then ran
    # kerberosautoconfig -u
    which resulted in
    MergeLoggingInfo: creating default logging info
    At this point, edu.mit.Kerberos looked good. Then I tried
    # /usr/sbin/kdcsetup -f /LDAPv3/127.0.0.1 -w -a diradmin -p ** -v 1 REALM
    which resulted in
    Contacting the Directory Server
    Authenticating to the Directory Server
    Creating Kerberos directory
    Creating KDC Config File
    Creating Admin ACL File
    Creating Kerberos Master Key
    Creating Kerberos Database
    Syntax error in profile relation while retreiving configuration parameters
    SendInteractiveCommand: failed to get pattern
    Creating Kerberos Admin user
    kadmin.local: Syntax error in profile relation while initializing kadmin.local interface
    Adding kerberos auth authority to admin user
    Creating keytab for the admin tools
    kadmin.local: Syntax error in profile relation while initializing kadmin.local interface
    Adding KDC & kadmind to launchd
    Adding the new KDC into the KerberosClient config record
    edu.mit.kadmind: Already loaded
    com.apple.kdcmond: Already loaded
    Finished
    Now when I try
    # kadmin.local -q listprincs
    I get
    Authenticating as principal root/admin@REALM with password.
    kadmin.local: Syntax error in profile relation while initializing kadmin.local interface
    And now I'm getting this in kdc.log
    Feb 07 09:41:26 od.master.fqdn krb5kdc[21234](info): AS_REQ (7 etypes {18 17 16 23 1 3 2}) xx.xx.xx.xx: LOOKINGUPCLIENT: diradmin@REALM for krbtgt/REALM@REALM, Database is locked or in use--try again later
    Feb 07 09:41:26 od.master.fqdn krb5kdc[21234](info): DISPATCH: repeated (retransmitted?) request from xx.xx.xx.xx, resending previous response
    Help!
    Thanks,
    Rich
    ps. The typo in the error message is MIT's, not mine. I guess their engineering departments are better than their English department.
    Xserve G5   Mac OS X (10.4.4)  

    Look at the two config files:
    /Library/Preferences/edu.mit.Kerberos
    /var/db/krb5kdc/kdc.log
    the Database is locked or in use message is due to a missing lock file.
    Look in /var/db/krb5kdc/ for principal.kadm5.lock
    Hope this gets you started
    - Leland

  • Syntax error in form parameters

    HI,
    In ECC 6.0, LIKE is obsolete , so I want to change it to TYPE. I replaced all LIKE to TYPE. In my code I call a form subroutine and in the changing parameter i have two internal tables passed. Earlier the statement was
    PERFORM zz_routine USING I_VBAK
                                    CHANGING T_VBUK[]
                                                      T_VBAP[].
    where I_VBAK TYPE  VBAK and
    T_VBUK     TYPE STANDARD TABLE OF VBUKVB.
    T_VBAP     TYPE STANDARD TABLE OF VBAPVB.
    Now in the recieving paramters how do I mention these using TYPE
    I did as follows
    Form zz_routine USING value(ss_vbak) TYPE VBAK
         CHANGING xt_vbuk TYPE STAnDARD TABLE OF VBUKVB
               xt_vbap TYPE STAnDARD TABLE OF VBAPVB
    Now, I get the syntax error
    "OF" has already been declared.
    What does that mean ? what is the correct way to say that I need to receive a table type data in the form ?
    thnks

    Declare a Table Type which you can use to reference in your Form Parameters.
    Like:
    types: ty_t_vbap type standard table of VBAPVB.
    data: t_vbap type ty_t_vbap.
    PERFORM zz_routine using ia_vbak
    changing t_vbap.
    Form zz_routine USING value(ss_vbak) TYPE VBAK
    CHANGING xt_vbap type ty_t_vbap.
    ENDFORM.
    Regards,
    Naimesh Patel

  • 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)

  • ORA-20002: 501 Bad syntax error

    Hi,
    I intend to send a simple smtp mail using the builtin UTL_SMTP package.
    But i get the following error:-
    ORA-20002: 501 Bad syntax error
    Here is my code:-
    CREATE OR REPLACE PROCEDURE mail
    IS
    BEGIN
    DECLARE
    v_connection UTL_SMTP.CONNECTION;
    BEGIN v_connection := UTL_SMTP.OPEN_CONNECTION(<my host here>,25);
    dbms_output.put_line('Connection Opened');
    UTL_SMTP.HELO(v_connection,<my host here>);
    dbms_output.put_line('After calling helo');
    UTL_SMTP.MAIL(v_connection,'[email protected]');
    dbms_output.put_line('Sender set');
    UTL_SMTP.RCPT(v_connection,'[email protected]');
    dbms_output.put_line('Recipient Set');
    UTL_SMTP.DATA(v_connection,'Sent From PL/SQL');
    dbms_output.put_line('Message body set');
    UTL_SMTP.QUIT(v_connection);
    dbms_output.put_line('Connection Closed');
    end;
    END;
    Here is the output:-
    SQL> exec mail
    Connection Opened
    After calling helo
    BEGIN mail; END;
    ERROR at line 1:
    ORA-20002: 501 Bad address syntax
    ORA-06512: at "SYS.UTL_SMTP", line 86
    ORA-06512: at "SYS.UTL_SMTP", line 204
    ORA-06512: at "ADMIN.MAIL", line 13
    ORA-06512: at line 1
    I tried sending mails to my smtp server via java mailing API and i am
    successful. So i am wondering wat i am doing wrong up there in Oracle.
    I have JServer enabled, i also ran the initplsj.sql successfully.
    Please help.
    Regards,
    Leo.

    Hi APC,
    Yep HELO returns 250. Here is the code i use followed by the output. I use valid e-mail addresses(changed them here cz they belong to real ppl :) ). Again, i am able to send mails via java mailing API's, to the same recipietn from same sender via same smtp server.
    Code :------
    CREATE OR REPLACE PROCEDURE mail
    IS
    v_connection UTL_SMTP.CONNECTION;
    value UTL_SMTP.reply;
    PROCEDURE send_header(name IN VARCHAR2, header IN VARCHAR2) AS
    BEGIN
    UTL_SMTP.write_data(v_connection, name || ': ' || header || utl_tcp.CRLF);
    END;
    BEGIN
    v_connection := UTL_SMTP.OPEN_CONNECTION('smtp.server',25);
    dbms_output.put_line('Connection Opened');
    dbms_output.put_line('before calling helo');
    value := UTL_SMTP.HELO(v_connection,'smtp.server');
    dbms_output.put_line('after calling helo');
    dbms_output.put_line('code ' || value.code);
    dbms_output.put_line('before Sender is set');
    value := UTL_SMTP.MAIL(v_connection,'[email protected]');
    dbms_output.put_line('code ' || value.code);
    dbms_output.put_line('text ' || value.text);
    UTL_SMTP.RCPT(v_connection,'[email protected]');
    dbms_output.put_line('Recipient Set');
    UTL_SMTP.open_data(v_connection);
    send_header('From','"Sender" <[email protected]>');
    send_header('To','"Recipient" <[email protected]>');
    send_header('Subject','Hello');
    UTL_SMTP.write_data(v_connection, UTL_TCP.CRLF || 'Hello, world!');
    UTL_SMTP.close_data(v_connection);
    dbms_output.put_line('Message body set');
    UTL_SMTP.QUIT(v_connection);
    dbms_output.put_line('Connection Closed');
    END;
    Output:--------
    Connection Opened
    before calling helo
    after calling helo
    code 250
    before Sender is set
    code 501
    text Bad address syntax
    Looking forward to hearing from youself. :)
    Reagrds,
    Leo.

  • I keep getting this message when I open my outlook mail - syntax error in arguments.  What is it and how do I fix it?

    I keep getting the message - syntax error in arguments when I open Outlook.  Why? And how do I correct it? 

    Hi,
    I don't know the exact fix for your problem, but there is a thread on the Microsoft answers page that talks about this error message being related to a particular key.
    And if you remove that key, you can fix Windows update. See below for the detailed information and scroll to the bottom to see where someone found the fix:
    http://answers.microsoft.com/en-us/windows/forum/windows_other-windows_update/windows-update-error-code-80072ee2/fb87f203-69d9-4cd5-bbb1-ba8d0781be3e
    Thanks,
    Michelle

Maybe you are looking for