Automated email
If you're using PHP on your server, you can use the mail function. The syntax is
mail ($to, $subject, $body, $headers)
where $to is a string of comma-separated to addresses in the format Name <address@theirdomain>, eg
$to = "The First User <firstuser@[member='Example'].com>, Another User <contact@[member='Example'].net>"
$subject should just be a single line string of your subject line.
$body is the body of your email. It's possible to send the email as html, or you can just use plain text. You have to use CRLF to separate the lines, which means that you should use double quotes around the string, and use \r\n to indicate a line break, eg
$body = "Dear Mr Example,\r\n" . "This is an example email. Notice how I am adding \\r\\n at the end of every line\r\n" . "End of message";
$headers should be a CRLF-delimited set of email headers, in the format Headername: content. You must include a From header, and there are loads of other ones that can be included. eg
$headers = "From: Benny123 <benny123@[member='Example'].com>\r\n" . "CC: AnExampleUser <exampleuser@[member='Example'].net>\r\n" . //If you want to send it as HTML instead of plain text "MIME-Version: 1.0\r\n" . "Content-Type: text/html; charset=ISO-8859-1";
The documentation for this function can be found here.
PS ignore the @ stuff, that's forum tagging, you can figure out how it should look like

Create an account or sign in to comment
You need to be a member in order to leave a comment
Create an account
Sign up for a new account in our community. It's easy!
Register a new accountSign in
Already have an account? Sign in here.
Sign In Now