Jump to content

Tracking down form/email bug


Peter Knight
 Share

Recommended Posts

Hi guys

Don't know where to start with this as there are a lot of connected parts. Can anyone suggest a starting place?

I have a development domain in Plesk (DNS is not pointing at domain yet and I have a temp URL)

  • FormBuilder 0.2.5 is installed
  • PW 3.0.10 is installed
  • WireMail MailGun is installed

When I submit a form, I get a success message and the results are logged in FormBuilder's entries dashboard.

I never receive an email to my mailbox even though I have an email address specified

Additionally, MailGun dashboard never shows that anything in the logs

I thought it might be because my domain isn't verified in MailGun and I have yet to make any DNS changes but I don't think this is the issue as

  1. They provide sandbox details for testing
  2. I have never verified any of my domains - at least when I was using MandarillApp and WireMailSMTP

Error logs show no problems.

Any idea where to start?

Thanks

P

Link to comment
Share on other sites

One of the quickest troubleshooting techniques you can now do is to use MaindrillApp or Wire Mail SMTP (i.e. use what you know works first) and see if you still have these problems.  If you don't have problems, it means you need to concentrate on your Mailgun interface or configuration processes. 

Link to comment
Share on other sites

Hi Peter

I can share with you my Mailgun journey....

I have:

FormBuilder

PW 3 latest dev

Mailgun account

Horst's wonderful WireMailSmtp module

As you say mate, lots of moving static parts  :biggrin:

What stumped me was that I too was not getting any mails sent.

Now I develop sites locally in MAMP and for some reason, the "sending of emails" did not work when I tried to get ProcessWire to send an email out from within my development environment.

What I ended up doing was uploading the site to a live server and once I did that, mails were sent instantly! I am not sure what exactly causes the MAMP environment to have trouble sending things out Peter, but that just tells me maybe you should not trust your development environments settings to be able to send out emails.

Try a live server Peter. The parts you have do work, as I have gotten them to wok and I'm just a dummy ( but a persistent one )

Hope that helps!

For others that are looking into this in the future.. those of you that are using Digital Ocean, so much of the documentation for Digital Ocean and Mailgun focuses on using your existing DNS settings for your domain but adding records into it for a Mailgun subdomain. This approach really caused me lots of headaches so here is how I got it all working...

My domain name is www.mysite.com. Let's use this as a base.

First thing in Digital Ocean is to create a brand new domain to create a subdomain. This is not commonly mentioned in Digital Oceans docs or all the Digital Ocean - Mailgun tutorials out there. So, I have departed from everyone else by NOT touching my main website's ( www.mysite.com ) records.

So I created a brand new domain called mail.mysite.com. The "mail" bit is my chosen subdomain. But as I said, I created a brand new domain to create that desired subdomain.

Now, in Mailgun, I created an account with the domain mail.mysite.com to match the new domain I created in Digital Ocean. When you create the account in Mailgun, you will get two text values and one cname value. Head over to Digital Ocean and for your domain entry ( mine being the mail.mysite.com domain entry ), we edit the DNS entries and add the two text records and add a single cname record.

Go back to Mailgun and hit the Check DNS Records Now button and the 3 entries mentioned earlier should light up green. Sometimes we may need to press the button two or three times :)

Next in Mailgun go to Manage SMTP credentials and create a new user. Take note of this and the password it generates.

We take these to our site and punch them into Horst's WireMail user credentials along with setting the Port to 587 and the SMTP hostname to be smtp.mailgun.org. There is also the local hostname field and I set that to www.mysite.com.

After doing all this, it works great!

Just a side note. What I have done is used a nice paid email service called FastMail. And so how I have set things up is I edit my main site's DNS records ( www.mysite.com ) and add two text records pointing to FastMail. 

So.... my domain mail.mysite.com sends out mails via Mailgun and by configuring things in WireMailSmtp I have set the sender address for these emails as: admin@mysite.com

Should someone reply to one of these emails, then Fastmail picks that up via mysite.com's records and routes it to my email client. They have a really nice iOS app for business accounts by the way. And what is not apparent from signup is that you can pay for 6 months first. 

Apologies if the above helps no one and or contains lots of errors!

  • Like 3
Link to comment
Share on other sites

Hi guys

Thanks for the tips. I'm thinking this might actually be a VPS config problem. I duplicated a working site from another server and emails from forms stopped working.

The support guys are making sense of the mail logs now and can hopefully shed some light on it.

Link to comment
Share on other sites

Create an account or sign in to comment

You need to be a member in order to leave a comment

Create an account

Sign up for a new account in our community. It's easy!

Register a new account

Sign in

Already have an account? Sign in here.

Sign In Now
 Share

  • Recently Browsing   0 members

    • No registered users viewing this page.
×
×
  • Create New...