Support › Forums › Azul – HTML Template › phpMailer not working?
- This topic has 13 replies, 2 voices, and was last updated 9 years, 10 months ago by
CreaboxThemes.
-
AuthorPosts
-
February 4, 2014 at 3:54 am #3551
Alex
ParticipantHi 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!
February 4, 2014 at 7:32 am #3552CreaboxThemes
KeymasterHi Alex,
Which kind of error do you get?
Regards
February 4, 2014 at 7:54 am #3553Alex
ParticipantThat’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.February 4, 2014 at 8:12 am #3554CreaboxThemes
KeymasterAnd, does the newsletter form work fine?? Where do you make the tests?? In your computer or in a server??
February 4, 2014 at 8:22 am #3555Alex
ParticipantI’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
February 4, 2014 at 8:58 am #3556CreaboxThemes
KeymasterHave you tried to configure other email account?? Maybe it is a problem with your email provider.
February 4, 2014 at 10:31 pm #3557CreaboxThemes
KeymasterHi Alex,
any news?? Have you made test with other email account??
Regards
February 5, 2014 at 2:34 am #3558Alex
ParticipantHi,
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
February 5, 2014 at 7:56 am #3559CreaboxThemes
KeymasterHi 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
February 8, 2014 at 8:48 pm #3563Alex
ParticipantHi 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?
February 8, 2014 at 9:26 pm #3564Alex
ParticipantHi 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 ransudo dpkg-reconfigure exim4-config
. Just as I expected, my Exim (the default MTA for Debian) was set to the default setting oflocal delivery only; not on a network
so I changed it tointernet 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?
February 9, 2014 at 7:18 am #3565CreaboxThemes
KeymasterHi 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
February 11, 2014 at 10:24 am #3584Alex
ParticipantHi! Any news?
February 11, 2014 at 7:15 pm #3585CreaboxThemes
KeymasterHi Alex,
sorry but I can’t try it on a server without a working MTA. I haven’t one.
Regards
-
AuthorPosts
- You must be logged in to reply to this topic.