From a9bd21a5969d0fc7a9ed2f8d5df63f42122d1a59 Mon Sep 17 00:00:00 2001 From: Daniel Berteaud Date: Fri, 2 May 2014 23:42:48 +0200 Subject: [PATCH] Better spam score - Correctly encode the subject - Change subject string in en and fr locales (looks like gmail doesn't like "Join us") Should fix #10 --- lib/Vroom/I18N/en.pm | 2 +- lib/Vroom/I18N/fr.pm | 2 +- public/vroom.pl | 3 ++- 3 files changed, 4 insertions(+), 3 deletions(-) diff --git a/lib/Vroom/I18N/en.pm b/lib/Vroom/I18N/en.pm index 676ca24..dc06265 100644 --- a/lib/Vroom/I18N/en.pm +++ b/lib/Vroom/I18N/en.pm @@ -10,7 +10,7 @@ our %Lexicon = ( "ERROR_ROOM_s_LOCKED" => "The room %s is locked, you cannot join it", "ERROR_OCCURED" => "An error occured", "ERROR_NOT_LOGGED_IN" => "Sorry, your not logged in", - "JOIN_US_ON_s" => "Join us on room %s", + "JOIN_US_ON_s" => "Video conference %s", "INVITE_SENT_TO_s" => "An invitation was sent to %s", "TO_JOIN_s_CLICK_s" => "You're invited to join the video conference %s. " . "All you need is a modern web browser and a webcam. When you're ready " . diff --git a/lib/Vroom/I18N/fr.pm b/lib/Vroom/I18N/fr.pm index 59de38c..9e5ec4b 100644 --- a/lib/Vroom/I18N/fr.pm +++ b/lib/Vroom/I18N/fr.pm @@ -12,7 +12,7 @@ our %Lexicon = ( "ERROR_ROOM_s_LOCKED" => "Le salon %s est verrouillé, vous ne pouvez pas le rejoindre", "ERROR_OCCURED" => "Une erreur est survenue", "ERROR_NOT_LOGGED_IN" => "Désolé, vous n'êtes pas identifié", - "JOIN_US_ON_s" => "Rejoignez nous sur le salon %s", + "JOIN_US_ON_s" => "Vidéo conférence %s", "TO_JOIN_s_CLICK_s" => "Vous êtes invité à rejoindre le salon de vidéo conférence %s. " . "Tout ce dont vous avez besoin est un navigateur web récent et " . "une webcam. Quand vous êtes prêt, cliquez sur ce lien", diff --git a/public/vroom.pl b/public/vroom.pl index d6d8aa6..400025d 100755 --- a/public/vroom.pl +++ b/public/vroom.pl @@ -14,6 +14,7 @@ use Data::GUID qw(guid_string); use Digest::MD5 qw(md5_hex); use MIME::Base64; use Email::Sender::Transport::Sendmail; +use Encode; # Used to generate thanks on the about template our $components = { @@ -318,7 +319,7 @@ post '/action' => sub { my $rcpt = $self->param('recipient'); $self->email( header => [ - Subject => sprintf ($self->l("JOIN_US_ON_s"), $room), + Subject => encode("MIME-Header", sprintf ($self->l("JOIN_US_ON_s"), $room)), To => $rcpt ], data => [