phpMailer not working?

Support Forums Azul – HTML Template phpMailer not working?

Viewing 14 posts - 1 through 14 (of 14 total)
  • Author
    Posts
  • #3551
    Alex
    Participant

    Hi there! Thanks for the excellent theme, I’m really enjoying it. For some reason, phpMailer doesn’t seem to be working…I know I have PHP installed, and I double-checked my smtp settings. Is there any way of testing or troubleshooting this? I’d really like the web contact form to work properly. Thanks for your help!

    #3552
    CreaboxThemes
    Keymaster

    Hi Alex,

    Which kind of error do you get?

    Regards

    #3553
    Alex
    Participant

    That’s the problem – I don’t get an error message. I see the green Your message has been sent. Thank you! message but then the email disappears into the ether, never reaching my inbox.

    #3554
    CreaboxThemes
    Keymaster

    And, does the newsletter form work fine?? Where do you make the tests?? In your computer or in a server??

    #3555
    Alex
    Participant

    I’m not using the newsletter functionality, because I don’t have a newsletter. The site is currently in production on my web server at http://www.alexryan.org

    #3556
    CreaboxThemes
    Keymaster

    Have you tried to configure other email account?? Maybe it is a problem with your email provider.

    #3557
    CreaboxThemes
    Keymaster

    Hi Alex,

    any news?? Have you made test with other email account??

    Regards

    #3558
    Alex
    Participant

    Hi,

    I have now tested it with the config set to send from a different email account, and to send to a different email account (and both). Still no signs of anything happening at all. It’s like I click the button, see the green confirmation message, and nothing happens.

    Alex

    #3559
    CreaboxThemes
    Keymaster

    Hi Alex,

    I don’t know what happen. Can you use the newsletter form to check it?? I know that you don’t want the newsletter section, but it would be helpful to check if the newsletter form works fine. The contact form uses phpmailer and the newsletter form doesn’t use it. If the newsletter form arrives, I can change the contact form code to send the email like the newsletter.

    Regards

    #3563
    Alex
    Participant

    Hi there. Sorry about the delay, I’ve been really busy these last few days. I re-enabled the newsletter section, changed sendmail.php to send to my email address, and still nothing. I get the green confirmation text but the email never shows up.

    What can I do from here to troubleshoot?

    #3564
    Alex
    Participant

    Hi there. I’m glad to report that I got this working. It was pretty complicated so bear with me. You’re probably going to want to update your documentation.

    First, I wrote a file called testmail.php and manually executed it by running php testmail.php on the command line of my server. The file looked like this:

    <?php
    mail('myemailaddress@gmail.com', 'My Subject', "Line 1\r\nLine 2");
    ?>

    Then, when I didn’t get anything, I checked /var/mail on my server. I noticed that my www-data user (I’m running Apache on Debian) had unread mail! It was a bunch of undeliverable notices for all the messages I had been trying to send. Each of them had the same error message: Mailing to remote domains not supported. After Googling that error message, I ran sudo dpkg-reconfigure exim4-config. Just as I expected, my Exim (the default MTA for Debian) was set to the default setting of local delivery only; not on a network so I changed it to internet site; mail is sent and received directly using SMTP and left all the other options as default.

    I then ran php testmail.php again and the email showed up in my inbox right away. I then tried the Newsletter and Contact pages on my website and they worked too! Which is all good news.

    The question I have, though, is why do I need a working sendmail on my server? In this case your code for the contact form is clearly not actually connecting to an external SMTP server and sending through there like it’s supposed to, but rather sending directly from my webserver (headers on received messages verify this). Have you tried this on a server without a working MTA and/or checked the headers of received messages to make sure it’s actually sending through the third-party server?

    #3565
    CreaboxThemes
    Keymaster

    Hi Alex,

    I’m glad to theme works fine. I haven’t tried it on a server without a working MTA. I’ll make tests and check the headers.

    Thank you very much for the information.

    Regards

    #3584
    Alex
    Participant

    Hi! Any news?

    #3585
    CreaboxThemes
    Keymaster

    Hi Alex,

    sorry but I can’t try it on a server without a working MTA. I haven’t one.

    Regards

Viewing 14 posts - 1 through 14 (of 14 total)
  • You must be logged in to reply to this topic.