This content has been marked as final. Show 14 replies
Did you read the documentation completely?
sender The email address of the sender.
You have written
sender => 'NAVEEN',
Thanks for your reply. I have gone through the documentation also. Irrespective of validity of sender's email adress, UTL_MAIL was working. But we need to give any varchar type of input.Even if I changed the sender's email to a valid email address, the same problem is persisting. Could you help me in this regard........
I've used UTL_SMTP and UTL_MAIL quite a bit and have never been able to use a SENDER address that is not a valid email address "FORMAT". So long as the format of the email address conforms to the standard email format, "Name@domain.com" it will work. How you have been able to make it work in the past is a mystery. If you do not want the Sender or From address to be from a valid email address, that's fine, but at least use a valid email address format; eg: firstname.lastname@example.org. This is the cause of you error.
actually, it can work - depending on your mail provider/server. in my local database, I use my ISPs mail server as my utl_stmp_server. and since my email address is MYNAME@THEIR_SERVER, I can send via utl_mail just using MYNAME as the sender. of course, the reciepient sees the sender as MYNAME@mta.srv.hcvlny.cv.com (or some other random crap).
I have used the valid email format also. but still I am getting the error as
ORA-29279: SMTP permanent error: 501 badly formatted MAIL FROM user - no "<"
I could not find much info regarding this error .Can anyone help me out ???
just for laughs, try formatting the addresses like this
sender => 'naveen <email@example.com>'
perhaps there's some weird setting on your mail server whcih requires the email alias. it could explain why it used to work, but now doesn't - someone in the mailroom has been screwing around.
sender => 'naveen <firstname.lastname@example.org>' is also giving the same error.I have also tried with other email IDs also, but it didn't work. I could not get any information why
'ORA-29279: SMTP permanent error: 501 badly formatted MAIL...' error comes.
This error is coming from your mail server.
You may want to have a chat with your mail server administrator to see what sort of validation they're doing on the from address. That's probably more efficient than just trying to guess at a valid format.
Thanks for all for your suggestiona. Actually, we have raised an SR and came to know that there is a BUG in Oracle regarding UTL_MAIL which resulted in the mentioned error .
Can you back that statement about an Oracle UTL_SMTP bug up with an actual bug number??
From what you have posted, this is not a bug!! but expected and documented (RFC'ed) SMTP server behaviour.
As you can clearly see, the SMTP server expects a DOMAIN name as part of the MAIL FROM address. It also does not accept the alternative format suggested.
/home/billy> telnet mail 25
Connected to mail
Escape character is '^]'.
220 CNTRRA20-GTW01 [CNTRRA20-GTW01] Thu, 06 Mar 2008 14:26:26 +0200
250 CNTRRA20-GTW01 Hello [10.251.93.58]
MAIL FROM: naveen <email@example.com>
501 naveen <firstname.lastname@example.org> : illegal character(s) in domain string
MAIL FROM: NAVEEN
501 NAVEEN : domain string is NULL.
221 CNTRRA20-GTW01 closing connection. Goodbye!
Connection closed by foreign host.
Yes, not all SMTP servers are equal and some support additional formatting.
But to imply that because the SMTP server does not accept your address formatted as string NAVEEN, it is a UTL_SMTP problem, sounds like a smelly one to me.
And yes, I did see you referred to UTL_MAIL as having the so-called bug and I responded that UTL_SMTP does not have a bug.
The reason is that UTL_MAIL is very specific in what parameters it accepts. It well documented in the [url http://download.oracle.com/docs/cd/B19306_01/appdev.102/b14258/u_mail.htm#i1001699]Oracle® Database PL/SQL Packages and Types Reference guide.
It states that the sender parameter is:
(Note is does not say "alias" and "I will append the domain for you - it states in black and white it wants the *email address*)
sender The email address of the sender.
The definition of an e-mail address is the identification of a unique e-mail account (e.g. POP3 or IMAP) at a domain, and is specified in the format:
Your code is clearly violating this standard.. not using UTL_MAIL correctly, obviously causing UTL_SMTP to pass an invalid formatted address.. and despite this, you insist that you have (according to your so-called SR report feedback) uncovered a bug in Oracle UTL_MAIL/UTL_SMTP?
I find that very hard to believe.
I have seen situations where an email address was considered malformed because it did not include the <> around the address. I didn't notice this in your original posting until just now: "501 badly formatted MAIL FROM user - no "<"." Try adding these characters to your
sender => '<NAVEEN>';
Craig, your premise is that the SMTP server will accept a MAIL FROM format is is not the standard.
Not saying that some SMTP servers will not perhaps accept this and append the default domain to it.. but I want to make it absolutely clear in this thread that what the SMTP server accepts or rejects (as the MAIL FROM address) has absolutely nothing to do with ULT_MAIL or UTL_SMTP.
It is an issue between you, the person/developer that selected that specific (failed) address format and the SMTP server that may or may not accept it.
Calling it a bug in UTL_SMTP/UTL_MAIL is in my view, simply not acceptable in this case.