Jump to content

mail() function problem


merck_delmoro

Recommended Posts

I am building a php code that sends an email but when I use mail function it is not working properly I try a simple code of mail it is not working either and also i try the codes form w3schools the tutorial of scripts I copy paste the code and try it but still not working is there any alternative ways to mail using php???

Link to comment
https://forums.phpfreaks.com/topic/181198-mail-function-problem/
Share on other sites

This is what i use. Hope it helps.

<?php
$to = 'whoever';
$subject = 'whatever';
$headers  = 'MIME-Version: 1.0' . "\r\n";
$headers .= 'Content-type: text/html; charset=iso-8859-1' . "\r\n";
$headers .= 'From: [email protected]' ;
$message = 'blah blah blah';

mail($to, $subject, $message, $headers);
?>

Archived

This topic is now archived and is closed to further replies.

×
×
  • Create New...

Important Information

We have placed cookies on your device to help make this website better. You can adjust your cookie settings, otherwise we'll assume you're okay to continue.