WeberDev.com PHP and MySQL Code

LOG IN
BEGINNER GUIDES  |  PHP CLASSES  |  CODE SEARCH  |  ARTICLES SEARCH  |  PHP FORUMS  |  PHP MANUAL  |  PHP FUNCTIONS LIST  |  WEB SITE TEMPLATES
Start typing to search for PHP and MySQL Code Snippets and Articles Search
Submit a code Example / Snippet Submit Your Code
Search Engine Optimization Monitor SEO Monitor
Web Site UpTime Monitor UpTime Monitor
WeberDev's Monthly code contest PHP Code Contest
Your Personal Examples List My Favorite Examples
Your Personal Articles List My Favorite Articles
Edit Account Info Update Your Profile
PHP Code Search
Web Development Forums
Learn MySQL Playing Trivia
PHPBB2 Templates
Web Development Index
Web Development Resources
Web Development Content
PHPClasses
PHP Editor
PHP Jobs
Vision.To Design
Ajax Tutorials
PHP Programming Help
PHP/MySQL Programming
Webmaster Resources
Webmaster Forum
XML meta language
website builder
Mobile Dev World
Send encoded mail

mb_send_mail

(PHP 4 >= 4.0.6, PHP 5)

mb_send_mailSend encoded mail

Description

bool mb_send_mail ( string $to , string $subject , string $message [, string $additional_headers= NULL [, string $additional_parameter= NULL ]] )

Sends email. Headers and messages are converted and encoded according to the mb_language() setting. It's a wrapper function for mail(), so see also mail() for details.

Parameters

to

The mail addresses being sent to. Multiple recipients may be specified by putting a comma between each address in to . This parameter is not automatically encoded.

subject

The subject of the mail.

message

The message of the mail.

additional_headers

additional_headers is inserted at the end of the header. This is typically used to add extra headers. Multiple extra headers are separated with a newline ("\n").

additional_parameter

additional_parameter is a MTA command line parameter. It is useful when setting the correct Return-Path header when using sendmail.

Return Values

Returns TRUE on success or FALSE on failure.

Changelog

Version Description
5.0.0 The Content-Type and Content-Transfer-Encoding headers may be redefined as of PHP 5.0.0. Before this time, the values defined by mb_language() are always used.

See Also


Example of function to send out email if error occurs
Categories : PHP, Email, Debugging, Errors and Logging
Sending email with random details
Categories : PHP, Email, Debugging
Class for sending mail with MIME attachments in multipart format using external sendmail, mimencode and zip
Categories : Email, Network, PHP, PHP Classes



Campaign Mailer - Allows sending emails to a mailing list with multiple classes of emails handled. Suitable for mailing campaigns.
Categories : PHP, PHP Classes, Email
X-Mailer, this php3 script verifies recipient address in three different ways before it sends email. All in one document. Report satus when mail sent.
Categories : PHP, Email, HTML and PHP
Class to send a file as an attachment with the php mail() function.
Categories : PHP, Email
A class for sending email; it has support for To:, Cc:, Bcc: and Reply-To: headers. It requires that you have sendmail installed.
Categories : Email, PHP Classes, PHP
Editing the virtusertable and sendmail.cw via PHP3.0 and Mysql
Categories : MySQL, HTML and PHP, PHP, Databases
simple script to send emails via a html-form to different users
Categories : Email, MySQL, PHP, Databases
Sending mail to a mailing list and showing progress
Categories : PHP, Mail, Beginner Guides
send_mail function to defeat Header Injection Hacking/Spamming
Categories : PHP, Email, Form Processing, Security
Mail-lib provides a simple interface to the sendmail program. Note: you must actually have sendmail on your machine (sorry windows NT users).
Categories : Algorithms, Email, PHP
A web-based php3 IMAP email client supporting address books, attachements (downloading and sending), LDAP searching, and much much more.
Categories : Email, PHP, LDAP
tinySendMail and tinySockMail functions for generating SMTP mail within PHP
Categories : PHP, Mail, SMTP