Znupi
01-27-2008, 09:02 AM
I just installed sendmail on my Xubuntu 7.04 and when I try sending a mail with PHP, like this:
<?php
$start = microtime(true);
$mail_sent = mail("znupi69@gmail.com", "Hello there!", "Hi! This is a test mail :-)", "From: Felix Oghina <felix@status2web.ath.cx>");
$end = microtime(true);
$total_time = $end - $start;
echo "<pre>" . number_format($total_time, 2) . "s\n";
if ($mail_sent) {
echo "Mail sent!";
}
else echo "Mail not sent :-<";
echo "</pre>";
?>
...the mail gets sent, but it takes about a whole minute to send it. That seems a bit too long... Is it normal? Any way to shorten this time?
<?php
$start = microtime(true);
$mail_sent = mail("znupi69@gmail.com", "Hello there!", "Hi! This is a test mail :-)", "From: Felix Oghina <felix@status2web.ath.cx>");
$end = microtime(true);
$total_time = $end - $start;
echo "<pre>" . number_format($total_time, 2) . "s\n";
if ($mail_sent) {
echo "Mail sent!";
}
else echo "Mail not sent :-<";
echo "</pre>";
?>
...the mail gets sent, but it takes about a whole minute to send it. That seems a bit too long... Is it normal? Any way to shorten this time?