CiviCRM Community Forums (archive)

*

News:

Have a question about CiviCRM?
Get it answered quickly at the new
CiviCRM Stack Exchange Q+A site

This forum was archived on 25 November 2017. Learn more.
How to get involved.
What to do if you think you've found a bug.



  • CiviCRM Community Forums (archive) »
  • Old sections (read-only, deprecated) »
  • Support »
  • Using CiviCRM »
  • Using CiviEvent (Moderator: Yashodha Chaku) »
  • Event registration confirmation email: validation fails with accent in From name
Pages: [1]

Author Topic: Event registration confirmation email: validation fails with accent in From name  (Read 5780 times)

davej

  • Ask me questions
  • ****
  • Posts: 404
  • Karma: 21
Event registration confirmation email: validation fails with accent in From name
June 11, 2009, 05:14:56 am
Steps to replicate:

(1) Create an event, non-pay, no friends etc but with registration page.
(2) In registration page, set Confirm From Name to a name containing an accented character: my example had the surname Troussé.
(3) Register for the event.
 => error:
Code: [Select]
An error occurred when CiviCRM attempted to send an email (via SMTP). If you received this error after submitting on online contribution or event registration - the transaction was completed, but we were unable to send the email receipt.

The mail library returned the following error message:
Validation failed for: =?utf-8?Q?"Fred=20Trouss=C3=A9"=20?=

This is probably related to a problem in your Outbound Email Settings (Administer CiviCRM » Global Settings » Outbound Email), OR the FROM email address specifically configured for your contribution page or event. Possible causes are:
Your SMTP Username or Password are incorrect.
Your SMTP Server (machine) name is incorrect.
You need to use a Port other than the default port 25 in your environment.
Your SMTP server is just not responding right now (it is down for some reason).
The FROM Email Address configured for this feature may not be a valid sender based on your email service provider rules.

Check this page for more information.

Works fine without the accented character.

Some discussion here of a similar problem, which was solved by judicious quoting: http://osticket.com/forums/archive/index.php/t-677.html

Occurred on 2.1.6, 2.2.2 and 2.2.5 but couldn't replicate on demo.

Dave J

Piotr Szotkowski

  • I live on this forum
  • *****
  • Posts: 1497
  • Karma: 57
Re: Event registration confirmation email: validation fails with accent in From name
June 11, 2009, 04:13:22 pm
Thanks for the pointer: the error is apparently because at some point an (over-zealous?) validator doesn’t accept the encoded From: =?utf-8?Q?"Fred=20Trouss=C3=A9"=20?= <…> header. I’ll verify whether the validation happens on the CiviCRM side or after SMTP, and either fix the validation or make CiviCRM form a less problematic header for non-ASCII senders.
If you found the above helpful, please consider helping us in return – you can even steer CiviCRM’s future and help us extend CiviCRM in ways useful to you.

Piotr Szotkowski

  • I live on this forum
  • *****
  • Posts: 1497
  • Karma: 57
Re: Event registration confirmation email: validation fails with accent in From name
June 12, 2009, 05:27:12 am
I filed CRM-4631 to track this issue.
If you found the above helpful, please consider helping us in return – you can even steer CiviCRM’s future and help us extend CiviCRM in ways useful to you.

Piotr Szotkowski

  • I live on this forum
  • *****
  • Posts: 1497
  • Karma: 57
Re: Event registration confirmation email: validation fails with accent in From name
June 17, 2009, 05:04:22 pm
Dave, can you please either test the attached patch or overwrite your CRM/Event/BAO/Event.php with the one from our repository to see whether I managed to fix this?
If you found the above helpful, please consider helping us in return – you can even steer CiviCRM’s future and help us extend CiviCRM in ways useful to you.

davej

  • Ask me questions
  • ****
  • Posts: 404
  • Karma: 21
Re: Event registration confirmation email: validation fails with accent in From name
June 29, 2009, 10:56:57 am
Quote from: Piotr Szotkowski on June 17, 2009, 05:04:22 pm
Dave, can you please either test the attached patch or overwrite your CRM/Event/BAO/Event.php with the one from our repository to see whether I managed to fix this?

Sorry to be slow. Tested and working with unpatched Civi 2.2.6 Drupal PHP5 21955 which has your fix in CRM/Event/BAO/Event.php - good work!

Thanks,

Dave J

davej

  • Ask me questions
  • ****
  • Posts: 404
  • Karma: 21
Re: Event registration confirmation email: validation fails with accent in From name
December 01, 2009, 10:29:32 am
Found that the same problem occurs with CiviMail: see http://issues.civicrm.org/jira/browse/CRM-5466. Cross-referencing here to help people find the issue.

Dave J

Piotr Szotkowski

  • I live on this forum
  • *****
  • Posts: 1497
  • Karma: 57
Re: Event registration confirmation email: validation fails with accent in From name
December 02, 2009, 12:30:22 am
Thanks, fixed on the 3.0 branch in r25329 and r25330, will be a part of CiviCRM 3.0.3.
If you found the above helpful, please consider helping us in return – you can even steer CiviCRM’s future and help us extend CiviCRM in ways useful to you.

davej

  • Ask me questions
  • ****
  • Posts: 404
  • Karma: 21
Re: Event registration confirmation email: validation fails with accent in From name
December 02, 2009, 02:51:54 am
Thanks Piotr!

Tested and working, comment added to issue http://issues.civicrm.org/jira/browse/CRM-5466 - maybe useful to record the comment here too, as it may help others to track down similar issues...

----8<----
The way this problem originally presented was that when the user sent a mailing, it appeared to have worked, there was no error message but he found that the recipients had been changed to On Hold. When I tried to send a test mail, again there was no error message and I got the message:

"Your test message has been sent. Click 'Next' when you are ready to Schedule or Send your live mailing (you will still have a chance to confirm or cancel sending this mailing on the next page)."

But no message was sent, nothing was logged to CiviCRM.log, apache log or our mail log. Eventually I found that commenting out line 338 of CRM/Mailing/BAO/Job.php:
            CRM_Core_Error::ignoreException( );
allowed an error message to be produced so that I could track down the problem.

I guess this is a subsidiary bug report about error handling...
Desired behaviour: mailing halts with informative message to user and details in CiviCRM.log .
Actual behaviour: mailing silently fails, appears to user to have succeeded, nothing in logs, recipients set to On Hold.

However if this error condition only arises in the case that Piotr has just fixed, then we don't need to worry.
----8<----

Cheers,

Dave J

Piotr Szotkowski

  • I live on this forum
  • *****
  • Posts: 1497
  • Karma: 57
Re: Event registration confirmation email: validation fails with accent in From name
December 04, 2009, 04:56:28 am
Thanks, Dave, these are good ideas. I filed CRM-5489 to keep track on this.
If you found the above helpful, please consider helping us in return – you can even steer CiviCRM’s future and help us extend CiviCRM in ways useful to you.

Pages: [1]
  • CiviCRM Community Forums (archive) »
  • Old sections (read-only, deprecated) »
  • Support »
  • Using CiviCRM »
  • Using CiviEvent (Moderator: Yashodha Chaku) »
  • Event registration confirmation email: validation fails with accent in From name

This forum was archived on 2017-11-26.