Código de Oracle - Enviar email a traves de Lotus Notes

<<>>

Versión 1
estrellaestrellaestrellaestrellaestrella(3)

Publicado el 4 de Septiembre del 2002gráfica de visualizaciones de la versión: Versión 1
23.854 visualizaciones desde el 4 de Septiembre del 2002
estrellaestrellaestrellaestrellaestrella
estrellaestrellaestrellaestrella
estrellaestrellaestrella
estrellaestrella
estrella

1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
*####################################################
Codigo fuente para Oracle - Forms 6i.
Este procedimiento envia un email a traves de Lotus Notes.
El procedimiento lo puedes llamar:
 
M_body Varchar2(1000); -- Ejemplo de variable
 
proc_send_mail (  M_recipient , M_Copy ---copy_to_in , M_BCopy ---blind_copy_to_in
, m_subject ---subject_in
, m_body ---text_in
, 'Y' ---return_receipt_in
, ''--, 'R' ---mood_stamp_in
, 11) ; ---view_icon_in 11 de informacion llegan hasta 175 iconos
 
--Para sacar los diferentes iconos que tiene lotus.
   FOR I IN 1..175 LOOP
m_subject := 'Icono: '||I;
      proc_send_mail (m_recipient
, '' ---copy_to_in
, '' ---blind_copy_to_in
, m_subject ---subject_in
, m_body ---text_in
, 'Y' ---return_receipt_in
, ''--, 'R'  ---mood_stamp_in
, I) ;         ---view_icon_in 96
   END LOOP;
 
Espero les sirva, att. Simon Guerrero Ushakov.
####################################################*/
PROCEDURE p_envia_mail (recipient_in IN VARCHAR2
, copy_to_in IN VARCHAR2
, blind_copy_to_in IN VARCHAR2
, subject_in IN VARCHAR2
, text_in IN VARCHAR2
, return_receipt_in IN VARCHAR2
, mood_stamp_in IN VARCHAR2
, view_icon_in IN NUMBER) IS
 
l_args ole2.list_type;
l_db ole2.obj_type;
l_doc ole2.obj_type;
l_return_receipt VARCHAR2(1);
l_session ole2.obj_type;
 
BEGIN
 
l_session := ole2.Create_Obj('Notes.NotesSession');
l_args := ole2.Create_Arglist;
 
ole2.Add_Arg(l_args, '');
ole2.Add_Arg(l_args, 'names.nsf');
 
l_db := ole2.Invoke_Obj(l_session, 'GetDatabase', l_args);
 
ole2.Destroy_Arglist(l_args);
 
l_doc := ole2.Invoke_Obj(l_db, 'CreateDocument');
 
ole2.Set_Property(l_doc, 'SendTo', recipient_IN);
 
IF copy_to_IN IS NOT NULL then
ole2.Set_Property(l_doc, 'CopyTo', copy_to_IN);
END IF;
 
IF blind_copy_to_IN IS NOT NULL then
ole2.Set_Property(l_doc, 'BlindCopyTo', blind_copy_to_IN);
END IF;
 
-- ''- Normal P - Personal
-- C - Confidential R - Private
-- F - Flame Q - Question
-- G - Good Job! M - Reminder
-- J - Joke T - Thank You!
IF mood_stamp_IN IS NOT NULL then
ole2.Set_Property(l_doc, 'SenderTag', mood_stamp_IN);
END IF;
 
IF subject_IN IS NOT NULL then
ole2.Set_Property(l_doc, 'Subject', subject_IN);
END IF;
 
IF text_IN IS NOT NULL then
ole2.Set_Property(l_doc, 'Body', text_IN);
END IF;
 
-- 1-Return Receipt 0-No Return Receipt
l_return_receipt :=
TRANSLATE(NVL(UPPER(return_receipt_IN), 'N'), ' NY', '001');
ole2.Set_Property(l_doc, 'ReturnReceipt', l_return_receipt);
IF l_return_receipt = '1' then
ole2.Set_Property(l_doc, 'DeliveryReport', 'B');
END IF;
 
IF view_icon_IN IS NOT NULL then
ole2.Set_Property(l_doc, '_ViewIcon', view_icon_IN);
END IF;
 
l_args := ole2.Create_Arglist;
 
--ole2.Add_Arg(l_args, PROPERTY_TRUE);
ole2.Add_Arg(l_args, '0');
ole2.Invoke(l_doc, 'Send', l_args);
 
ole2.Destroy_Arglist(l_args);
 
ole2.Release_Obj(l_session);
ole2.Release_Obj(l_db);
ole2.Release_Obj(l_doc);
 
EXCEPTION
when others then
Message('Unable to send mail to ' || recipient_IN);
Set_Application_Property(CURSOR_STYLE, 'DEFAULT');
RAISE;
END;



Comentarios sobre la versión: Versión 1 (3)

6 de Marzo del 2005
estrellaestrellaestrellaestrellaestrella
esta listo para usarse me parace bien mandar mails de esta manera
Responder
27 de Julio del 2007
estrellaestrellaestrellaestrellaestrella
El Codigo funciona muy bien.... Pero me gustaria saber
si de hay alguna manera de acerlo para que adjunte archivo....

Gracia
Responder
5 de Marzo del 2013
estrellaestrellaestrellaestrellaestrella
Excelente! Funciona muy bien, pero como le puedo adjuntar un archivo?
Responder

Comentar la versión: Versión 1

Nombre
Correo (no se visualiza en la web)
Valoración
Comentarios...
CerrarCerrar
CerrarCerrar
Cerrar

Tienes que ser un usuario registrado para poder insertar imágenes, archivos y/o videos.

Puedes registrarte o validarte desde aquí.

Codigo
Negrita
Subrayado
Tachado
Cursiva
Insertar enlace
Imagen externa
Emoticon
Tabular
Centrar
Titulo
Linea
Disminuir
Aumentar
Vista preliminar
sonreir
dientes
lengua
guiño
enfadado
confundido
llorar
avergonzado
sorprendido
triste
sol
estrella
jarra
camara
taza de cafe
email
beso
bombilla
amor
mal
bien
Es necesario revisar y aceptar las políticas de privacidad

http://lwp-l.com/s306