Email

PHP programming forum. Ask questions or help people concerning PHP code. Don't understand a function? Need help implementing a class? Don't understand a class? Here is where to ask. Remember to do your homework!

Moderator: General Moderators

Post Reply
Napoleao
Forum Newbie
Posts: 1
Joined: Fri May 14, 2004 12:16 pm

Email

Post by Napoleao »

Code: Select all

if ($_REQUEST['do'] == "close") {

	if (p_ticket('close')) {
		$db->query("UPDATE ticket SET is_open = 0, date_closed = '$now_' WHERE id = '$id'");
		ticketlog($id, 'close');
		if ($_REQUEST[email] == '1') {
			$ticket = $db->query_return("SELECT * FROM ticket WHERE id = '$id'");
			$user_details = $db->query_return("SELECT * FROM user WHERE id = '$ticket[userid]'");
			$user_details = update_user_details($user_details);;
			eval(makeemaileval('message', 'BODY_question_closed', $subject, $ticket));
			dp_mail($user_details['email'], $subject, trim($message));
			ticketlog($ticket['id'], 'email_sent_to_user', NULL, NULL, "To: $user_details[email], Subject: $subject");
		}
		jump("ticketview.php?id=$id", "The ticket has been closed");
	}
}
?>
I have the following code (not done by me) How can I add a piece of code so that everytime that funcition is activated it emails 3 users. I am still learning php, hope someone can point me to the right direction. Thanks
User avatar
launchcode
Forum Contributor
Posts: 401
Joined: Tue May 11, 2004 7:32 pm
Location: UK
Contact:

Post by launchcode »

Look at the example code in the mail() function.

http://uk2.php.net/mail

Stick it after the final ticketlog() line.
Post Reply