Mail function not sending

PHP programming forum. Ask questions or help people concerning PHP code. Don't understand a function? Need help implementing a class? Don't understand a class? Here is where to ask. Remember to do your homework!

Moderator: General Moderators

Post Reply
afbase
Forum Contributor
Posts: 113
Joined: Tue Aug 15, 2006 1:29 pm
Location: SoCAL!!!!

Mail function not sending

Post by afbase »

I'm trying to email a file to myself from my linux home server (ubuntu, edgy eft). the server has sendmail and i'm trying to use the mail function to the file so i can post my problem to another forum. I tried this php script in command line, but nothing has reached my inbox, or spam filter.

Code: Select all

<?php 
$messeage = file_get_contents("boot");
$to = "emailaddress@gmail.com";
mail($to,"test",$message);

?>
any ideas as to what is going on? the php file is placed in "/var/log". And I'm trying to email the file, "boot".
tapas_bahirbag
Forum Newbie
Posts: 14
Joined: Sun Aug 06, 2006 6:54 am
Contact:

Post by tapas_bahirbag »

Check the mail configuration.

--
Tapos Pal
User avatar
superdezign
DevNet Master
Posts: 4135
Joined: Sat Jan 20, 2007 11:06 pm

Post by superdezign »

*cough* SwiftMailer *cough*

You'll do better using SMTP.
Post Reply