gdmaq_mail_to_queue($args = array())

Description

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.

Parameters

  • $args: array definition of the email to add to queue

Arguments

  • 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

Example

Here is the basic example for adding email into the queue.

gdmaq_mail_to_queue(array(
  'to' => 'sendtoemail@example.com',
  'subject' => 'This is just a test email',
  'plain' => 'This is the email body...'
));
0
0
643
Rate this reference

You are not allowed to rate this post.

Comments

Leave a Reply