Your Browser is not longer supported

Please use Google Chrome, Mozilla Firefox or Microsoft Edge to view the page correctly
Loading...

{{viewport.spaceProperty.prod}}

Include-Datei YMLSML.H zu YMLSML() - Mail senden

&pagelevel(5)&pagelevel

Nachfolgend ist die Include-Datei YMLSML.H aufgelistet. Ein Beispielprogramm, das die Verwendung des Funktionsaufrufs YMLSML() zeigt, finden Sie auf "C-Beispielprogramme".

#ifndef _YMLSML_H
#define _YMLSML_H

#if 0
/*********************************************************************
 BEGIN-INTERFACE   YMLSML

 TITLE             (/ Submit send mail order /)
 NAME              YMLSML.H
 DOMAIN            MAIL
 LANGUAGE          C
 COPYRIGHT         (C) Fujitsu Technology Solutions 2010
                       ALL RIGHTS RESERVED
 COMPILATION-SCOPE USER
 INTERFACE-TYPE    CALL,
                      ORDER
 RUN-CONTEXT       TU

 PURPOSE           (/ Submit an order to send mail
                   /)
 [...]
 END-INTERFACE     YMLSML.
*********************************************************************/
#endif

[...]

#ifdef _YMLSML_H_VERSION_3

#define YMLSML_UNIT     940
#define YMLSML_FUNCTION  20
#define YMLSML_VERSION    3

/* Wait operand values                                                */
/* ENUM wait_s                                                        */
#define YMLSML_yes 1                    /* YES                        */
#define YMLSML_no 2                     /* NO-DISCARD                 */
#define YMLSML_res 3                    /* NO                         */

/* Mail encryption/signing protocol                                   */
/* ENUM sec_prot_s                                                    */
#define YMLSML_smime 1                  /* SMIME                      */

/* General yes or no selection                                        */
/* ENUM yesno_s                                                       */
#define YMLSML_yes 1                    /* YES                        */
#define YMLSML_no 2                     /* NO                         */
#define YMLSML_optfile 3                /* OPTFILE                    */

/* Cipher operand values                                              */
/* ENUM cipher_s                                                      */
#define YMLSML_rc2_40 1                 /* RC2-40                     */
#define YMLSML_rc2_64 2                 /* RC2-64                     */
#define YMLSML_rc2_128 3                /* RC2-128                    */
#define YMLSML_des 4                    /* DES                        */
#define YMLSML_des3 5                   /* 3DES                       */
#define YMLSML_aes_128 6                /* AES-128                    */
#define YMLSML_aes_192 7                /* AES-192                    */
#define YMLSML_aes_256 8                /* AES-256                    */
#define YMLSML_cipher_from_optfile 127  /* OPTFILE                    */

/* rc                                                                 */
/* ENUM rc_s                                                          */
#define YMLSML_be_ok 0                  /* OK                         */
#define YMLSML_be_param_error 1         /* Parameter error            */
#define YMLSML_be_resource_sat 2        /* Resource saturation        */
#define YMLSML_be_smtp_error 3          /* General SMTP error         */
#define YMLSML_be_smime_error 4         /* SMIME error                */
#define YMLSML_be_smtp_mail_from_error 5
                                        /* Error at SMTP MAIL FROM    */
#define YMLSML_be_smtp_rcpt_to_error 6  /* Error at SMTP RCPT TO      */
#define YMLSML_be_smtp_data_error 7     /* Error at SMTP DATA         */
#define YMLSML_be_file_access_error 8   /* Error at user file access  */
#define YMLSML_be_message_too_large 9   /* Message too large          */
#define YMLSML_be_int_error 10          /* Internal error             */

/* main return codes                                                  */
/* mret_code                                                          */
#define YMLSML_successful 0             /* No error detected          */
#define YMLSML_parameter_error 1        /* Parameter error            */
#define YMLSML_int_error 2              /* Internal error             */
#define YMLSML_syntax_error 3           /* Syntax error               */
#define YMLSML_opt_file_error 4         /* Option file not accessible */
#define YMLSML_msgatt_file_error 5      /* Message or attachment file */
                                        /* not accessible             */
#define YMLSML_smime_file_error 6       /* SMIME related file not     */
                                        /* accessible                 */
#define YMLSML_param_too_big 7          /* Mail parameter too big     */
#define YMLSML_backend_error 8          /* Back-end error             */
#define YMLSML_max_order 9              /* Max number of orders       */
                                        /* exceeded                   */
#define YMLSML_serv_not_avail 10        /* Mailclient Service not     */
                                        /* available                  */
#define YMLSML_addr_invalid 11          /* Mailpar address invalid    */
#define YMLSML_resource_sat 12          /* Resource saturation        */
#define YMLSML_asti_not_avail 13        /* Subsystem ASTI not         */
                                        /* available                  */
