gdmaq_mail_to_queue($args = array())
This function adds a new email into the mail queue. List of arguments contains the ‘type’ argument. This is usually detected by the plugin, but when passed by this function it can be anything. Extras array contains extra parameters from the PHPMailer class, and attachments are the array with attachments defined by the full path to the file. Headers array contains a list of headers, each one is defined as an array containing two values: the name of the header and value.
- $args: array definition of the email to add to queue
- to: email address to send email to
- subject: email subject
- plain: plain text version of the email
- html: full HTML version of the email
- type: type of email, default: mail.
- headers: array with additional headers to include
- attachments: array with files to attach
- extras: array with additional parameters
Here is the basic example for adding email into the queue.
gdmaq_mail_to_queue(array( 'to' => 'email@example.com', 'subject' => 'This is just a test email', 'plain' => 'This is the email body...' ));