Resultados 1 al 3 de 3

Tema: Envio de e-mail con adjuntos

  1. #1
      Senior
    G

    Registrado
    febrero de 2015
    Ubicación
    Quilmes, Buenos Aires
    Edad
    69
    Mensajes
    212
    Última visita
    02.05.2024

    Agradecimientos
     
    Recibidos
    136
    Enviados
    98

    Citaciones y menciones
     
    Mentioned
    21 Post(s)
    Tagged
    0 Thread(s)
    Quoted
    3 Post(s)
    Poder de Reputación
    21
    Concurso: Segundo puesto / Point Value: 0 Activista del Foro / Point Value: 0

    E-mail Envio de e-mail con adjuntos

    Hola a todos.
    Estoy usando AcuCobol GT 5.1 para Windows.
    A través de un programa puedo llamar al cliente de correo pasandole la dirección del destinatario.
    COBOL Código:
    1. STRING "MAILTO:"                  
    2.        E-MAIL-CLI                
    3.        DELIMITED BY SIZE INTO MAIL
    4. display web-browser value MAIL

    Donde E-MAIL-CLI es el campo del archivo de clientes donde guardo la dirección y MAIL es la variable que le paso a web-browser.

    Quisiera saber si es posible a la vez que se le indica la dirección del destinatario, adjuntarle un archivo.

    Revisé toda la documentación y no encontré nada.

    Alguno sabe si es posible?.

    Desde ya muchas gracias de antemano.

    0 Not allowed!

  2. #2
      Administrador
    Avatar de Kuk

    Registrado
    enero de 2015
    Ubicación
    Madrid
    Edad
    39
    Mensajes
    2,288
    Última visita
    Ayer a las 17:16

    Agradecimientos
     
    Recibidos
    1,036
    Enviados
    888

    Citaciones y menciones
     
    Mentioned
    103 Post(s)
    Tagged
    0 Thread(s)
    Quoted
    31 Post(s)
    Poder de Reputación
    10

    Predeterminado

    @Gusaiello, mira a ver si te sirve esto: vbscript - creating a vbs script function for sending email with attachment - Stack Overflow

    Habrá que crear un fichero *.vbs y ejecutarlo desde tu programa.

    0 Not allowed!
    ¿Te han ayudado? NO TE OLVIDES de darle al botón
    ¿Quieres dirigirte a alguien en tu post? Notifícale con una mención, tienes 2 opciones:
    1. Haciendo clic en el icono al lado de su nick
    2. Haciendo clic en el botón en el editor y escribiendo su nick.

  3. #3
      Senior
    Avatar de Joseg

    Registrado
    abril de 2015
    Mensajes
    331
    Última visita
    02.04.2024

    Agradecimientos
     
    Recibidos
    147
    Enviados
    92

    Citaciones y menciones
     
    Mentioned
    28 Post(s)
    Tagged
    0 Thread(s)
    Quoted
    4 Post(s)
    Poder de Reputación
    21
    Activista del Foro / Point Value: 0 Innovación / Point Value: 0

    Predeterminado

    Eu uso SwithMail:

    COBOL Código:
    1.           string "SwithMail.exe /s /x swc.xml" delimited by size
    2.               " /to "  delimited by size                 *> para
    3.                JH-TO delimited by "  "
    4.               into CommandLine
    5.           end-string
    6.  
    7.           IF JH-CC NOT = SPACES
    8.              STRING CommandLine DELIMITED BY "  "        *> CC  
    9.                 " /CC "  delimited by size
    10.                 JH-CC delimited by "  "
    11.                 INTO CommandLine
    12.              end-string
    13.           END-IF
    14.  
    15.           STRING CommandLine DELIMITED BY "  "
    16.               ' /sub "'  delimited by size
    17.               JH-SUBJECT delimited by "     "       *> assunto
    18.               '"' delimited by size
    19.               INTO  CommandLine
    20.           end-string
    21.  
    22.           STRING CommandLine DELIMITED BY "  "
    23.               ' /b '  delimited by size                  *> body
    24.               '"' delimited by size
    25.               JH-BODY delimited by "                   "
    26.               '"' delimited by size
    27.               into CommandLine
    28.           end-string
    29.  
    30.           IF JH-ATTACH NOT = SPACES      
    31.              STRING CommandLine DELIMITED BY "  "
    32.                 ' /a '  delimited by size
    33.                 '"' delimited by size
    34.                 JH-ATTACH  DELIMITED BY "   "       *> anexo1
    35.                 '"' delimited by size
    36.                 INTO CommandLine
    37.              end-string
    38.           END-IF
    39.          
    40.           ---> chamar aqui a CommandLine   (não sei como é em Acucobol)


    Usando o Outlook:
    Criar um arquivo line sequencial:

    COBOL Código:
    1.      move spaces to regsm
    2.      MOVE "Dim o" to regsm
    3.      WRITE regsm
    4. *-----------------------------------------------------------------------------
    5.      move spaces to regsm
    6.      MOVE "Dim m" to regsm
    7.      WRITE regsm
    8. *-----------------------------------------------------------------------------
    9.      move spaces to regsm
    10.      MOVE 'Set o = CreateObject("Outlook.Application")' to regsm
    11.      WRITE regsm
    12. *-----------------------------------------------------------------------------
    13.      move spaces to regsm
    14.      MOVE 'Set m = o.CreateItem(0)' to regsm
    15.      WRITE regsm
    16. *-----------------------------------------------------------------------------
    17.      move spaces to regsm
    18.      STRING "m.to = " DELIMITED BY SIZE
    19.             '"' DELIMITED BY SIZE
    20.             pmail DELIMITED BY ' '      *> EMAIL
    21.             '"' DELIMITED BY SIZE
    22.             INTO regsm
    23.      WRITE regsm
    24. *-----------------------------------------------------------------------------
    25.      move spaces to regsm
    26.      MOVE spaces TO pcc    *> CC
    27.      IF pcc NOT = " "
    28.         STRING "m.Cc = " DELIMITED BY SIZE
    29.             '"' DELIMITED BY SIZE
    30.             pcc DELIMITED BY ' '
    31.             '"' DELIMITED BY SIZE
    32.             INTO regsm
    33.         WRITE regsm
    34.      END-IF
    35. *-----------------------------------------------------------------------------
    36.      move spaces to regsm
    37.      MOVE spaces TO pbcc   *> BCC
    38.      IF pbcc NOT = "  "
    39.         STRING "m.Bcc = " DELIMITED BY SIZE
    40.             '"' DELIMITED BY SIZE
    41.             pbcc DELIMITED BY ' '
    42.             '"' DELIMITED BY SIZE
    43.             INTO regsm
    44.         WRITE regsm
    45.      END-IF
    46. *-----------------------------------------------------------------------------
    47.      move spaces to regsm
    48.         STRING "m.Subject = " DELIMITED BY SIZE
    49.             '"' DELIMITED BY SIZE
    50.             passunto DELIMITED BY '   '      *> assunto
    51.             '"' DELIMITED BY SIZE
    52.             INTO regsm
    53.      WRITE regsm
    54. *-----------------------------------------------------------------------------
    55.      move spaces to regsm
    56.      MOVE "m.Display" to regsm
    57.      WRITE regsm
    58.  
    59. *-----------------------------------------------------------------------------
    60.  
    61.      move spaces to regsm
    62.    
    63.         STRING "m.HTMLBody = " DELIMITED BY SIZE
    64.             '"' DELIMITED BY SIZE
    65.             pbody DELIMITED BY '                 '  *> body
    66.             '" & "<br>" & m.HTMLBody  ' DELIMITED BY SIZE
    67.             INTO regsm
    68.      WRITE regsm
    69. *-----------------------------------------------------------------------------
    70.      move spaces to regsm
    71.      *> Attachments
    72.         STRING "m.Attachments.Add " DELIMITED BY SIZE
    73.             '"' DELIMITED BY SIZE
    74.             pAttachments DELIMITED BY '            '   *> anexos
    75.             '"' DELIMITED BY SIZE
    76.             INTO regsm
    77.      WRITE regsm
    78. *-----------------------------------------------------------------------------
    79.      move spaces to regsm
    80.      MOVE "m.Display" to regsm
    81.      WRITE regsm
    82.  
    83. *-----------------------------------------------------------------------------
    84.      move spaces to regsm
    85.      MOVE "m.Send" TO regsm
    86.       WRITE regsm

    0 Not allowed!

