473,396 Members | 1,945 Online
Bytes | Software Development & Data Engineering Community
Post Job

Home Posts Topics Members FAQ

Join Bytes to post your question to a community of 473,396 software developers and data experts.

How Fast is ULT_SMTP

151 100+
HI all

I ahve used utl_smtp package many a times. But how can we determine its speed.

I mean suppose if i call this from my code inside a package, how can we determine the speed it sends a mail.

--> Can i send mail to a gmail account
--> in utl_smtp.conection , what are two parameters. How can i use these params in my local system.


thanks
vamsi
Dec 17 '08 #1
14 7206
debasisdas
8,127 Expert 4TB
1.speed of sending mail depends on size nand type of mail and size of attchemnt if any.
2.you can send mail to any mail account.
3.utl_smtp.connection does not accept any parameters but utl_smtp.open_connection does, the parametrs are mailhost and port number for SMTP (usually 25) This is the default value .

so you can work with only one parameter that is hostname.
Jan 2 '09 #2
vamsioracle
151 100+
Thanks a lot.

Now i want to write a package, which i will be calling from a Oracle Form. The form has a text box that is used to enter the email address. As soon as user clicks on submit button. the mail should be triggered to the captured email id. How to do that?

Irrespective of the mail id,(assumin all the mail ids are from Gmail only) can we send the mail.

Vamsi
Jan 5 '09 #3
amitpatel66
2,367 Expert 2GB
Yes you can always do that.. In forms builder, on button click, wirte a code to send a mail and you will need to read the to address from a text box and store that in a variable.
Jan 5 '09 #4
vamsioracle
151 100+
thanks a lot

but my question was different. I am done with the code at th forms side. But in my package ehile using utl_smtp package, how can i dynamically selct the host.

suppose the user enters a ymail, then will the host for utl_smtp change. How can we determine the host if the mail id is always changing
Jan 5 '09 #5
debasisdas
8,127 Expert 4TB
HOST NAME refers to the host of the sending mail server not the target mail server address.
Jan 5 '09 #6
amitpatel66
2,367 Expert 2GB
And the Host name used in utl_smtp does not change.it remains the same since it is the host name of source smtp server and not the destination server as mentioned by Debasis
Jan 6 '09 #7
vamsioracle
151 100+
I got the followinr error when trying to send mail

Expand|Select|Wrap|Line Numbers
  1.  
  2. ERROR at line 1:
  3. ORA-29278: SMTP transient error: 421 Service not available
  4. ORA-06512: at "SYS.UTL_SMTP", line 17
  5. ORA-06512: at "SYS.UTL_SMTP", line 96
  6. ORA-06512: at "SYS.UTL_SMTP", line 138
  7. ORA-06512: at "SCOTT.SEND_MAIL", line 11
  8. ORA-06512: at line 1
  9.  
and this is my code:
Expand|Select|Wrap|Line Numbers
  1.  
  2. create or replace procedure send_mail
  3. is
  4. conn utl_smtp.connection;
  5. host varchar2(100) := '220.226.25.213';
  6. send varchar2(200);
  7. msg varchar2(100);
  8.  
  9. begin
  10. Select ename into msg from emp where empno = 7369;
  11. send :='mailtovamsidhar.p@gmail.com';
  12. conn:= utl_smtp.open_connection( 'host');
  13. utl_smtp.helo( conn, 'host');
  14. utl_smtp.mail( conn,send);
  15. utl_smtp.rcpt( conn, send);
  16.  
  17. utl_smtp.data( conn,msg);
  18. utl_smtp.quit( conn );
  19. end send_mail;
  20.  
Jan 10 '09 #8
madankarmukta
308 256MB
Hi,

Check whether the SMTP service is Up/running on the Oracle database server you are using.

Thanks!
Jan 12 '09 #9
amitpatel66
2,367 Expert 2GB
Try this code:
Expand|Select|Wrap|Line Numbers
  1. create or replace procedure send_mail
  2. is
  3. conn utl_smtp.connection;
  4. host varchar2(100) := '220.226.25.213';
  5. send varchar2(200);
  6. msg varchar2(100);
  7.  
  8. begin
  9. Select ename into msg from emp where empno = 7369;
  10. send :='mailtovamsidhar.p@gmail.com';
  11. conn:= utl_smtp.open_connection( host,25);
  12. utl_smtp.helo( conn, host);
  13. utl_smtp.mail( conn,send);
  14. utl_smtp.rcpt( conn, send);
  15.  
  16. utl_smtp.data( conn,msg);
  17. utl_smtp.quit( conn );
  18. end send_mail; 
  19.  
  20.  
Jan 12 '09 #10
vamsioracle
151 100+
This was the error i got.

I made the IIS changes in control panel.


ERROR at line 1:
ORA-29279: SMTP permanent error: 550 5.7.1 Unable to relay for mailtovamsidhar.p@gmail.com
ORA-06512: at "SYS.UTL_SMTP", line 17
ORA-06512: at "SYS.UTL_SMTP", line 98
ORA-06512: at "SYS.UTL_SMTP", line 240
ORA-06512: at "SCOTT.MAIL", line 14
ORA-06512: at line 1

