Hi
I can get/send email by Squirrelmail
But when use phpmailer to send email from my website email is not sent
this is function:
function send()
{
$mail = new PHPMailer();
$mail->CharSet = 'UTF-8';
$mail->IsSMTP();
$mail->SMTPAuth = true;
$mail->Host = 'mail.mydomain.com';
$mail->Port = 465;
$mail->Username = '[email protected]';
$mail->Password = 'password';
$mail->From = '[email protected]';
$mail->FromName = 'myname';
$mail->AddAddress($this->_tpl_vars['TO']);
if (isset($this->_tpl_vars['CC']))
{
$cc = explode(';', $this->_tpl_vars['CC']);
foreach ($cc as $c)
if (!empty($c))
$mail->AddCC($c);
}
$mail->AddReplyTo('[email protected]');
$i = array();
$i = 3;
$mail->IsHTML(true);
$mail->Subject = $this->_tpl_vars['SUBJECT'];
$mail->Body = $this->_tpl;
@$mail->Send();
}
I can get/send email by Squirrelmail
But when use phpmailer to send email from my website email is not sent
this is function:
function send()
{
$mail = new PHPMailer();
$mail->CharSet = 'UTF-8';
$mail->IsSMTP();
$mail->SMTPAuth = true;
$mail->Host = 'mail.mydomain.com';
$mail->Port = 465;
$mail->Username = '[email protected]';
$mail->Password = 'password';
$mail->From = '[email protected]';
$mail->FromName = 'myname';
$mail->AddAddress($this->_tpl_vars['TO']);
if (isset($this->_tpl_vars['CC']))
{
$cc = explode(';', $this->_tpl_vars['CC']);
foreach ($cc as $c)
if (!empty($c))
$mail->AddCC($c);
}
$mail->AddReplyTo('[email protected]');
$i = array();
$i = 3;
$mail->IsHTML(true);
$mail->Subject = $this->_tpl_vars['SUBJECT'];
$mail->Body = $this->_tpl;
@$mail->Send();
}