Results 1 to 22 of 22

Thread: Problem with contao emailer

  1. #1
    User
    Join Date
    01-03-18.
    Posts
    31

    Default Problem with contao emailer

    I have Contao 4.4 installed and all seems to be working, other than the email functionality of it. I have an email set in the main settings, but with the "Registration" module, it won't email and I tried to send a preview newsletter, but it won't send either. Is there some PHP extension that I might be missing required for this? Thanks

  2. #2
    Community-Moderator xchs's Avatar
    Join Date
    06-20-09.
    Posts
    1,287

    Default

    Did you also set an email address in the root page settings?
    Contao Community Moderator
    → Support options

  3. #3
    User
    Join Date
    01-03-18.
    Posts
    31

    Default

    Yes, that was the main settings that I was referring to.

  4. #4
    User Spooky's Avatar
    Join Date
    01-03-13.
    Posts
    339

    Default

    Have you configured a mailserver in your parameters.yml?

  5. #5
    Community-Moderator xchs's Avatar
    Join Date
    06-20-09.
    Posts
    1,287

    Default

    Quote Originally Posted by sawebdev View Post
    Yes, that was the main settings that I was referring to.
    So you've populated the following two fields with valid e-mail addresses?

    • Layout > Site structure > Root page settings > E-mail address of the website administrator
    • System > Settings > E-mail address of the system administrator
    Contao Community Moderator
    → Support options

  6. #6
    User
    Join Date
    01-03-18.
    Posts
    31

    Default

    Nope, that would probably be it, though I'm not too sure what those parameters would look like. Is there an example I could find somewhere?

  7. #7
    User
    Join Date
    01-03-18.
    Posts
    31

    Default

    Quote Originally Posted by xchs View Post
    So you've populated the following two fields with valid e-mail addresses?

    • Layout > Site structure > Root page settings > E-mail address of the website administrator
    • System > Settings > E-mail address of the system administrator
    I hadn't done the first one, but did it now and still hasn't helped. I think it's probably to do with the parameters.yml?

  8. #8
    Community-Moderator xchs's Avatar
    Join Date
    06-20-09.
    Posts
    1,287

    Default

    Quote Originally Posted by sawebdev View Post
    I hadn't done the first one, but did it now and still hasn't helped.
    Have you put there a valid e-mail address (i.e. one from the same domain)?
    Contao Community Moderator
    → Support options

  9. #9
    User
    Join Date
    01-03-18.
    Posts
    31

    Default

    I put a valid hotmail address, would that cause issues?

  10. #10
    Community-Moderator xchs's Avatar
    Join Date
    06-20-09.
    Posts
    1,287

    Default

    Probably. Yes.

    I would try using an email address from the same domain, e.g. when you access your website via example.com you should also use an email address such as foobar@example.com

    Otherwise you would have to send via an SMTP server.
    Contao Community Moderator
    → Support options

  11. #11
    User
    Join Date
    01-03-18.
    Posts
    31

    Default

    I changed it to an email address with our domain, but it still doesn't help. We are setup through Microsoft Office 365, not sure if that would cause problems.
    I tried putting some settings in the parameters.yml for the hotmail address, but that didn't help either. I also tried one from our domain that looked like this:
    mailer_transport: mail

    mailer_host: smtp.office365.com

    mailer_user: user@domain.com

    mailer_password: password

    mailer_port: 587

    mailer_encryption: TLS


    It didn't work though.

  12. #12
    Community-Moderator xchs's Avatar
    Join Date
    06-20-09.
    Posts
    1,287

    Default

    Did you clear the Symfony cache (var/cache/prod/) right after that you changed the parameters.yml?

    EDIT: Furthermore you should set the mailer transport to SMTP:
    Code:
    mailer_transport: smtp
    Last edited by xchs; 03/27/2018 at 21:19.
    Contao Community Moderator
    → Support options

  13. #13
    User
    Join Date
    01-03-18.
    Posts
    31

    Default

    In http_cache? Says there are no files... I tried, but still no success...

  14. #14
    Community-Moderator xchs's Avatar
    Join Date
    06-20-09.
    Posts
    1,287

    Default

    No, just delete the entire prod/ subfolder. But set the mailer transport to SMTP first.
    Contao Community Moderator
    → Support options

  15. #15
    User
    Join Date
    01-03-18.
    Posts
    31

    Default

    I get a 500 error when doing that.

  16. #16
    Community-Moderator xchs's Avatar
    Join Date
    06-20-09.
    Posts
    1,287

    Default

    Huh? You get an 500 server error when you delete the var/cache/prod/ subfolder via (S)FTP? That's not even possible!

    You could delete the Symfony cache also from the Contao Manager. Maybe you'd like to try it there.
    Contao Community Moderator
    → Support options

  17. #17
    User
    Join Date
    01-03-18.
    Posts
    31

    Default

    I'm remoted onto the server and deleted the prod folder... when I try to load the page, it creates the prod folder and the http_cache folder inside as well as a bundles.map... that's it... the browser gives me the 500 server error... not sure why, but okay, I'll try purging it from the Contao Manager after putting the prod stuff back, that's "Maintenance" right?
    Last edited by sawebdev; 03/27/2018 at 21:37.

  18. #18
    Community-Moderator xchs's Avatar
    Join Date
    06-20-09.
    Posts
    1,287

    Default

    Quote Originally Posted by sawebdev View Post
    I'll try purging it from the Contao Manager, that's "Maintenance" right?
    Yep.

    Maybe you get the server error because in the parameters.yml is something wrong (e.g. a syntax or formatting error)?
    Contao Community Moderator
    → Support options

  19. #19
    User
    Join Date
    01-03-18.
    Posts
    31

    Default

    Hmmm... I think you are right.
    I cleared the mail settings and the it loaded...

    mailer_transport: smtp
    mailer_host: smtp.office365.com
    mailer_user: ***@****
    mailer_password: ****
    mailer_port: 587
    mailer_encryption: TLS
    prepend_locale: false

    here's a copy and paste of my mail settings...
    If I put it to:
    mailer_transport: mail
    mailer_host: 127.0.0.1
    mailer_user: ~
    mailer_password: ~
    mailer_port: 25
    mailer_encryption: ~
    prepend_locale: false

    Then the site works also... Is there any parenthesis needed around any of the settings? What about if I have the wrong encryption? Though that's what it's supposed to be...

  20. #20
    Community-Moderator xchs's Avatar
    Join Date
    06-20-09.
    Posts
    1,287

    Default

    The app/config/parameters.yml configuration file should look like this:
    Code:
    parameters:
        mailer_transport: smtp
        mailer_host: smtp.office365.com
        mailer_user: ***@****
        mailer_password: ****
        mailer_port: 587
        mailer_encryption: tls
        prepend_locale: false
    Pay attention to the correct indentations!

    The file should be saved with UTF-8 (without BOM) encoding.
    Contao Community Moderator
    → Support options

  21. #21
    User
    Join Date
    01-03-18.
    Posts
    31

    Default

    Finally... and the problem was TLS vs tls... Thanks so much!

  22. #22
    Community-Moderator xchs's Avatar
    Join Date
    06-20-09.
    Posts
    1,287

    Default

    Quote Originally Posted by sawebdev View Post
    and the problem was TLS vs tls
    Contao Community Moderator
    → Support options

Bookmarks

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •