From 8411673a282c5ad24cdc5560e5e018e3db7ea5fd Mon Sep 17 00:00:00 2001 From: davehauenstein Date: Mon, 20 Apr 2009 21:39:12 +0000 Subject: reply-to email header is now set to the user who sent the link git-svn-id: http://arc90labs-readability.googlecode.com/svn/trunk@40 d4e419ec-0920-11de-bbfd-a7c1bc4c261e --- css/readability.css | 5 +++-- email.php | 49 ++++++++++++++++++++++++++++++++--------------- images/footer-thanks.png | Bin 0 -> 6453 bytes js/readability.js | 4 ++-- log.txt | 3 +++ 5 files changed, 42 insertions(+), 19 deletions(-) create mode 100644 images/footer-thanks.png diff --git a/css/readability.css b/css/readability.css index 3c1502b..c970a29 100755 --- a/css/readability.css +++ b/css/readability.css @@ -72,6 +72,7 @@ span.version { left: 10px; } #readTools a { + overflow: hidden; margin-bottom: 8px; display: block; opacity: .4; @@ -181,8 +182,8 @@ span.version { left: 50%; margin: 0 0 0 -240px; padding: 0; - width: 480px; - height: 460px; + width: 500px; + height: 490px; border: solid 3px #666; background-color: #fff; z-index: 100 !important; diff --git a/email.php b/email.php index 4791fc1..9f7404a 100644 --- a/email.php +++ b/email.php @@ -1,5 +1,5 @@ filter($_POST['from']); + $fromName = $filters->filter($_POST['name']); + $fromName = !empty($fromName) ? $fromName : $from; $to = $filters->filter($_POST['to']); $to = array_map('trim', split(',', $to)); $note = $filters->filter($_POST['note']); @@ -72,6 +74,7 @@ { // store the from address so it's saved for future use setcookie("from", $from, time()+3600*24*7*4, "/"); + setcookie("name", $fromName, time()+3600*24*7*4, "/"); require_once 'Zend/Mail.php'; require_once 'Zend/Mail/Transport/Smtp.php'; @@ -79,7 +82,7 @@ $mailer = new Zend_Mail_Transport_Smtp('smtp.googlemail.com', Array( 'auth' => 'login', 'username' => 'readability@arc90.com', - 'password' => '*******', + 'password' => '********', 'ssl' => 'ssl', 'port' => 465, )); @@ -91,7 +94,10 @@ $body = ''; $body .= '
'; $body .= '

This page was sent to you by: '.$from.'

'; - $body .= '

Message from sender:

'.stripslashes($note).'

'; + if(!empty($note)) + { + $body .= '

Message from sender:

'.stripslashes($note).'

'; + } $body .= '

Just click this link: '.$pageTitle.'

'; $body .= '
'; $body .= '

Sent from Readability | An Arc90 lab experiment

'; @@ -100,7 +106,8 @@ $mail = new Zend_Mail(); $mail->setBodyHtml($body); - $mail->setFrom($from); + $mail->setFrom($from, $fromName); + $mail->addHeader('Reply-To', $from); foreach($to as $toAddress) { @@ -234,7 +241,7 @@ public static function hasValidParams() { - $requiredParams = array('from', 'to', 'note', 'key', 'pageTitle', 'pageUrl'); + $requiredParams = array('from', 'name', 'to', 'note', 'key', 'pageTitle', 'pageUrl'); $sentParams = array_keys($_POST); foreach($requiredParams as $required) { @@ -277,8 +284,8 @@ font-size: 14px; margin: 0; padding: 0; - width: 480px; - height: 450px; + width: 500px; + height: 490px; font-family: times, serif; background-color: #fff; } @@ -296,13 +303,13 @@ padding-right: 10px; display: block; float: left; - width: 100px; + width: 130px; text-align: right; } input, textarea{ padding: 5px; - width: 330px; + width: 320px; font-family: times, serif; font-size: 14px; border: solid 1px #999; @@ -325,7 +332,7 @@ } .helper, .details{ - margin-left: 110px; /* add label width + label padding-right */ + margin-left: 120px; /* add label width + label padding-right */ } .section{ margin-top: 15px; @@ -360,12 +367,17 @@ bottom: 10px; } #complete{ + margin-top: 120px; + text-align: center; padding: 20px; } #complete p{ margin: 0 0 10px; font-size: 16px; } + #complete img{ + margin-top: 100px; + } @@ -375,7 +387,11 @@

- + + +
+
+ />

@@ -384,7 +400,7 @@

- + />

@@ -392,7 +408,7 @@

- Seperate multiple recipients with commas. + Seperate multiple email addresses with commas.

@@ -417,11 +433,14 @@

- Thanks for using Readability! + A link to this page has been sent to

- A link to this page has been sent to + Thanks for using Readability.

+
+ Readability +
diff --git a/images/footer-thanks.png b/images/footer-thanks.png new file mode 100644 index 0000000..07de8ce Binary files /dev/null and b/images/footer-thanks.png differ diff --git a/js/readability.js b/js/readability.js index 7259ccb..b5f2347 100755 --- a/js/readability.js +++ b/js/readability.js @@ -1,5 +1,5 @@ var readabilityVersion = "0.4"; -var emailSrc = 'http://lab.arc90.com/experiments/readability/email.php'; +var emailSrc = 'http://davehauenstein.com/readabilityTest/email.php'; var iframeLoads = 0; (function(){ @@ -234,7 +234,7 @@ function emailBox() { var emailContainer = document.createElement('div'); emailContainer.setAttribute('id', 'email-container'); - emailContainer.innerHTML = ''; + emailContainer.innerHTML = ''; document.body.appendChild(emailContainer); } diff --git a/log.txt b/log.txt index e69de29..532a648 100644 --- a/log.txt +++ b/log.txt @@ -0,0 +1,3 @@ +2009-04-20 20:38:57 :: ERROR:There was an exception sending the email. [to:bens@arc90.com, from:davehauenstein@gmail.com, notes:lets build this., pageUrl: http://www.pokelondon.com/story/project-launch/mmmm-doughnuts-arduino-style-/, pageTitle: Mmmm. Doughnuts. Arduino Style. | POKE] +2009-04-20 20:38:57 :: ERROR:535-5.7.1 Username and Password not accepted. Learn more at + -- cgit v1.2.3