Zig Requires Chilkat v11.0.0+
Zig
Example: MailMan.FetchAll method
Demonstrates how to call the FetchAll method.Chilkat Zig Downloads
const std = @import("std");
const chilkat = @import("chilkat");
pub fn main(init: std.process.Init) !void {
const alloc = init.arena.allocator();
var success: bool = false;
success = false;
const mailman = try chilkat.MailMan.init();
defer mailman.deinit();
// Setup mailman with POP3 server and login settings...
// ...
// ...
const bundle = try chilkat.EmailBundle.init();
defer bundle.deinit();
const keep_on_server = true;
const headers_only = false;
// numBodyLines only applies if downloading headers-only.
const num_body_lines = 0;
mailman.fetchAll(keep_on_server, headers_only, num_body_lines, bundle) catch {
std.debug.print("{s}\n", .{try mailman.getLastErrorText(alloc)});
return;
};
// ...
// ...
}