Oh no! Where's the JavaScript?
Your Web browser does not have JavaScript enabled or does not support JavaScript. Please enable JavaScript on your Web browser to properly view this Web site, or upgrade to a Web browser that does support JavaScript.

sendemail

This function will send a mail to one or more email addresses. You can chose to send plain- or HTML-embedded text. The function uses the phpmailer class which is excellent for this. Use your settings in PHPFusion to use the built in sendmail on your server or send it through another SMPT server.

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.