![]() |
|
|
|
|
|||||||
| Forums | Portal | Register | Forum Rules | FAQ | Contribute | Members List | Arcade | Search | Today's Posts | Mark Forums Read |
| UNIX for Dummies Questions & Answers If you're not sure where to post a UNIX or Linux question, post it here. All UNIX and Linux newbies welcome !! |
|
|
||||
| Thread | Thread Starter | Forum | Replies | Last Post |
| Sending an email with more than one files | thambi | Shell Programming and Scripting | 7 | 05-25-2007 06:52 PM |
| Sending email w/ ftp log as attachment | idesaj | UNIX for Dummies Questions & Answers | 2 | 07-19-2005 08:48 AM |
| sending email | vasikaran | UNIX for Dummies Questions & Answers | 1 | 07-05-2005 02:50 AM |
| sending email in unix. need help! | tads98 | Shell Programming and Scripting | 2 | 05-16-2005 05:33 AM |
| Sending email | bcheaib | UNIX for Dummies Questions & Answers | 7 | 02-22-2005 05:03 AM |
|
|
Submit Tools | LinkBack | Thread Tools | Display Modes |
|
|||
|
Email not sending to Hotmail
I have a strange problem. I have a script that sends out emails and it used to work fine to all email addresses, but I recently moved the site to a dedicated server and now it won't send out emails to any Hotmail accounts. None of the Hotmail accounts have got spam filters on and they all used to get email from the site. All of the script is the same as I say the only difference is the site is now on a dedicated server. Both the old and new servers are RedHat Linux using php5. I went into the php.ini file and all I found for SMTP is:
Quote:
Code:
<?php
function send_mail($to, $from, $subject, $message)
{
global $g;
if (isset($g['options']['mail_html']) and $g['options']['mail_html'] == "Y") $ct = "text/html";
else $ct = "text/plain";
if (isset($g['options']['mail_utf8']) and $g['options']['mail_utf8'] == "Y") {
$headers = "From: " . $from . "\n";
$headers .= "Content-Type: " . $ct . "; charset=utf-8;\n";
$headers .= "Reply-To: " . $from . ";\n";
$headers .= "Return-Path: " . $from . ";\n";
} else {
$headers = "From: " . $from . "\n";
$headers .= "Content-Type: " . $ct . ";\n";
$headers .= "Reply-To: " . $from . ";\n";
$headers .= "Return-Path: " . $from . ";\n";
}
if (isset($g['options']['mail_utf8_subject']) and $g['options']['mail_utf8_subject'] == "Y") $subject = '=?UTF-8?B?'.base64_encode(trim(preg_replace('#[\n\r]+#s', '', $subject)))."?=\n";
mail($to, $subject, $message, $headers);
}
|
| Forum Sponsor | ||
|
|
|
|||
|
maybe your new server dunno how to forward the email, maybe you need to specify a mailhost or maybe some config missing.
Go to the "/" root filesystem and check if there is any file called dead.letter. type mailq to check if your mails are stuck in the queue. on solaris servers there is a syslog log file whenever you send email out it will log to that file, check your syslog for more clues. Maybe syslog will say mails are dererred or error or remote server terminated you. Lastly you can try few things which can reveal more details on what's going on in the email sending process banner test > /tmp/xxx /usr/lib/sendmail -v youremail@hotmail.com < /tmp/xxx or (assuming from your above code your localhost is your mailhost) First open 2 sessions. 1st session do a tail -f /var/log/syslog 2nd session do telnet localhost 25 mail from: darthvader@yourdomain.com rcpt to: youremail@hotmail.com data test test test . <---- once you type the termination "." it will immed attempt to send the email. Then at the same time switch to first session(tail -f) to check syslog and see what it says. |
|
|||
|
but if you just want a quick and dirty way out of your problem. This may or may not work (usually it does work for me)
On the new server stop sendmail then backup sendmail binary and sendmail.cf cp -p sendmail sendmail.ORG cp -p sendmail.cf sendmailcf.ORG from your old server copy over the sendmail binary and cf file into the appropriate directory, change the appropriate ownership and permissions then start sendmail. Check syslog (tail -f) to see if mails are going out. good luck |
|
|||
|
Thanks, the server itself is sending out email, it was just Hotmail that wasn't getting through, but it turned out that Spam Cannibal had wrong blacklisted it. I've now had it removed from the list and it's all working fine.
|
|||
| Google The UNIX and Linux Forums |