[#SMIME_write_CMS]
= SMIME&lowbar;write&lowbar;CMS
:mrdocs:

Write a CMS&lowbar;ContentInfo as an S&sol;MIME (MIME) message to `bio&period;`

== Synopsis

Declared in `&lt;openssl&sol;cms&period;h&gt;`

[source,cpp,subs="verbatim,replacements,macros,-callouts"]
----
int
SMIME&lowbar;write&lowbar;CMS(
    xref:BIO.adoc[BIO]* bio,
    xref:CMS_ContentInfo.adoc[CMS&lowbar;ContentInfo]* cms,
    xref:BIO.adoc[BIO]* data,
    int flags);
----

== Return Value

1 on success, or 0 on failure&period;

== Parameters

[cols="1,4"]
|===
| Name| Description
| *bio*
| Output BIO receiving the MIME&hyphen;formatted CMS&period;
| *cms*
| CMS object to serialise (typically signed or enveloped data)&period;
| *data*
| Optional content BIO for detached&sol;streaming content, or NULL&period;
| *flags*
| CMS&lowbar;&ast; &sol; SMIME&lowbar;&ast; flags controlling MIME headers and streaming&period;
|===


[.small]#Created with https://www.mrdocs.com[MrDocs]#
