我在电子邮件签名中添加了这个: 测试网站 testwebsite.com
==========
每当我将testwebsite.com用作我网站上电子邮件签名的一部分时,电子邮件通知都不会发送。但如果我将其更改为mywebsite.com,则电子邮件通知工作正常。
==========
顺便说一句,我的电子邮件通知是使用CodeIgniter框架中的SendMail在mywebsite.com上集成的。
您能否帮我解释为什么我的营销域testwebsite.com阻止电子邮件通知成功发送。
PS。出于安全考虑,我只是在上述场景中使用了测试网站URL。
==
function send_email_template($template, $recipient, $subject = null, $vars = null) {
$ci = & get_instance();
$ci->load->model('default/m_settings');
//get site data
$website = $ci->M_website->getWebsite();
$ci->load->library('email');
$ci->email->clear();
$config['mailtype'] = 'html';
$ci->email->initialize($config);
// Set default subject.
if ($subject == null) {
// Try to find a "_subject" setting for the template specified.
$subject = $ci->m_settings->get($template . '_subject');
if ($subject) {
$subject = $subject->setting_value;
} else {
$subject = '';
}
}
$template = $ci->m_settings->get($template);
$body = htmlspecialchars_decode(cs_parse_vars($template->setting_value, $vars));
$body .= $ci->m_settings->get('global_email_footer')->setting_value;
$ci->email->set_newline("\r\n");
//get admin email
$ci->load->model('admin/M_administrator');
$admin_email = $ci->m_settings->get('admin_outgoing_email')->setting_value;
$email_sender_from = ($admin_email) ? $admin_email : 'no-reply@' . strtolower(preg_replace('/\s/', '-', $website['name']));
$ci->email->from($email_sender_from, $website['name']);
// _APPLICATION_ENV_ is set in /index.php
if (_APPLICATION_ENV_ != 'PRODUCTION') {
$recipient = _EMAIL_RECEPIENT_;
}
if ($recipient == '') {
#$recipient = 'jamygallardo@gmail.com';
}
$ci->email->to($recipient);
$ci->email->subject('[' . $website["name"] . '] ' . $subject);
$ci->email->message($body);
if ($ci->email->send()) {
return TRUE;
} else {
show_error('mailer error:' . $ci->email->print_debugger());
}
return TRUE;
}
谢谢, 牙买加