// Compare current date/time to queue date/time if queue is before current, set queue to current
					if ($curr_timestamp > $queue_timestamp) $queue_timestamp = $curr_timestamp;
				}
				else
				{
					$queue_timestamp = $curr_timestamp;
				}

				// Insert message in queue - no need to stripslashes or mysql_real_escape_string
				$message_id = insert_message($relay_subject,$message,$curr_timestamp,$queue_timestamp,$sent_count,$texthtml);

				// Add subscribers to queue
				$address_result = get_confirmed_members();
				while ($address_row = mysql_fetch_assoc($address_result))
				{
					insert_recipients_into_queue($message_id,$address_row[address],$queue_timestamp);
				}
			}
			else
			{
				// Insert message in queue - no need to stripslashes or mysql_real_escape_string
				insert_message($relay_subject,$message,$curr_timestamp,$curr_timestamp,$sent_count,$texthtml);

				// not using the queue. send immediately
				// build list of confirmed recipients to bcc to (send to owner)
				$bcc = array();
				while ($row = mysql_fetch_assoc($result))
				{
					$bcc[] = "$row[address],";
				}
				$subscribers = implode(",",$bcc);
Beispiel #2
0
			$address_result = get_confirmed_members_staustell();
			
		}elseif ( $_POST[shop] == 'All')
		{ 
			$address_result = get_confirmed_members();
			
		}elseif ( $_POST[shop] == 'Roche')
		{ 
			$address_result = get_confirmed_members_roche();
		}else{
			$address_result = 0;
		}
				
		while ( $address_row = mysql_fetch_assoc($address_result) )
		{
			insert_recipients_into_queue($message_id,$address_row[address],$send_time);
		}
		
		echo "<p><b><font color=Green>Your message has been queued for delivery and archived.</font></b> ";
		echo "You can view the delivery progress in the <a href=archives.php>Archives</a>. To send another message, ";
		echo "<a href=\"send.php\">click here</a></p>";
	}
	else // No queue - send immediately
	{
		$message_id = insert_message($subject,$message,time(),$send_time,$sent_count,$texthtml);
		// Build list of members and combine addresses to be used in the Bcc field
		$bcc = "";
		while ($row = mysql_fetch_assoc($result))
		{
			$bcc .= "$row[address],";
		}