Belfunk Posted October 12, 2007 Share Posted October 12, 2007 Hello, I am using Pear and its mime package to send an email with an attachment. The email sends properly but the attachment does not. I added a error function to see what the problem is and it says: File is not readable /root/Desktop/sample.txt A snippet of my code for it is: $mime = new Mail_mime($crlf); $crlf = "\r\n"; $status = $mime->addAttachment("/root/Desktop/sample.txt", "text/plain"); $mail = $smtp->send($to, $hdrs, $body); I have defined $to and $hdrs. I have set the permissions to 777. I dont know what the problem is. Any ideas? It will be much apperciated! Also, is this the easiest way to send attachments? All I need to do is just send one attachment to one email address. Thanks! Link to comment https://forums.phpfreaks.com/topic/72941-sending-attachments-via-a-php-email-script/ Share on other sites More sharing options...
Belfunk Posted October 13, 2007 Author Share Posted October 13, 2007 bump Link to comment https://forums.phpfreaks.com/topic/72941-sending-attachments-via-a-php-email-script/#findComment-368367 Share on other sites More sharing options...
Recommended Posts
Archived
This topic is now archived and is closed to further replies.