Hi guys,
So, I know how to use SendGrid 100% so I was thinking about creating an extension and, if it’s good, upload it here. The thing is I’m having some STUPID difficulties.
I’m creating an App component (with IApplicationComponent). I have not idea why but, it’s throwing me some include errors
include(Swift_DependencyContainer.php): failed to open stream: No such file or directory
So, this is what I did:
I download the sendgrid-php file form Sendgrid which, basically, has everything to use Sendgrid with the Web API and/or with SMTP. I put the folder inside the components folder and to let Yii know where to look I add this
'import'=>array(
...
'application.components.sendgrid-php.*',
...
),
Thanks to that Yii can find my Component Class. Everything great so far, I put the command to send an email at the actionIndex of the website to test it and it throws this error:
include(Swift_DependencyContainer.php): failed to open stream: No such file or directory
This is KILLING me. I know this happens in the
\sendgrid-php\lib\swift\dependency_maps\cache_deps.php(3)
file in the line that says
Swift_DependencyContainer::getInstance()
but, I have no idea why.
Is there something I need to import. I can find the sense on it since if I just test in my local machine with a testfile(without any Yii project ) it works fine and I can send emails.
PLEASE HELP ME!
Thanks haha
EDIT:
Ha! lol Yii is trying to include a file called “Swift_DependencyContainer.php” and of course it can’t include it because it doesn’t exists! the file is name “DependencyContainer.php” without the swift at first. I have no idea why Yii is putting the Swift_ at first ! ANY IDEAS ?