print "Invalid SMTP Port"; exit; } $smtpMailer->setSmtpHost(trim($_POST['smtp_host'])); $smtpMailer->setSmtpUsername(trim($_POST['smtp_username'])); $smtpMailer->setSmtpPassword(trim($_POST['smtp_password'])); $smtpMailer->setSmtpPort($_POST['smtp_port']); if (isset($_POST['chk_smtp_secure'])) { $smtpMailer->setIsSecure(true); } else { $smtpMailer->setIsSecure(false); } $smtpMailer->setMailType($_POST['contenttype']); $smtpMailer->setMailFrom($realname); $smtpMailer->setMailFromEmail($from); $smtpMailer->setReplayMail($_POST['replyto']); try { $smtpMailer->createSMTP(); } catch (Zend_Exception $e) { print "<br/>" . $e->getMessage(); exit; } } //process the emails //echo "<pre>";print_r($emaildata); for ($x = $start_num; $x < $numemails; $x++) { print "<script type='text/javascript'>scrollWindow();</script>"; if ($titles_radiogroup == 1) { $to = $emaildata[$x][$email_ind]; } else { $to = $allemails[$x];