Extension

Developer
Supported

Escort

ExpressionEngine 2, ExpressionEngine 3, ExpressionEngine 4

Back to this add-on's main page
View Other Add-ons From Derek Hogue

     

You must be logged in to post.

Sending via Mailgun

Support (Resolved)

ricknew
ricknew

Hello,

I’ve setup Mailgun and emails sent via the admin email form are correctly sent via Mailgun.

However, when testing from the website, I’m getting an error:

mail(): Failed to connect to mailserver at “localhost” port 25, verify your “SMTP” and “smtp_port” setting in php.ini or use ini_set()
ee/legacy/libraries/Email.php, line 1651

I’m using the eeContact form to try and send from a template:

{exp:email:contact_form user_recipients="no" recipients="ricknew@untye.com" charset="utf-8"}
        
<h2>Support Form</h2>
        <
p>
                <
label for="from">Your Email:</label><br />
                <
input type="text" id="from" name="from" size="40" maxlength="35" value="ricknew@untye.com" />
        </
p>
        <
p>
                <
label for="subject">Subject:</label><br />
                <
input type="text" id="subject" name="subject" size="40" value="Contact Form" />
        </
p>
        <
p>
                <
label for="message">Message:</label><br />
                <
textarea id="message" name="message" rows="18" cols="40">
                        
Support Email from{member_name}
                        Sent at
:  {current_time format="%Y %m %d"}
                
</textarea>
        </
p>
        <
p>
                <
input name="submit" type='submit' value='Submit Form' />
        </
p>
{/exp:email:contact_form} 

Thanks for any help.

Rick

 

 

 

Derek Hogue
# 1
Developer
Derek Hogue

Hmm, it would appear as though the sending via Escort is failing, then falling back to your native EE email method, which is not configured correctly. The question is why it’s working via the Communicate tab and not the contact form. Are you sure you didn’t change any settings in-between? If you look in the developer logs in EE do you see message from Escort there?

ricknew
# 2
ricknew

Yes, there are logs for each failure “Escort tried to deliver your email with mailgun but the service failed.”

ricknew
# 3
ricknew

Due to the message, I didn’t think the service made it to Mailgun, but now I see errors in Mailgun logs. I’ll check in with them, then get back if I need further assistance.

Derek Hogue
# 4
Developer
Derek Hogue

I was just going to suggest checking your Mailgun logs for error messages, that may clue you in to what’s going wrong.

ricknew
# 5
ricknew

Yep, thanks.

Looks like I had the “Free” plan vs the “Concept” plan which handles recipients differently. There still isn’t a charge for the Concept plan, but they want the credit card on file in case you go over the plan limit.

ricknew
# 6
ricknew

All working fine now.

Derek Hogue
# 7
Developer
Derek Hogue

Excellent!