1

Im trying to get imap working inside my symfony 3 project. But when im trying to run any imap related commands I get the "Attempted to call function "imap_function_here" from the global namespace." error. I'm pretty sure that I am using it correctly because if I run an completely empty php file with just:

<?php
$conn = \imap_open('imap.mailserver.com:993/imap/ssl}INBOX','mail@mailserver.com', 'password');
var_dump($conn)

It work just fine, but the exact same code inside my symfony project wil result in an error. Can anyone help me, thanks in advance.

nusje2000
  • 493
  • 9
  • 25
  • How are we supposed to help you if we don't get any context? Where does the error occur? How does your configuration for swiftmailer look? – dbrumann Apr 24 '17 at 09:37
  • the problem is that imap_open is a native php function and it work just fine when used outside symfony but when i place it anywhere inside my project it doesnt work – nusje2000 Apr 24 '17 at 09:41

1 Answers1

3

So after 3 hours of failing I restarted my server and it works. My symfony was running while I installed imap so it started without it. So thanks for the effort, but it just was a stupid mistake on my side.

nusje2000
  • 493
  • 9
  • 25