Choose your database:
AnySQL
MySQL
MS SQL Server
PostgreSQL
SQLite
Firebird
Oracle
SQL Anywhere
DB2
MaxDB

Subscribe to our news:
Partners
Testimonials
Lucian Nedescu: "Thank you very much. Have a nice century (this is a real wish :P). I think that i will do a great job on my clients database with the new php interface. Thank You again".
David Lantz: "Thank you, this is by far the simplest, and most friendly utility for building db record system I have ever used. I wish I could get my systems guys at the office to purchase this for our company would be so very helpful and speed up a lot of work. I for one have used it for everything from a simple inventory record of my house, to a members record for my church just little pet projects and a test bed to test my own db builds and theories before having to hand code at the office..... it is a lot of fun to work with".

More

Add your opinion

PHP Generator for MySQL online Help

Prev Return to chapter overview Next

sendMailMessage

Sends an email message to specified recipients using project-level outgoing mail settings.

 

Signature:

function sendMailMessage($recipients, $messageSubject, $messageBody, 

       $attachments = '', $cc = '', $bcc = '')

 

Parameters:

Name

Data type

Description

Mandatory

$recipients

string or array

A recipient or a list of recipients for the email message

yes

$messageSubject

string

A subject of the email message

yes

$messageBody

string

A body of the email message. HTML is allowed.

yes

$attachments

string or array

An attachment or a list of attachments for the email message

no

$cc

string or array

A recipient or a list of recipients specified in the CC field

no

$bcc

string or array

A recipient or a list of recipients specified in the BCC field

no

 

Example 1

This example demonstrates the simplest use of the function.

 

sendMailMessage('recipient@example.com', 'Message subject', 'Message body');

 

Example 2

This example demonstrates an advanced use of the function.

 

$messageSubject = 'Welcome!!!';

$messageBody = file_get_contents("external_data/mail_message_body.html");

    

$attachments = 

    array(

        'external_data/files/example.pdf',

        'external_data/images/example.png'

    );

$cc = array('mark_lynch@example.com', 'david_frost@example.gov'); 

$bcc = 

    array(

        'dougie_jones@example.edu' => 'Dougie Jones',

        'bob_cooper@example.com' => 'Bob Cooper',        

        'laura_horne@example.en' => 'Laura Horne'        

    );

        

sendMailMessage('admin@example.com', $messageSubject, $messageBody, $attachments, $cc, $bcc);

 

See also: Setting up common SMTP servers.



Prev Return to chapter overview Next