Enviar correo
De GrialWIKI
(Diferencias entre revisiones)
(Página creada con '==Enviar un correo interno a uno o más usuarios== Se debe utilizar el: <code> PACKAGE BODY SIGSA.PA_SYSFUNC_CORREO PROCEDURE SEND( P_TITULO_IN IN varchar2 , P_TOUSER...') |
(→Enviar un correo interno a uno o más usuarios) |
||
Línea 11: | Línea 11: | ||
</code> | </code> | ||
- | Ejemplo: | + | Ejemplo desde PL/SQL: |
<code> | <code> | ||
declare | declare | ||
Línea 18: | Línea 18: | ||
PA_SYSFUNC_CORREO.SEND('test', 'LTATO,MGRUNEWALD,HVULCANO' | PA_SYSFUNC_CORREO.SEND('test', 'LTATO,MGRUNEWALD,HVULCANO' | ||
, 'Texto del mensaje', w_errmsg) | , 'Texto del mensaje', w_errmsg) | ||
- | if w_errmsg is NOT NULL then | + | if w_errmsg is NOT NULL then |
+ | raise_application_error(-20101, w_errmsg || ' enviando correo'); | ||
+ | end if; | ||
</code> | </code> | ||
Línea 24: | Línea 26: | ||
Si no es NULL, en w_errMsg está el mensaje de error. | Si no es NULL, en w_errMsg está el mensaje de error. | ||
- | desde | + | Ejemplo desde Visual Basic: |
<code> | <code> | ||
Dim Grq as new GrialQuery | Dim Grq as new GrialQuery | ||
Grq.Init "EXECUTE: PA_SYSFUNC_CORREO.SEND;'test';'LTATO,MGRUNEWALD,HVULCANO';'Texto del mensaje';o:TEXTOERR:String" | Grq.Init "EXECUTE: PA_SYSFUNC_CORREO.SEND;'test';'LTATO,MGRUNEWALD,HVULCANO';'Texto del mensaje';o:TEXTOERR:String" | ||
GrialCont.LoadData Grq | GrialCont.LoadData Grq | ||
- | if DataIn(Grq!TEXTOERR) then . | + | if DataIn(Grq.Rst!TEXTOERR) then |
+ | MsgBox Grq.Rst!TEXTOERR,VbCritical,"Enviando Correo" | ||
+ | end if | ||
</code> | </code> |
Revisión de 20:27 24 ago 2011
Enviar un correo interno a uno o más usuarios
Se debe utilizar el:
PACKAGE BODY SIGSA.PA_SYSFUNC_CORREO PROCEDURE SEND( P_TITULO_IN IN varchar2 , P_TOUSERS IN varchar2 , P_MSG IN varchar2 , P_ERROR OUT varchar2)
Ejemplo desde PL/SQL:
declare w_errmsg varchar2(600); begin PA_SYSFUNC_CORREO.SEND('test', 'LTATO,MGRUNEWALD,HVULCANO' , 'Texto del mensaje', w_errmsg) if w_errmsg is NOT NULL then raise_application_error(-20101, w_errmsg || ' enviando correo'); end if;
si w_errmsg vuelve con NULL entoces anduvo ok. Si no es NULL, en w_errMsg está el mensaje de error.
Ejemplo desde Visual Basic:
Dim Grq as new GrialQuery Grq.Init "EXECUTE: PA_SYSFUNC_CORREO.SEND;'test';'LTATO,MGRUNEWALD,HVULCANO';'Texto del mensaje';o:TEXTOERR:String" GrialCont.LoadData Grq if DataIn(Grq.Rst!TEXTOERR) then MsgBox Grq.Rst!TEXTOERR,VbCritical,"Enviando Correo" end if