Closed gordyr closed 12 years ago
Hey you should be able to just include the file and use it. You just have to make sure that you are using Mail in the right scope. So for example instead of Mail::factory
you should call \Mail::factory
.
Alternatively you may be able to add use \Mail as Mail;
to the top of the file.
Great thanks Colin,
I should get a chance to play in about an hour or two and i'll close the issue once solved.
On an unrelated note I have made several improvements to the turbo.js file which most importantly for me ensures that the css is loaded and parsed prior to the fragment being shown. i'll add a pull request when I get home.
Cool thanks! My name is Craig by the way :)
Woops! Sorry I knew that... My father is Colin... I was on the phone to him while typing my reply lol. My apologies! :-P
Sorry, been so busy this week I didn't get back to you... I now have PEAR mail working absolutely fine thanks. As soon as I get a chance I will make that pull request. Crazy week! :-)
I am trying to use the pear mail package within my Sonic application.
Essentially what I need to do is the following:-
include('/usr/local/lib/php/Mail.php');
$smtp = Mail::factory('smtp', array ('host' => $host, 'auth' => true, 'username' => $username, 'password' => $password)); $mail = $smtp->send($to, $headers, $body);
How would I go about doing this from within a Sonic Controller?
Thanks