sendemail
Quote
sendemail( string $toname , string $tomail , string $fromname , string $fromemail , string $subject , string $message [ , string $type [ , string $cc [ , string $bcc ] ] ] )
Parameters
toname
The name of the receiver
tomail
The mail of the receiver
fromname
Senders name
fromemail
Senders mail
subject
Mail subject
message
Mail message
type
Type man either be 'text' or 'html'. Text is default!
cc
Carbon copy, whom do you want to send copies of this mail to.
bcc
Blind carbon copy, this receiver will not be able to see from whom this mail has been sent to others than the receiver.
Return Values
This function will not return anything but will send mail to the given persons.
Example
Code
<?php
// Include the sendmail function file as this function is not defined in maincore.php
require_once INCLUDES."sendmail_include.php";
// Set variables
$toname = "Ola Nordmann";
$tomail = "ola.nordmann@mail.com";
$fromname = "Kari Nordmann";
$fromemail = "kari.nordmann@mail.com";
$subject "Mail Subject";
$message = "Hi OlanHow are you doing?";
// Send the mail
sendemail($toname, $tomail, $fromname, $fromemail, $subject, $message);
?>
Changelog
7.01.00 - SMTP port added via the Administration and the $settings['smtp_port'] variable.
Notes
Your server might time out when sending too many mails at once. Breaking many emails into several groups can be a good idea with mass mail sending.