#define YMLSML_no_from_addr 14          /* No FROM address specified  */
#define YMLSML_asti_error 15            /* Unexpected ASTI error      */
#define YMLSML_timeout 16               /* Maximum wait time reached  */
#define YMLSML_flm_error 17             /* Unexpected FLM error       */

/* Parameter area                                                     */
struct YMLSML_pl_mdl {

        /* FHDR                                                       */
        struct ESMFHDR hdr;

        /* Input parameters                                           */
        struct {
                void* mail_par;         /* Mail parameter area        */
                unsigned long mail_par_len;
                                        /* Mail parameter area length */
                long waittime;          /* Maximum wait time (secs)   */
                unsigned char wait;     /* wait                       */
                unsigned char sec_prot; /* Protocol for encryption    */
                                        /* and signing                */
                unsigned char encrypt;  /* Encryption                 */
                unsigned char sign;     /* Signing                    */
                unsigned char cipher;   /* Cipher                     */
                char optfile[54];       /* Option file                */
                char reserved1[1];      /* Reserved                   */
        } in_data;

        /* Output parameters                                          */
        struct {
                char order_id[16];      /* Order Id                   */
                unsigned long rc;       /* Return code                */
                char ret_msg[160];      /* Return message             */
                unsigned long asti_rc;  /* Return code from ASTI      */
                char msg_id[7];         /* Message Id                 */
                char reserved2[1];      /* Reserved                   */
        } out_data;
};

/*  Entry for YMLSML  */
#ifdef __SNI_HOST_BS2000
#ifdef __cplusplus
extern "C" void _SVC(int, void*);
inline void YMLSML(struct YMLSML_pl_mdl& param)
{_SVC(20, &param);}
#else
void _SVC(int, void*);
#define YMLSML(p) _SVC(20, &p)
#endif
#endif


/* Tag value(s) for struct _general                                   */
/* ENUM tag_s                                                         */
#define YMLSML_tag_from 1               /* from                       */
#define YMLSML_tag_fake_from 2          /* fake_from                  */
#define YMLSML_tag_to 3                 /* to                         */
#define YMLSML_tag_fake_to 4            /* fake_to                    */
#define YMLSML_tag_cc 5                 /* cc                         */
#define YMLSML_tag_fake_cc 6            /* fake_cc                    */
#define YMLSML_tag_bcc 7                /* envelope recipient mail    */
                                        /* addresses                  */
#define YMLSML_tag_replyto 8            /* reply_to                   */
#define YMLSML_tag_subject 9            /* subject                    */
#define YMLSML_tag_cont_type 18         /* content_type               */
#define YMLSML_tag_optfile 20           /* option file                */
#define YMLSML_tag_keyfile 21           /* key file                   */
#define YMLSML_tag_signfile 22          /* signer certificate file    */
#define YMLSML_tag_scertfile 23         /* additional signer          */
                                        /* certificates file          */
#define YMLSML_tag_rcertfile 24         /* recipient certificate file */
#define YMLSML_tag_crlfile 25           /* CRL file                   */
#define YMLSML_tag_cafile 26            /* CA file                    */
#define YMLSML_tag_att_name 27          /* Attachment name            */

/* Input parameters                                                   */
struct YMLSML_general {
        unsigned short tag;             /* tag of general parameter   */
        char reserved[2];               /* reserved                   */
        unsigned long len;              /* general parameter length   */
};

/* Tag value(s) for struct _add_header                                */
/* ENUM tag_s                                                         */
#define YMLSML_tag_add_header 10        /* add. header                */

/* Input parameters                                                   */
struct YMLSML_add_header {
        unsigned short tag;             /* tag of add. header         */
        char reserved[2];               /* reserved                   */
        unsigned long len_field_name;   /* add. header name length    */
        unsigned long len_field_body;   /* add. header body length    */
};

/* Tag value(s) for struct _data_spec                                 */
/* ENUM tag_s                                                         */
#define YMLSML_tag_data_spec 15         /* dataspec                   */

/* Type of data specification                                         */
/* ENUM type_s                                                        */
#define YMLSML_file 1                   /* file                       */
#define YMLSML_data 2                   /* data                       */

/* Data specification                                                 */
struct YMLSML_data_spec {
        unsigned short tag;             /* tag of add. header         */
        unsigned char type;             /* specification type         */

        /* options                                                    */
        struct /* options */ {
                char del_file: 1;       /* delete file                */
                char destroy: 1;        /* destroy when deleting      */
                char lock_file: 1;      /* lock file                  */
                char unused: 5;         /* unused                     */
        } options;
        unsigned long len;              /* length of data. spec.      */
};

/* Tag value(s) for struct _charset                                   */
/* ENUM tag_s                                                         */
#define YMLSML_tag_charset 16           /* character set              */

