Jump to content

simple email on php 7.1


westman
 Share

Recommended Posts

I have been using the same script for years to send an email. However, php 7.1 on goddady is new to me, so that mite be the problem.

Here is what I have.

$message = wordwrap($message,70);
$headers = "From: $from\r\n";
$headers .= "Content-type: text/html\r\n";
mail($to, $subject, $message, $headers);

I am not getting emails. What is the problem here?

Link to comment
Share on other sites

Full code below

$to = $email;
$from = "system@site.com";
$subject = "hello";
$message = '<html>
<body bgcolor="#FFFFFF">
Dear Member,
<br /><br />
hello
<br /><br />
</body>
</html>';
$message = wordwrap($message,70);
$headers = "From: $from\r\n";
$headers .= "Content-type: text/html\r\n";
mail($to, $subject, $message, $headers);

 

Link to comment
Share on other sites

Create an account or sign in to comment

You need to be a member in order to leave a comment

Create an account

Sign up for a new account in our community. It's easy!

Register a new account

Sign in

Already have an account? Sign in here.

Sign In Now
 Share

×
×
  • Create New...