htmlMimemail.php

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



Has anybody used this feature.

I am trying to get it to send a file via email.  

It shows that it has found the file, but it will not send the file to the
emails specified

$mail['admin']          = "ryan@website.com";
$mail['from']           = "webmaster@website.com";
$mail['subject']        = "Web Submission"; 
$mail['text']           = "Attached is your data, submitted on
".date("m/d/Y")."\n";

        $dir = dir($params['pdf_fldr']);
        while ($file_name = $dir->read()) {
                if (strpos($file_name, "_at_") != false) {print "match 13 ::
". $file_name ."\n";
                        $mailer = htmlMimeMail();  
                        $attach =
$mailer->getFile($params['pdf_fldr']."/".$file_name);
                        $mailer->setSubject($mail['subject']);
                        $mailer->setText($mail['text']);
                        $mailer->addAttachment($attach, $file_name,
'application/pdf');
                        $mailer->setFrom($mail['from']);
                        $result = $mailer->send(array($mail['admin'],
str_replace(array('_at_','.com'), array('@','.com'), $
                        print "\tmailed :: \n";
                        $result = ($result == 1) ? 'Mail sent!<br>' :
'Failed to send mail<br>';
                        unset($mailer);
                        if ($params['pdf_mail'] != "") {
                                $moved =
copy($params['pdf_fldr'].$file_name, $params['pdf_mail'].$file_name);
                                if ($moved != false) { print "moved
folder\n"; }
                        }
                        unlink($params['pdf_fldr'].$file_name);
                }
        }

------------

When I look at the log that is created from the from the cron it tells me
that was there and found, but it will not mail it out:

X-Powered-By: PHP/4.1.2
Content-type: text/html

match 13 :: ryan_at_hgilive.com.pdf

------------

So I am curious if anybody has played with something like this and knows
where I am going wrong. I am pretty sure that it is something that I am
going to kick myself for.

Thanks
Ryan



-- 
PHP Database Mailing List (http://www.php.net/)
To unsubscribe, visit: http://www.php.net/unsub.php


[Index of Archives]     [PHP Home]     [PHP Users]     [Postgresql Discussion]     [Kernel Newbies]     [Postgresql]     [Yosemite News]

  Powered by Linux