/* Binary data selection                                              */
/* ENUM bnry_s                                                        */
#define YMLSML_yes 1                    /* YES                        */
#define YMLSML_no 2                     /* NO                         */

/* Data specification                                                 */
struct YMLSML_charset {
        unsigned short tag;             /* tag of add. header         */
        unsigned char binary;           /* binary data                */
        char reserved[1];               /* reserved                   */
        unsigned long len;              /* length                     */
        char src_charset_XHCS[8];       /* src_charset_XHCS           */
        char dest_charset_XHCS[8];      /* dest_charset_XHCS          */
};

/* Tag value(s) for struct _encoding                                  */
/* ENUM tag_s                                                         */
#define YMLSML_tag_encoding 17          /* transfer encoding          */

/* Type of encoding mechanism                                         */
/* ENUM mech_s                                                        */
#define YMLSML_7bit 1                   /* 7 bit                      */
#define YMLSML_8bit 2                   /* 8 bit                      */
#define YMLSML_binary 3                 /* binary                     */
#define YMLSML_qp 4                     /* quoted printable           */
#define YMLSML_b64 5                    /* base64                     */

/* Encoding                                                           */
struct YMLSML_encoding {
        unsigned short tag;             /* tag of encoding            */
        unsigned char mechanism;        /* encoding mechanism         */
        char reserved[1];               /* reserved                   */
};

/* Tag value(s) for struct _cont_disp                                 */
/* ENUM tag_s                                                         */
#define YMLSML_tag_cont_disp 19         /* content disposition        */

/* Disposition type                                                   */
/* ENUM disptype_s                                                    */
#define YMLSML_inline 1                 /* inline                     */
#define YMLSML_attachment 2             /* attachment                 */

/* Content disposition                                                */
struct YMLSML_cont_disp {
        unsigned short tag;             /* tag of content disposition */
        unsigned char disp_type;        /* content disposition        */
        char reserved[1];               /* reserved                   */
};

/* Tag value(s) for struct _msg_att                                   */
/* ENUM tag_s                                                         */
#define YMLSML_tag_msg_begin 11         /* msg_begin                  */
#define YMLSML_tag_msg_end 12           /* msg_end                    */
#define YMLSML_tag_att_begin 13         /* att_begin                  */
#define YMLSML_tag_att_end 14           /* att_end                    */

/* Bracketing message or attachment specification                     */
struct YMLSML_msg_att {
        unsigned short tag;             /* tag of msg | att           */
        char reserved[2];               /* reserved                   */
};

#endif /* _YMLSML_H_VERSION_3 */

#endif          /* _YMLSML_H */

Hinweise zur Definition des Eingabebereichs für die Mail-Parameter

  • Die gegenwärtige Implementierung beschränkt die Größe der Mail-Parameter auf 63 KB. Vermutlich wird diese Grenze nur dann erreicht, wenn der Text der Mail oder Daten in den Anhängen direkt in den Parameterbereich der Mail eingefügt werden. Tritt dieser Fehler auf, dann schreiben Sie den Mail-Text in eine (temporäre) Datei und geben Sie im Parameterbereich stattdessen nur den Dateinamen an.

  • Die reservierten Header-Bereiche müssen mit binären Nullen initialisiert werden.
  • Die Daten mit variabler Länge beginnen direkt nach dem zugehörigen Header. Die Header müssen auf Wortlänge ausgerichtet sein. Daher müssen Sie Füll-Bytes einfügen, wenn die Länge des variablen Teils kein Vielfaches von 4 ist.

  • Der Feldname des Mail-Header muss in der Datenstruktur für zusätzliche Header ohne den folgenden Doppelpunkt eingegeben werden.

  • Die Reihenfolge der Datenstrukturen ist irrelevant, falls nicht anders vermerkt.

  • Die Definition des Mail-Texts oder eines Anhangs muss mit zwei YMLSML_msg_att-Datenstrukturen geklammert sein. Dabei ist:

    tag = YMLSML_tag_msg_begin / YMLSML_tag_msg_end

    oder

    tag = YMLSML_tag_att_begin / YMLSML_tag_att_end

    Die Definition des Mail-Texts oder eines Anhangs kann Datenstrukturen mit den folgenden Tags enthalten:

    YMLSML_tag_{data_spec, charset, encoding, cont_type}

    Liegt eine Datenstruktur YMLSML_charset außerhalb einer Klammerung mit der Datenstruktur YMLSML_msg_att, dann wird sie auf die nachfolgenden Header-Zeilen (siehe RFC 2047) und auf nachfolgende Meldungen oder Anhänge ohne eigene Zeichensatz-Spezifikation angewendet.

  • Dateien müssen unverändert bleiben, bis die Mail gesendet ist.