Reputation: 12688
Everything's been working fine and haven't made any changes to our mail packages. But i just noticed that our unsent_emails table has been filling up, and when i tried to manually sent the unsent emails (a periodic job set up in user_jobs) i get the following errors;
Error with main mail package: ORA-29279: SMTP permanent error: 501 5.5.2 MAIL FROM syntax error ORA-06512: at "SYS.UTL_SMTP", line 20
ORA-06512: at "SYS.UTL_SMTP", line 98
ORA-06512: at "SYS.UTL_SMTP", line 221
ORA-06512: at "TRS.MAILPKG", line 63
Any idea why this might be happening?
Upvotes: 1
Views: 14355
Reputation: 1910
Got the same problem with package 'utl_mail': it sends 'MAIL FROM:[email protected]' but it should be 'MAIL FROM:<[email protected]>'
Whatever I specify as sender, it doesn't change this; on the other hand, RCPT TO is always correctly angle-bracketed, whatever I specify.
With 'utl_smtp' it is enough to add angle brackets around the parameters of UTL_SMTP.MAIL and UTL_SMTP.RCPT.
Oracle does have examples which might help implementing utl_mail.send-like functions with utl_stml, so I'd suggest using that.
Upvotes: 1
Reputation: 12688
the problem was because of my "from" email (looked into it thanks to Bob Jarvis).. it didn't look like an email address (which have worked before but i think there were some changes to the email server which makes it not work now)
Upvotes: 1
Reputation: 607
Are all the unsent emails going out to multiple recipients ?
Here's a link to orafaq that suggests that it might have something to do with sending emails to multiple recipients and using the semicolon - ';' instead of the comma - ',' delimiter.
http://www.orafaq.com/forum/t/119863/2/
If this is the case, then try using a comma as a delimiter for multiple recipients
Upvotes: 1