0

Hi I am trying to read email from Gmail account in PHP Bluemix by using this example - Send email using the GMail SMTP server from a PHP page .

but I have a problem at this line:

require_once "Mail.php";

How do I enable this extension of PHP in Bluemix?

Here is the error code I got:

AH01071: Got error 'PHP message: PHP Warning: require_once(Mail.php): failed to open stream: No such file or directory in /home/vcap/app/htdocs/gmailsend.php on line 5\nPHP message: PHP Fatal error: require_once(): Failed opening required 'Mail.php' (include_path='../lib/php:/home/vcap/app/lib') in /home/vcap/app/htdocs/gmailsend.php on line 5\n', referer: phpsendgrid2.mybluemix.net

Community
  • 1
  • 1
  • I assume you're receiving an error? What is the error? – Brad Kent Jul 25 '16 at 19:44
  • 2
    that's not an "extension". php extensions are compiled code as a .dll or .so file. that's just a php script. – Marc B Jul 25 '16 at 19:44
  • The example you linked relies on the pear mail package. You can get it [here](https://pear.php.net/package/Mail/download), but I don't know anything about installing pear packages in bluemix. That question is pretty old, though. I would recommend looking at one of the newer answers on it that talk about using swift mailer instead. – Don't Panic Jul 25 '16 at 19:57
  • thanks for your comments. here is the error message I got: AH01071: Got error 'PHP message: PHP Warning: require_once(Mail.php): failed to open stream: No such file or directory in /home/vcap/app/htdocs/gmailsend.php on line 5\nPHP message: PHP Fatal error: require_once(): Failed opening required 'Mail.php' (include_path='../lib/php:/home/vcap/app/lib') in /home/vcap/app/htdocs/gmailsend.php on line 5\n', referer: http://phpsendgrid2.mybluemix.net/ – jpaustralia Jul 26 '16 at 10:41

0 Answers0