Jump to content

php email


natalieG

Recommended Posts

we tried a very simple script to email from a php script and it times out.

<?php
$to = "[email protected]";
$from = "[email protected]";
$title = "TEST";
$body = "this is a mail test";
$success = mail($to,$from,$title,$body,
"From:$from\r\nReply-To:$from");
if(success){print 'Mailok';}else {'print mailfailure';}
?>

thanks.

jennifer
Link to comment
https://forums.phpfreaks.com/topic/12024-php-email/
Share on other sites

There are too many arguments. Use:

[code]mail($to, $title, $body, "From:$from\r\nReply-To:$from");[/code]

[!--quoteo--][div class=\'quotetop\']QUOTE[/div][div class=\'quotemain\'][!--quotec--]bool mail ( string to, string subject, string message [, string additional_headers [, string additional_parameters]] )[/quote]

[a href=\"http://www.php.net/manual/en/function.mail.php\" target=\"_blank\"]http://www.php.net/manual/en/function.mail.php[/a]
Link to comment
https://forums.phpfreaks.com/topic/12024-php-email/#findComment-45734
Share on other sites

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.