Support

Home Forums Event Espresso Premium Email and EE4

Email and EE4

Posted: July 17, 2015 at 6:09 am

Viewing 24 reply threads


Fatbeehive

July 17, 2015 at 6:09 am

We are having difficulty send email from EE4.

I can send succesfully from wordpress with the test email send, and can see the mails in the log from ’email log’ plugin.

To test this I tried to resend via the admin and got the error:
An error has occurred:
Something went wrong and the message for this registration was NOT resent
EED_Messages – process_resend – 570

The message setting all look correct to me.

Can you point me in the right direction?


Tony

  • Support Staff

July 17, 2015 at 9:03 am

Hi there,

Which email is being triggered?

I can see your clicking to resend the message, but what is the status of the registration itself?

This will help identify the message template to investigate.


Fatbeehive

July 17, 2015 at 9:47 am

Its a free event with the status
Registration Status : Approved


Lorenzo Orlando Caum

  • Support Staff

July 17, 2015 at 11:21 am

Hi, we appreciate you getting a head start on troubleshooting.

Are other notifications working such as registration approved message type?

Also, when you go to Event Espresso –> Messages, does your registration approved message type look like this?

http://cl.ly/image/340e3u0E1v0P


Lorenzo


Fatbeehive

July 23, 2015 at 2:41 am

Hi,

No, no other notifications are working. With a free event, the registration approved message is the only one which is going to be available anyway isn’t it?

Our registration approved message looks very similar but the ‘Primary Registrant’ is the same blue bold colour as as ‘Registrant’. Can’t see how to send you screen shots images?.

Look forward to hearing from you.

Thanks.


Tony

  • Support Staff

July 23, 2015 at 3:40 am

Our registration approved message looks very similar but the ‘Primary Registrant’ is the same blue bold colour as as ‘Registrant’.

That’s normal and shouldn’t cause issues.

Can’t see how to send you screen shots images?.

We have a guide to adding screenshots here:

https://eventespresso.com/wiki/troubleshooting-checklist/#screenshots

Are you using a transactional email service like Mandill or your hosts mail server?

If you open up each of those contexts (Event Admin, Primary Registrant, Registrant) on the right hand sand you’ll see an ‘extra actions’ section – http://take.ms/7OgIU

Input your email address and send a test email for each context, do they all work?


Fatbeehive

July 23, 2015 at 4:34 am

Hi,

We are using wp_mail and amazon SES to host our mail server.

And yes, I’ve tried the test send in extra actions and nothing comes through from there either for any of them 🙁

Thanks


Lorenzo Orlando Caum

  • Support Staff

July 23, 2015 at 7:47 am

Hi there,

Could you please create a temporary WordPress admin login so we can take a closer look at this issue?

Please share that temporary login through the secure link below:

https://eventespresso.com/send-login-details/

To prevent delays in troubleshooting, be sure to double check your information on the form before submitting.

The submit button for the form appears at the end of the form.

Again, please ensure that the temporary login works.

Thank you.


Lorenzo


Fatbeehive

July 23, 2015 at 9:20 am

I’ve sent that information through the form. Please let me know how you get on.
Thanks in advance.


Tony

  • Support Staff

July 24, 2015 at 4:56 am

Lorenzo replied via email but I just wanted to make sure you received it so adding here.

It appears the log in details we have are not working, could you recheck and re-send please.


Fatbeehive

July 27, 2015 at 3:23 am

I’ve resent the log in details using the form. I’ve made the password a little easier hopefully this time you can log in.
I tested it last time and again this time and have been able to log in.
Not sure what the issue was last time.
Look forward to your response.
Thanks.


Fatbeehive

July 27, 2015 at 10:11 am

I’ve updated the log in account to an Admin user. Sorry, I thought I’d done that already. My mistake. You should be able to log in now as an administrator.
Thanks in advance


Tony

  • Support Staff

July 27, 2015 at 1:11 pm

I don’t receive any emails when registering or sending test emails from within the templates.

The emails are being triggered as they show in the log email plugin you have running, I suspect this is an issue with either WP-Mail-SMTP or the mail server itself preventing the emails.

Event Espresso uses wp_mail() to send the emails, the same as the test emails from WP although EE emails are HTML emails which sometimes trigger some rules within the mail server that set the email as spam.

Do you have access to the mail server logs to see if it is rejecting the emails?

Can you test sending the emails with

1. The email logging server disabled.
2. WP-Mail-SMTP disabled (be sure to save your details before disabling)

We need to try and narrow this down to find the cause.


Fatbeehive

August 4, 2015 at 7:10 am

Further testing:
WP test email send works
Gravity forms mail send ok (html email)

