Home » SQL & PL/SQL » SQL & PL/SQL » How to send email from PL/SQL (Oracle Database 11g)
How to send email from PL/SQL [message #381099] Thu, 15 January 2009 04:18 Go to next message
alpeshirkal
Messages: 9
Registered: August 2006
Location: Bahrain
Junior Member
While trying to send email message from PL/SQL I gets the error my code is as follows :

1 DECLARE
2 l_mailhost VARCHAR2(64) := 'mail.gulfsmart.com';
3 l_from VARCHAR2(64) := 'mgk@gulfsmart.com';
4 l_to VARCHAR2(64) := 'alpesh@yahoo.co.in';
5 l_mail_conn UTL_SMTP.connection;
6 BEGIN
7 l_mail_conn := UTL_SMTP.open_connection(l_mailhost, 25);
8 UTL_SMTP.helo(l_mail_conn, l_mailhost);
9 UTL_SMTP.mail(l_mail_conn, l_from);
10 UTL_SMTP.rcpt(l_mail_conn, l_to);
11 UTL_SMTP.data(l_mail_conn, 'Single string message.' || Chr(13));
12 UTL_SMTP.quit(l_mail_conn);
13* END;
SQL> /
DECLARE
*
ERROR at line 1:
ORA-29278: SMTP transient error: 451 Blocked - see http://www.spamcop.net/bl.shtml?83.136.59.141
ORA-06512: at "SYS.UTL_SMTP", line 20
ORA-06512: at "SYS.UTL_SMTP", line 96
ORA-06512: at "SYS.UTL_SMTP", line 240
ORA-06512: at line 10


I'm using oracle database 11g. And windows XP professional.

if you have any solution plesae send me.

Thanks
Re: How to send email from PL/SQL [message #381106 is a reply to message #381099] Thu, 15 January 2009 04:35 Go to previous messageGo to next message
Michel Cadot
Messages: 64151
Registered: March 2007
Location: Nanterre, France, http://...
Senior Member
Account Moderator
1/
Please read OraFAQ Forum Guide, especially "How to format your post?" section.
Make sure that lines of code do not exceed 80 characters when you format.
Indent the code (See SQL Formatter), use code tags and align the columns in result.
Use the "Preview Message" button to verify.

2/
This is not an Oracle error. Did you read the link?

Regards
Michel
Re: How to send email from PL/SQL [message #381115 is a reply to message #381106] Thu, 15 January 2009 05:47 Go to previous messageGo to next message
alpeshirkal
Messages: 9
Registered: August 2006
Location: Bahrain
Junior Member
what is the problem in my text everything seems to be ok.

Which link I don't have any link.

Regards

Alpesh
Re: How to send email from PL/SQL [message #381119 is a reply to message #381115] Thu, 15 January 2009 05:51 Go to previous message
Michel Cadot
Messages: 64151
Registered: March 2007
Location: Nanterre, France, http://...
Senior Member
Account Moderator
Quote:
Which link I don't have any link.

Maybe you should AT LEAST read the error message you get before posting.

Regards
Michel

[Updated on: Thu, 15 January 2009 05:51]

Report message to a moderator

Previous Topic: Replicating Packages across instances
Next Topic: merge issue
Goto Forum:
  


Current Time: Fri Dec 09 19:34:13 CST 2016

Total time taken to generate the page: 0.12899 seconds