Welcome to Questionaries, where you can ask questions and receive answers from other members of the community.

Let us know at info@questionaries.org

PHP email problem

7 like 0 dislike
Hello all,

I have a problem with my mail script. The problem is as follow:

My work adress is POP3 and forwarded to my private gmail adress. Now when I send an email through my PHP script, I receive the email only on my gmail adress, and not on my POP3 account. Which is weird, because with all other emails I receive them on both.

the script is as follow:

function SentMail ($from, $frommail, $to, $subject, $mail) {
$headers = "From: ". $from . " <".$frommail.">\n";
$headers .= "MIME-Version: 1.0\n";
$headers .= "Content-Type: text/html; charset=UTF-8\n";
$headers .= 'X-Mailer: PHP/' . phpversion();


mail($to, $subject, $mail, $headers);

}

Can someone tell me what I've done wrong.
asked 2 years ago by eagle09 (95,490 points)

1 Answer

0 like 0 dislike
It's looking for the server smtp.fiveocean.net but isn't able to resolve it.

If you look at the line the last step in the stack trade is calling, you can see it throwing an exception:

if (!$this->_stream = fsockopen($host, $this->_params['port'], $errno, $errstr, $timeout))
{
  throw new Swift_TransportException(
    'Connection could not be established with host ' . $this->_params['host'] .
    ' [' . $errstr . ' #' . $errno . ']'
    );
}
answered 2 years ago by biswaskeran (70,430 points)

Related questions

7 like 0 dislike
3 answers
asked 2 years ago by eagle09 (95,490 points)
7 like 0 dislike
1 answer
asked 2 years ago by eagle09 (95,490 points)
7 like 0 dislike
3 answers
7 like 0 dislike
1 answer
asked 2 years ago by eagle09 (95,490 points)
7 like 0 dislike
1 answer
asked 2 years ago by eagle09 (95,490 points)