[#SMIME_write_PKCS7]
= SMIME&lowbar;write&lowbar;PKCS7
:mrdocs:

Write a PKCS&num;7 object in S&sol;MIME (PEM&sol;CMS) form to a BIO&period;

== Synopsis

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

[source,cpp,subs="verbatim,replacements,macros,-callouts"]
----
int
SMIME&lowbar;write&lowbar;PKCS7(
    xref:BIO.adoc[BIO]* bio,
    xref:PKCS7.adoc[PKCS7]* p7,
    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 for the S&sol;MIME message&period;
| *p7*
| PKCS&num;7 structure to write&period;
| *data*
| Optional content BIO for streaming, or NULL when content is already in `p7&period;`
| *flags*
| SMIME&lowbar;&ast; writing flags (for example SMIME&lowbar;DETACHED)&period;
|===


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