Información de Tema

Usuarios Viendo este Tema

Actualmente hay 1 usuarios viendo este tema. (0 miembros y 1 visitantes)

Temas Similares

  1. [Componente] Enviar E-Mail desde PowerCOBOL
    Por Recato53 en el foro PowerCOBOL (ActiveX, v4 - v11)
    Respuestas: 17
    Último Mensaje: 30.08.2019, 11:34
  2. [Sintaxis] Enviar y Recibir Mail
    Por fastpho en el foro PowerCOBOL (ActiveX, v4 - v11)
    Respuestas: 1
    Último Mensaje: 14.10.2017, 09:07
  3. [Información] Envio SMS powercobol
    Por JuanJuan77 en el foro PowerCOBOL (ActiveX, v4 - v11)
    Respuestas: 1
    Último Mensaje: 09.03.2016, 16:40
  4. [Sintaxis] Envio de SMS
    Por Roger en el foro PowerCOBOL (ActiveX, v4 - v11)
    Respuestas: 10
    Último Mensaje: 22.06.2015, 22:57
  5. [Sintaxis] Envio de alertas y Chat
    Por Roger en el foro PowerCOBOL (ActiveX, v4 - v11)
    Respuestas: 1
    Último Mensaje: 21.03.2015, 22:25

Marcadores

Marcadores

Permisos de Publicación

  • No puedes crear nuevos temas
  • No puedes responder temas
  • No puedes subir archivos adjuntos
  • No puedes editar tus mensajes
  •