what is relaying the mail id


thanks
vamsi
Jan 12 '09 #11
amitpatel66
2,367 Expert 2GB
Your From Address should be related to your source SMTP server. For eg: if our server alias is acne.com then from addr will be 'abcd@acne.com'. So change your From address in the line UTL_SMTP.MAIL with the propoer from address
Jan 13 '09 #12
vamsioracle
151 100+
The package is executing perfectly but still i get the same error. I checked the IIS in the control panel and everything is fine. Still i get the same error. Is there any other reason to get this other than IIS-->SMTP enabling

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.SEND_MAIL", line 11
ORA-06512: at line 1
Jan 14 '09 #13
amitpatel66
2,367 Expert 2GB
The error itself is self explanatory. "Service Not Available". Do you have any other Unix Server or SMTP server that you can use for testing. Either your SMTP Server is Down or Incorrect.
Jan 15 '09 #14
vamsioracle
151 100+
I am trying this on my laptop, running Windows Xp SP2. So is there a solution for this ?
Jan 15 '09 #15

Sign in to post your reply or Sign up for a free account.

Similar topics

18
by: Michele Simionato | last post by:
I posted this few weeks ago (remember the C Sharp thread?) but it went unnoticed on the large mass of posts, so let me retry. Here I get Python+ Psyco twice as fast as optimized C, so I would like...
0
by: Dean J Garrett | last post by:
Does anyone know about "fast web view" for PDF files? We have a .NET application that opens PDF files as the user's request. The problem is that some of these are very large, 20MB, and it takes...
8
by: Neil | last post by:
I have a very puzzling situation with a database. It's an Access 2000 mdb with a SQL 7 back end, with forms bound using ODBC linked tables. At our remote location (accessed via a T1 line) the time...
22
by: Marc Mones | last post by:
Hello, I'working with IBM DB2 V8.1 and CLI/ODBC. I've got a problem with the following statement: ******************************************************************************** SELECT...
20
by: GS | last post by:
The stdint.h header definition mentions five integer categories, 1) exact width, eg., int32_t 2) at least as wide as, eg., int_least32_t 3) as fast as possible but at least as wide as, eg.,...
6
by: G.Esmeijer | last post by:
Friends, I would like to read a text file (fixed length formaated) really fast and store the data into an Access database (2003). Using the streamreader and reading line by line, separating the...
10
by: javuchi | last post by:
I just want to share some code with you, and have some comments and improvements if you want. This header file allocates and add and delete items of any kind of data from a very fast array: ...
95
by: hstagni | last post by:
Where can I find a library to created text-based windows applications? Im looking for a library that can make windows and buttons inside console.. Many old apps were make like this, i guess ...
0
by: Vinod Sadanandan | last post by:
Fast-Start Failover An Overview In Dataguard Environment ============================================================================= This article describes the automatic fast start failover...
9
by: Salad | last post by:
I have access, for testing at my client's site, a Win2000 computer running A2003 retail. He recently upgraded all of his other machines to DualCore Pentiums with 2 gig ram and run A2003 runtime. ...
0
by: emmanuelkatto | last post by:
Hi All, I am Emmanuel katto from Uganda. I want to ask what challenges you've faced while migrating a website to cloud. Please let me know. Thanks! Emmanuel
1
by: Sonnysonu | last post by:
This is the data of csv file 1 2 3 1 2 3 1 2 3 1 2 3 2 3 2 3 3 the lengths should be different i have to store the data by column-wise with in the specific length. suppose the i have to...
0
by: Hystou | last post by:
There are some requirements for setting up RAID: 1. The motherboard and BIOS support RAID configuration. 2. The motherboard has 2 or more available SATA protocol SSD/HDD slots (including MSATA, M.2...
0
marktang
by: marktang | last post by:
ONU (Optical Network Unit) is one of the key components for providing high-speed Internet services. Its primary function is to act as an endpoint device located at the user's premises. However,...
0
by: Hystou | last post by:
Most computers default to English, but sometimes we require a different language, especially when relocating. Forgot to request a specific language before your computer shipped? No problem! You can...
0
jinu1996
by: jinu1996 | last post by:
In today's digital age, having a compelling online presence is paramount for businesses aiming to thrive in a competitive landscape. At the heart of this digital strategy lies an intricately woven...
0
by: Hystou | last post by:
Overview: Windows 11 and 10 have less user interface control over operating system update behaviour than previous versions of Windows. In Windows 11 and 10, there is no way to turn off the Windows...
0
tracyyun
by: tracyyun | last post by:
Dear forum friends, With the development of smart home technology, a variety of wireless communication protocols have appeared on the market, such as Zigbee, Z-Wave, Wi-Fi, Bluetooth, etc. Each...
0
agi2029
by: agi2029 | last post by:
Let's talk about the concept of autonomous AI software engineers and no-code agents. These AIs are designed to manage the entire lifecycle of a software development project—planning, coding, testing,...

By using Bytes.com and it's services, you agree to our Privacy Policy and Terms of Use.

To disable or enable advertisements and analytics tracking please visit the manage ads & tracking page.