There is no direct mail transport on the server, everything is sent via Amazon SES.
SES does require from address to be validated before it will allow sending. We did try setting the from address to a known address, but this did not help.
We can restore the mail settings if they need to be ‘broken’ to resolve the issue.
If you need anything else from us, please let us know. Or if you need a valid email address for SES we could send that to you privately.

Thank


Josh

  • Support Staff

August 5, 2015 at 10:30 am

Does Amazon SES’s mail server have a log that you can check for errors when an Event Espresso message is triggered?


Fatbeehive

August 11, 2015 at 2:58 am

No unfortunately not.

Is there a point in the Event Espresso code where I could put some debug code to view exactly what is happening when the email is triggered?

I could perhaps dump the email code to the screen and see exactly what is being sent through?


Tony

  • Support Staff

August 11, 2015 at 9:12 am

Hi there,

Can you install the Check Email plugin and send a test email from that (do not use the test email feature within the SMTP plugin)

Does it show the correct email set within the SMTP plugin as the ‘From’ email, or does it show another email address? (Possibly the one set within Dashboard -> Settings)

If you check the emails from GF, do they show the from email address as the one set within the SMTP setting or general settings?


Fatbeehive

August 11, 2015 at 10:41 am

Thank Tony – this has shed some light.
I did some debugging within that plugin and have found the as soon as it modified the email headers it prevented sending.

I removed the header argument from the wp_mail method and the email sent fine.


Tony

  • Support Staff

August 11, 2015 at 11:40 am

I removed the header argument from the wp_mail method and the email sent fine.

Is this within EE? If so what did you modify?

I’m wondering if we need a filter so that this can be modified without modifying core.


Fatbeehive

August 12, 2015 at 3:58 am

Hi Tony – no this was within the check email plugin.

I did some testing directly with the EE mail sending function this morning and it seems as soon as the header MIME-Version: 1.0 is used it causes problems.

I replaced $this->_headers() with array(‘Reply-To:somevalidemail@fatbeehive.com’, ‘From:somevalidemail@fatbeehive.com’, ‘Content-Type:text/html; charset=utf-8’) in the EE EE_Email_messenger.class.php at ln 355. The emails are now sending the only part of the header I removed was the MIME-Version.

From the wp_mail docs:

The function will figure it out and will build the proper Mime header automagically

So I wonder if this is causing the issue?

The issue seems fixed now – but obviously if I update the plugin this change will be overwritten.


Tony

  • Support Staff

August 12, 2015 at 7:29 am

If you leave the To and From fields to use the variables, does it still work?

Like this:

$headers = array(
	'From:' . $from,
	'Reply-To:' . $from,
	'Content-Type:text/html; charset=utf-8'
	);

The function will figure it out and will build the proper Mime header automagically

I checked with the developers on this, that just means that however you pass the $headers (string or array) wp_mail will figure out the correct formatting and build the headers, you still need to set a MIME version.

Also if you switch to a different mail logging plugin such as WP Mail Logging you can see the headers from within the log.


Fatbeehive

August 12, 2015 at 8:10 am

Yes it works with variables as long as the MIME is omitted.


protected function _send_message() {
		$headers = array(
			'From:' . $this->_from,
			'Reply-To:' . $this->_from,
			'Content-Type:text/html; charset=utf-8'
		);
		return wp_mail(
			html_entity_decode( $this->_to, ENT_QUOTES, "UTF-8" ),
			stripslashes( html_entity_decode( $this->_subject, ENT_QUOTES, "UTF-8" )),
			$this->_body(),
			$headers
		);
	}


Tony

  • Support Staff

August 12, 2015 at 8:39 am

Ok, so what we suspect is happening here is another plugin is simply adding the MIME type the wp_mail() calls. So EE adds the MIME type, then something else is filtering wp_mail and adding the MIME type again which is causing SES to return the email as its then invalid.

Removing this the MIME from EE ‘fixes’ this because whatever else is adding it, then adds it to the messages and as its then only happening once, works as expected.

Try disabling the email plugins email check, email logging, anything else that could filter wp_mail and see if the issue remains.

Try another SMTP plugin, enter the details for SES into that plugin and see if the issue remains.

Unfortunately we can not remove setting the MIME type from the messaging system as it is required for the emails to work correctly. EE is using wp_mail correctly, it appears something else is not.


Fatbeehive

August 26, 2015 at 5:05 am

Great thanks – switching to postman smtp helped.
A separate issue has come up now.

If the user enters an alternate email for invoice – this does not seem to send. Any idea’s here?


Tony

  • Support Staff

August 26, 2015 at 5:12 am

Currently EE4 does not include this by default.

How are you collecting and using the alternate email?

Viewing 24 reply threads

The support post ‘Email and EE4’ is closed to new replies.

Have a question about this support post? Create a new support post in our support forums and include a link to this existing support post so we can help you.

Event Espresso