MyBB Community Forums
[F] Mass mail preview [C-Michael83] - Printable Version

+- MyBB Community Forums (https://community.mybb.com)
+-- Forum: Community Archive (https://community.mybb.com/forum-106.html)
+--- Forum: Archived Forums (https://community.mybb.com/forum-143.html)
+---- Forum: Archived Development and Support (https://community.mybb.com/forum-155.html)
+----- Forum: Archived Bug Reports (https://community.mybb.com/forum-74.html)
+------ Forum: MyBB 1.4.2 (https://community.mybb.com/forum-100.html)
+------ Thread: [F] Mass mail preview [C-Michael83] (/thread-39331.html)



[F] Mass mail preview [C-Michael83] - Michael S. - 2008-10-20

The HTML code of the mass mail preview is incomplete:
	<html xmlns="http://www.w3.org/1999/xhtml">
	<head profile="http://gmpg.org/xfn/1">
		<title>Mass Email Preview</title>
		<link rel="stylesheet" href="styles/default/main.css" type="text/css" />
		<link rel="stylesheet" href="styles/default/popup.css" type="text/css" />
	</head>
	<body id="popup">
		<div id="popup_container">
		<div class="popup_title"><a href="#" onClick="window.close();" class="close_link"></a> Mass Email Preview</div>

		<div id="content">	
	rdhrtjrjzrjsdgv kzufgku6fzk



RE: Mass mail preview - Ryan Gordon - 2008-10-20

admin/modules/user/mass_mail.php

if($mybb->input['action'] == "preview")
{
	$query = $db->simple_select("massemails", "*", "mid='".intval($mybb->input['mid'])."'");
	$mass_email = $db->fetch_array($query);
	
	if(!$mass_email['mid'])
	{
		flash_message($lang->error_invalid_mid, 'error');
		admin_redirect("index.php?module=user/mass_mail");
	}
	
	?>
	<html xmlns="http://www.w3.org/1999/xhtml">
	<head profile="http://gmpg.org/xfn/1">
		<title>Mass Email Preview</title>
		<link rel="stylesheet" href="styles/<?php echo $page->style; ?>/main.css" type="text/css" />
		<link rel="stylesheet" href="styles/<?php echo $page->style; ?>/popup.css" type="text/css" />
	</head>
	<body id="popup">
		<div id="popup_container">
		<div class="popup_title"><a href="#" onClick="window.close();" class="close_link"><?php echo $lang->close_window; ?></a> Mass Email Preview</div>

		<div id="content">	
	<?php
	
	if($mybb->input['format'] == 'text' || !$mass_email['message'])
	{
		// Show preview of the text version
		echo nl2br($mass_email['message']);
		exit;
	}
	else
	{
		// Preview the HTML version
		echo $mass_email['htmlmessage'];
		exit;
	}
	
		?>
		</div>
	</div>
	</body>
	</html>
	<?php
}

The exit; needs to be placed right before the end bracket for the action


[F] Mass mail preview - Ryan Gordon - 2008-10-21

Thank you for your bug report.

This bug has been fixed in our internal code repository. Please note that the problem will not be fixed here until these forums are updated.

With regards,
MyBB Group