¡Hola, amigos! I’m Señor FAQ, the mustached maestro of questions and answers! With my trusty glasses and a book of endless wisdom, I turn dudas into solutions. Soy el héroe de los curiosos and the champion of clarity.
JScms_send_email
The JScms_send_email
function stores email information in the database for later sending by a cron job.
It handles multiple recipients, CC addresses, and file attachments, ensuring email data is queued properly for processing.
JScms_send_email($jakdb, $mailaddress, $mailccaddress, $replyto, $subject, $message, $emailfiles)
$jakdb
: (object) The database connection instance.$mailaddress
: (string|array) The recipient email address(es).$mailccaddress
: (string|array) The CC email address(es).$replyto
: (string) The reply-to email address.$subject
: (string) The email subject.$message
: (string) The email body content.$emailfiles
: (string|array) The file attachments for the email.
(bool) Returns true
if the email information was successfully stored in the database, or false
if an error occurred.
<?php
$result = JScms_send_email(
$jakdb,
"recipient@example.com",
["cc1@example.com", "cc2@example.com"],
"replyto@example.com",
"Subject Line",
"This is the email body content.",
["path/to/file1.pdf", "path/to/file2.jpg"]
);
if ($result) {
echo "Email queued successfully.";
} else {
echo "Failed to queue email.";
}
?>
$jakdb
is properly configured and available.$emailfiles
are correct and accessible by the system.