February 4, 2014 at 3:54 am #3551
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!February 4, 2014 at 7:32 am #3552
Which kind of error do you get?
RegardsFebruary 4, 2014 at 7:54 am #3553
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.February 4, 2014 at 8:12 am #3554
And, 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 #3555
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.orgFebruary 4, 2014 at 8:58 am #3556
Have you tried to configure other email account?? Maybe it is a problem with your email provider.February 4, 2014 at 10:31 pm #3557
any news?? Have you made test with other email account??
RegardsFebruary 5, 2014 at 2:34 am #3558
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.
AlexFebruary 5, 2014 at 7:56 am #3559
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.
RegardsFebruary 8, 2014 at 8:48 pm #3563
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?February 8, 2014 at 9:26 pm #3564
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.phpon the command line of my server. The file looked like this:
<?php mail('firstname.lastname@example.org', '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 networkso I changed it to
internet site; mail is sent and received directly using SMTPand left all the other options as default.
I then ran
php testmail.phpagain 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 #3565
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.
RegardsFebruary 11, 2014 at 10:24 am #3584
Hi! Any news?February 11, 2014 at 7:15 pm #3585
sorry but I can’t try it on a server without a working MTA. I haven’t one.
- You must be logged in to reply to this topic.