Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations gkittelson on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

Message length using utl_smtp

Status
Not open for further replies.

Kenrae

Programmer
Feb 7, 2001
174
ES
I have a problem with this package when the message has a length greater than about 1800 characters. It doesn't return any error, but the mail is not sent (or, at least, not received).
Any ideas?

Thank's
 
I've fixed it. It's a problem concerning SMTP protocol. Every call to write_data() can only manage 2Kb of data.
 
Can you clarify? Is there a way around the 2k limit, or did you have to limit the length of your messages?
 
There is a way around.
I used a call to
Code:
utl_smtp.data
to send the actual message. When you use this call you have this 2k limit.
But you have some procedures used to gain more control. These are
Code:
utl_smtp.open_data, write_data, write_raw_data
and
Code:
close_data
. Actually, a call to
Code:
data
generates one call to
Code:
open_data, write_data
and
Code:
close_data
. And, that's the question,
Code:
write_data
is the one with the 2k limit. But you can call it multiple times before closing. So, all you have to do is to use this procedures instead of
Code:
data
. Then, you have to split you're message into 2k-pieces and send every piece with a
Code:
write_data
call.

And, while searching for a solution I found the
Code:
write_raw_data
procedure. I think it could be used for sending attachments. I'll investigate on it... when I'd have enough time ;-)
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top