473,908 Members | 4,008 Online
Bytes | Software Development & Data Engineering Community
+ Post

Home Posts Topics Members FAQ

How Fast is ULT_SMTP

151 New Member
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.conect ion , what are two parameters. How can i use these params in my local system.


thanks
vamsi
Dec 17 '08 #1
14 7256
debasisdas
8,127 Recognized Expert Expert
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.conn ection does not accept any parameters but utl_smtp.open_c onnection 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 New Member
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 Recognized Expert Top Contributor
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 New Member
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 Recognized Expert Expert
HOST NAME refers to the host of the sending mail server not the target mail server address.
Jan 5 '09 #6
amitpatel66
2,367 Recognized Expert Top Contributor
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 New Member
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 Contributor
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 Recognized Expert Top Contributor
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

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

Similar topics

18
4898
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 to now if something is wrong on my old laptop and if anybody can reproduce my results. Here are I my numbers for calling the error function a million times (Python 2.3, Psyco 1.0, Red Hat Linux 7.3, Pentium II 366 MHz): $ time p23 erf.py real ...
0
1607
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 forever to download the whole doc before anything is displayed. I was told that the PDF files were created with "fast web view" and that the first page can be immediately displayed before the entire document is downloaded. Has anyone done this? How...
8
2902
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 it took to go to a record was very slow. The go to mechanism was a box that the user typed the index value into a combo box, with very simple code attached: with me.RecordsetClone .FindFirst " = " & me.cboGoTo If Not .NoMatch Then Me.Bookmark...
22
3329
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 S_ART, S_SPRACHE, S_MANDANT, S_NR, S_SUB, S_OWNER, S_SATZ FROM SY0001_00005 WHERE S_ART = ? AND S_SPRACHE = ? AND S_MANDANT = ? AND S_NR = ? AND
20
9201
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., int_fast32_t 4) integer capable of holding a pointer, intptr_t 5) widest integer in the implementation, intmax_t Is there a valid motivation for having both int_least and int_fast?
6
23788
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 line into string just takes to long. When I Import the file with access manually goes fast. But how to use this fromout a C# programme who has done this before and who can give met some answers
10
3026
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: #include <stdlib.h> #ifndef __LIST_H__ #define __LIST_H__
95
5538
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 ____________________________________ | | | ------------------ | | | BUTTON | | | ...
0
8021
by: Vinod Sadanandan | last post by:
Fast-Start Failover An Overview In Dataguard Environment ============================================================================= This article describes the automatic fast start failover configuration and the conditions for trigerring a fast start failover in dataguard environment . In Faststart failover dataguard configuration if the primary database becomes unavailable, the...
9
2155
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. I believe all current SPs for Windows and Office are installed on the fast machines. I have 1 process/subroutine that has worked for a couple of years without a problem. It works fine on the testing (slow) machine. The process checks a folder...
0
9875
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 effortlessly switch the default language on Windows 10 without reinstalling. I'll walk you through it. First, let's disable language synchronization. With a Microsoft account, language settings sync across devices. To prevent any complications,...
0
11335
Oralloy
by: Oralloy | last post by:
Hello folks, I am unable to find appropriate documentation on the type promotion of bit-fields when using the generalised comparison operator "<=>". The problem is that using the GNU compilers, it seems that the internal comparison operator "<=>" tries to promote arguments from unsigned to signed. This is as boiled down as I can make it. Here is my compilation command: g++-12 -std=c++20 -Wnarrowing bit_field.cpp Here is the code in...
0
10913
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 tapestry of website design and digital marketing. It's not merely about having a website; it's about crafting an immersive digital experience that captivates audiences and drives business growth. The Art of Business Website Design Your website is...
1
11040
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 Update option using the Control Panel or Settings app; it automatically checks for updates and installs any it finds, whether you like it or not. For most users, this new feature is actually very convenient. If you want to control the update process,...
0
10536
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 protocol has its own unique characteristics and advantages, but as a user who is planning to build a smart home system, I am a bit confused by the choice of these technologies. I'm particularly interested in Zigbee because I've heard it does some...
1
8094
isladogs
by: isladogs | last post by:
The next Access Europe User Group meeting will be on Wednesday 1 May 2024 starting at 18:00 UK time (6PM UTC+1) and finishing by 19:30 (7.30PM). In this session, we are pleased to welcome a new presenter, Adolph Dupré who will be discussing some powerful techniques for using class modules. He will explain when you may want to use classes instead of User Defined Types (UDT). For example, to manage the data in unbound forms. Adolph will...
0
5930
by: TSSRALBI | last post by:
Hello I'm a network technician in training and I need your help. I am currently learning how to create and manage the different types of VPNs and I have a question about LAN-to-LAN VPNs. The last exercise I practiced was to create a LAN-to-LAN VPN between two Pfsense firewalls, by using IPSEC protocols. I succeeded, with both firewalls in the same network. But I'm wondering if it's possible to do the same thing, with 2 Pfsense firewalls...
0
6133
by: adsilva | last post by:
A Windows Forms form does not have the event Unload, like VB6. What one acts like?
1
4765
by: 6302768590 | last post by:
Hai team i want code for transfer the data from one system to another through IP address by using C# our system has to for every 5mins then we have to update the data what the data is updated we have to send another system

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.