mailhopper 0.1.0 → 0.1.1

Sign up to get free protection for your applications and to get access to all the features.
@@ -17,8 +17,14 @@ module Mailhopper
17
17
 
18
18
  private
19
19
 
20
- def address_to_s(field)
21
- field.join(',') if field && !field.empty?
22
- end
20
+ def address_to_s(field)
21
+ if field
22
+ if field.is_a?(Array)
23
+ field.join(',') unless field.empty?
24
+ else
25
+ field
26
+ end
27
+ end
28
+ end
23
29
  end
24
30
  end
@@ -1,3 +1,3 @@
1
1
  module Mailhopper
2
- VERSION = "0.1.0"
2
+ VERSION = "0.1.1"
3
3
  end
@@ -159,3 +159,473 @@ Papaya
159
159
   (0.1ms) SELECT COUNT(*) FROM "emails"
160
160
  Mailhopper::Email Load (0.2ms) SELECT "emails".* FROM "emails" ORDER BY created_at DESC LIMIT 1
161
161
   (0.6ms) rollback transaction
162
+  (0.4ms) begin transaction
163
+  (0.1ms) rollback transaction
164
+  (0.0ms) begin transaction
165
+  (0.1ms) SELECT COUNT(*) FROM "emails"
166
+ Rendered sample_mailer/hello.text.erb (2.1ms)
167
+  (0.1ms) SAVEPOINT active_record_1
168
+ SQL (60.8ms) INSERT INTO "emails" ("bcc_address", "cc_address", "content", "created_at", "from_address", "reply_to_address", "sent_at", "subject", "to_address", "updated_at") VALUES (?, ?, ?, ?, ?, ?, ?, ?, ?, ?) [["bcc_address", "bcc@example.com"], ["cc_address", "cc@example.com"], ["content", "Date: Mon, 07 May 2012 15:06:20 -0400\r\nFrom: from@example.com\r\nReply-To: reply_to@example.com\r\nTo: to@example.com\r\nCc: cc@example.com\r\nMessage-ID: <4fa81d2cd1298_10f253fce3cc34cdc447cb@dgmpro.local.mail>\r\nSubject: Hiya!\r\nMime-Version: 1.0\r\nContent-Type: text/plain;\r\n charset=UTF-8\r\nContent-Transfer-Encoding: 7bit\r\n\r\nPapaya"], ["created_at", Mon, 07 May 2012 19:06:20 UTC +00:00], ["from_address", "from@example.com"], ["reply_to_address", "reply_to@example.com"], ["sent_at", nil], ["subject", "Hiya!"], ["to_address", "to@example.com"], ["updated_at", Mon, 07 May 2012 19:06:20 UTC +00:00]]
169
+  (0.0ms) RELEASE SAVEPOINT active_record_1
170
+
171
+ Sent mail to to@example.com (82ms)
172
+ Date: Mon, 07 May 2012 15:06:20 -0400
173
+ From: from@example.com
174
+ Reply-To: reply_to@example.com
175
+ To: to@example.com
176
+ Cc: cc@example.com
177
+ Message-ID: <4fa81d2cd1298_10f253fce3cc34cdc447cb@dgmpro.local.mail>
178
+ Subject: Hiya!
179
+ Mime-Version: 1.0
180
+ Content-Type: text/plain;
181
+ charset=UTF-8
182
+ Content-Transfer-Encoding: 7bit
183
+
184
+ Papaya
185
+  (0.1ms) SELECT COUNT(*) FROM "emails"
186
+ Mailhopper::Email Load (0.2ms) SELECT "emails".* FROM "emails" ORDER BY created_at DESC LIMIT 1
187
+  (0.4ms) rollback transaction
188
+  (0.1ms) begin transaction
189
+  (0.1ms) SELECT COUNT(*) FROM "emails"
190
+ Rendered sample_mailer/hello.text.erb (0.1ms)
191
+  (0.1ms) SAVEPOINT active_record_1
192
+ SQL (0.5ms) INSERT INTO "emails" ("bcc_address", "cc_address", "content", "created_at", "from_address", "reply_to_address", "sent_at", "subject", "to_address", "updated_at") VALUES (?, ?, ?, ?, ?, ?, ?, ?, ?, ?) [["bcc_address", "bcc1@example.com,bcc2@example.com"], ["cc_address", "cc1@example.com,cc2@example.com"], ["content", "Date: Mon, 07 May 2012 15:06:20 -0400\r\nFrom: from1@example.com\r\nReply-To: reply_to@example.com\r\nTo: to1@example.com, \r\n to2@example.com\r\nCc: cc1@example.com, \r\n cc2@example.com\r\nMessage-ID: <4fa81d2cee47a_10f253fce3cc34cdc4487f@dgmpro.local.mail>\r\nSubject: Hiya!\r\nMime-Version: 1.0\r\nContent-Type: text/plain;\r\n charset=UTF-8\r\nContent-Transfer-Encoding: 7bit\r\n\r\nPapaya"], ["created_at", Mon, 07 May 2012 19:06:20 UTC +00:00], ["from_address", "from1@example.com"], ["reply_to_address", "reply_to@example.com"], ["sent_at", nil], ["subject", "Hiya!"], ["to_address", "to1@example.com,to2@example.com"], ["updated_at", Mon, 07 May 2012 19:06:20 UTC +00:00]]
193
+  (0.0ms) RELEASE SAVEPOINT active_record_1
194
+
195
+ Sent mail to to1@example.com, to2@example.com (13ms)
196
+ Date: Mon, 07 May 2012 15:06:20 -0400
197
+ From: from1@example.com
198
+ Reply-To: reply_to@example.com
199
+ To: to1@example.com,
200
+ to2@example.com
201
+ Cc: cc1@example.com,
202
+ cc2@example.com
203
+ Message-ID: <4fa81d2cee47a_10f253fce3cc34cdc4487f@dgmpro.local.mail>
204
+ Subject: Hiya!
205
+ Mime-Version: 1.0
206
+ Content-Type: text/plain;
207
+ charset=UTF-8
208
+ Content-Transfer-Encoding: 7bit
209
+
210
+ Papaya
211
+  (0.1ms) SELECT COUNT(*) FROM "emails"
212
+ Mailhopper::Email Load (0.2ms) SELECT "emails".* FROM "emails" ORDER BY created_at DESC LIMIT 1
213
+  (0.5ms) rollback transaction
214
+  (0.0ms) begin transaction
215
+  (0.1ms) SELECT COUNT(*) FROM "emails"
216
+ Rendered sample_mailer/hello.text.erb (0.1ms)
217
+  (0.0ms) SAVEPOINT active_record_1
218
+ SQL (0.5ms) INSERT INTO "emails" ("bcc_address", "cc_address", "content", "created_at", "from_address", "reply_to_address", "sent_at", "subject", "to_address", "updated_at") VALUES (?, ?, ?, ?, ?, ?, ?, ?, ?, ?) [["bcc_address", nil], ["cc_address", nil], ["content", "Date: Mon, 07 May 2012 15:06:20 -0400\r\nFrom: from@example.com\r\nTo: to@example.com\r\nMessage-ID: <4fa81d2cf314a_10f253fce3cc34cdc4494a@dgmpro.local.mail>\r\nSubject: Hiya!\r\nMime-Version: 1.0\r\nContent-Type: text/plain;\r\n charset=UTF-8\r\nContent-Transfer-Encoding: 7bit\r\n\r\nPapaya"], ["created_at", Mon, 07 May 2012 19:06:21 UTC +00:00], ["from_address", "from@example.com"], ["reply_to_address", nil], ["sent_at", nil], ["subject", "Hiya!"], ["to_address", "to@example.com"], ["updated_at", Mon, 07 May 2012 19:06:21 UTC +00:00]]
219
+  (0.0ms) RELEASE SAVEPOINT active_record_1
220
+
221
+ Sent mail to to@example.com (8ms)
222
+ Date: Mon, 07 May 2012 15:06:20 -0400
223
+ From: from@example.com
224
+ To: to@example.com
225
+ Message-ID: <4fa81d2cf314a_10f253fce3cc34cdc4494a@dgmpro.local.mail>
226
+ Subject: Hiya!
227
+ Mime-Version: 1.0
228
+ Content-Type: text/plain;
229
+ charset=UTF-8
230
+ Content-Transfer-Encoding: 7bit
231
+
232
+ Papaya
233
+  (0.1ms) SELECT COUNT(*) FROM "emails"
234
+ Mailhopper::Email Load (0.1ms) SELECT "emails".* FROM "emails" ORDER BY created_at DESC LIMIT 1
235
+  (0.5ms) rollback transaction
236
+  (0.0ms) begin transaction
237
+  (0.1ms) SELECT COUNT(*) FROM "emails"
238
+ Rendered sample_mailer/hello.text.erb (0.1ms)
239
+
240
+ Sent mail to to.@example.com (3ms)
241
+ Date: Mon, 07 May 2012 15:06:21 -0400
242
+ from: from.@example.com
243
+ to: to.@example.com
244
+ Message-ID: <4fa81d2d2c38_10f253fce3cc34cdc450df@dgmpro.local.mail>
245
+ Subject: Hiya!
246
+ Mime-Version: 1.0
247
+ Content-Type: text/plain;
248
+ charset=UTF-8
249
+ Content-Transfer-Encoding: 7bit
250
+
251
+ Papaya
252
+  (0.1ms) rollback transaction
253
+  (0.4ms) begin transaction
254
+  (0.1ms) rollback transaction
255
+  (0.0ms) begin transaction
256
+  (0.1ms) SELECT COUNT(*) FROM "emails"
257
+ Rendered sample_mailer/hello.text.erb (2.3ms)
258
+  (0.1ms) SAVEPOINT active_record_1
259
+ SQL (3.9ms) INSERT INTO "emails" ("bcc_address", "cc_address", "content", "created_at", "from_address", "reply_to_address", "sent_at", "subject", "to_address", "updated_at") VALUES (?, ?, ?, ?, ?, ?, ?, ?, ?, ?) [["bcc_address", "bcc@example.com"], ["cc_address", "cc@example.com"], ["content", "Date: Mon, 07 May 2012 15:08:42 -0400\r\nFrom: from@example.com\r\nReply-To: reply_to@example.com\r\nTo: to@example.com\r\nCc: cc@example.com\r\nMessage-ID: <4fa81dba78d8f_10f413fc36dc34cd4693e7@dgmpro.local.mail>\r\nSubject: Hiya!\r\nMime-Version: 1.0\r\nContent-Type: text/plain;\r\n charset=UTF-8\r\nContent-Transfer-Encoding: 7bit\r\n\r\nPapaya"], ["created_at", Mon, 07 May 2012 19:08:42 UTC +00:00], ["from_address", "from@example.com"], ["reply_to_address", "reply_to@example.com"], ["sent_at", nil], ["subject", "Hiya!"], ["to_address", "to@example.com"], ["updated_at", Mon, 07 May 2012 19:08:42 UTC +00:00]]
260
+  (0.0ms) RELEASE SAVEPOINT active_record_1
261
+
262
+ Sent mail to to@example.com (24ms)
263
+ Date: Mon, 07 May 2012 15:08:42 -0400
264
+ From: from@example.com
265
+ Reply-To: reply_to@example.com
266
+ To: to@example.com
267
+ Cc: cc@example.com
268
+ Message-ID: <4fa81dba78d8f_10f413fc36dc34cd4693e7@dgmpro.local.mail>
269
+ Subject: Hiya!
270
+ Mime-Version: 1.0
271
+ Content-Type: text/plain;
272
+ charset=UTF-8
273
+ Content-Transfer-Encoding: 7bit
274
+
275
+ Papaya
276
+  (0.1ms) SELECT COUNT(*) FROM "emails"
277
+ Mailhopper::Email Load (0.2ms) SELECT "emails".* FROM "emails" ORDER BY created_at DESC LIMIT 1
278
+  (0.5ms) rollback transaction
279
+  (0.1ms) begin transaction
280
+  (0.1ms) SELECT COUNT(*) FROM "emails"
281
+ Rendered sample_mailer/hello.text.erb (0.1ms)
282
+  (0.1ms) SAVEPOINT active_record_1
283
+ SQL (0.5ms) INSERT INTO "emails" ("bcc_address", "cc_address", "content", "created_at", "from_address", "reply_to_address", "sent_at", "subject", "to_address", "updated_at") VALUES (?, ?, ?, ?, ?, ?, ?, ?, ?, ?) [["bcc_address", "bcc1@example.com,bcc2@example.com"], ["cc_address", "cc1@example.com,cc2@example.com"], ["content", "Date: Mon, 07 May 2012 15:08:42 -0400\r\nFrom: from1@example.com\r\nReply-To: reply_to@example.com\r\nTo: to1@example.com, \r\n to2@example.com\r\nCc: cc1@example.com, \r\n cc2@example.com\r\nMessage-ID: <4fa81dba80b81_10f413fc36dc34cd4694e4@dgmpro.local.mail>\r\nSubject: Hiya!\r\nMime-Version: 1.0\r\nContent-Type: text/plain;\r\n charset=UTF-8\r\nContent-Transfer-Encoding: 7bit\r\n\r\nPapaya"], ["created_at", Mon, 07 May 2012 19:08:42 UTC +00:00], ["from_address", "from1@example.com"], ["reply_to_address", "reply_to@example.com"], ["sent_at", nil], ["subject", "Hiya!"], ["to_address", "to1@example.com,to2@example.com"], ["updated_at", Mon, 07 May 2012 19:08:42 UTC +00:00]]
284
+  (0.0ms) RELEASE SAVEPOINT active_record_1
285
+
286
+ Sent mail to to1@example.com, to2@example.com (12ms)
287
+ Date: Mon, 07 May 2012 15:08:42 -0400
288
+ From: from1@example.com
289
+ Reply-To: reply_to@example.com
290
+ To: to1@example.com,
291
+ to2@example.com
292
+ Cc: cc1@example.com,
293
+ cc2@example.com
294
+ Message-ID: <4fa81dba80b81_10f413fc36dc34cd4694e4@dgmpro.local.mail>
295
+ Subject: Hiya!
296
+ Mime-Version: 1.0
297
+ Content-Type: text/plain;
298
+ charset=UTF-8
299
+ Content-Transfer-Encoding: 7bit
300
+
301
+ Papaya
302
+  (0.1ms) SELECT COUNT(*) FROM "emails"
303
+ Mailhopper::Email Load (0.2ms) SELECT "emails".* FROM "emails" ORDER BY created_at DESC LIMIT 1
304
+  (0.5ms) rollback transaction
305
+  (0.0ms) begin transaction
306
+  (0.1ms) SELECT COUNT(*) FROM "emails"
307
+ Rendered sample_mailer/hello.text.erb (0.0ms)
308
+  (0.1ms) SAVEPOINT active_record_1
309
+ SQL (0.4ms) INSERT INTO "emails" ("bcc_address", "cc_address", "content", "created_at", "from_address", "reply_to_address", "sent_at", "subject", "to_address", "updated_at") VALUES (?, ?, ?, ?, ?, ?, ?, ?, ?, ?) [["bcc_address", nil], ["cc_address", nil], ["content", "Date: Mon, 07 May 2012 15:08:42 -0400\r\nFrom: from@example.com\r\nTo: to@example.com\r\nMessage-ID: <4fa81dba85600_10f413fc36dc34cd469589@dgmpro.local.mail>\r\nSubject: Hiya!\r\nMime-Version: 1.0\r\nContent-Type: text/plain;\r\n charset=UTF-8\r\nContent-Transfer-Encoding: 7bit\r\n\r\nPapaya"], ["created_at", Mon, 07 May 2012 19:08:42 UTC +00:00], ["from_address", "from@example.com"], ["reply_to_address", nil], ["sent_at", nil], ["subject", "Hiya!"], ["to_address", "to@example.com"], ["updated_at", Mon, 07 May 2012 19:08:42 UTC +00:00]]
310
+  (0.0ms) RELEASE SAVEPOINT active_record_1
311
+
312
+ Sent mail to to@example.com (8ms)
313
+ Date: Mon, 07 May 2012 15:08:42 -0400
314
+ From: from@example.com
315
+ To: to@example.com
316
+ Message-ID: <4fa81dba85600_10f413fc36dc34cd469589@dgmpro.local.mail>
317
+ Subject: Hiya!
318
+ Mime-Version: 1.0
319
+ Content-Type: text/plain;
320
+ charset=UTF-8
321
+ Content-Transfer-Encoding: 7bit
322
+
323
+ Papaya
324
+  (0.1ms) SELECT COUNT(*) FROM "emails"
325
+ Mailhopper::Email Load (0.1ms) SELECT "emails".* FROM "emails" ORDER BY created_at DESC LIMIT 1
326
+  (0.5ms) rollback transaction
327
+  (0.0ms) begin transaction
328
+  (0.1ms) SELECT COUNT(*) FROM "emails"
329
+ Rendered sample_mailer/hello.text.erb (0.1ms)
330
+  (0.1ms) SAVEPOINT active_record_1
331
+ SQL (0.4ms) INSERT INTO "emails" ("bcc_address", "cc_address", "content", "created_at", "from_address", "reply_to_address", "sent_at", "subject", "to_address", "updated_at") VALUES (?, ?, ?, ?, ?, ?, ?, ?, ?, ?) [["bcc_address", nil], ["cc_address", nil], ["content", "Date: Mon, 07 May 2012 15:08:42 -0400\r\nFrom: from.this@example.com\r\nTo: to.this@example.com\r\nMessage-ID: <4fa81dba8944e_10f413fc36dc34cd46969@dgmpro.local.mail>\r\nSubject: Hiya!\r\nMime-Version: 1.0\r\nContent-Type: text/plain;\r\n charset=UTF-8\r\nContent-Transfer-Encoding: 7bit\r\n\r\nPapaya"], ["created_at", Mon, 07 May 2012 19:08:42 UTC +00:00], ["from_address", "from.this@example.com"], ["reply_to_address", nil], ["sent_at", nil], ["subject", "Hiya!"], ["to_address", "to.this@example.com"], ["updated_at", Mon, 07 May 2012 19:08:42 UTC +00:00]]
332
+  (0.0ms) RELEASE SAVEPOINT active_record_1
333
+
334
+ Sent mail to to.this@example.com (8ms)
335
+ Date: Mon, 07 May 2012 15:08:42 -0400
336
+ From: from.this@example.com
337
+ To: to.this@example.com
338
+ Message-ID: <4fa81dba8944e_10f413fc36dc34cd46969@dgmpro.local.mail>
339
+ Subject: Hiya!
340
+ Mime-Version: 1.0
341
+ Content-Type: text/plain;
342
+ charset=UTF-8
343
+ Content-Transfer-Encoding: 7bit
344
+
345
+ Papaya
346
+  (0.1ms) SELECT COUNT(*) FROM "emails"
347
+ Mailhopper::Email Load (0.1ms) SELECT "emails".* FROM "emails" ORDER BY created_at DESC LIMIT 1
348
+  (0.7ms) rollback transaction
349
+  (0.4ms) begin transaction
350
+  (0.1ms) rollback transaction
351
+  (0.0ms) begin transaction
352
+  (0.1ms) SELECT COUNT(*) FROM "emails"
353
+ Rendered sample_mailer/hello.text.erb (1.9ms)
354
+  (0.1ms) SAVEPOINT active_record_1
355
+ SQL (4.7ms) INSERT INTO "emails" ("bcc_address", "cc_address", "content", "created_at", "from_address", "reply_to_address", "sent_at", "subject", "to_address", "updated_at") VALUES (?, ?, ?, ?, ?, ?, ?, ?, ?, ?) [["bcc_address", "bcc@example.com"], ["cc_address", "cc@example.com"], ["content", "Date: Mon, 07 May 2012 15:10:00 -0400\r\nFrom: from@example.com\r\nReply-To: reply_to@example.com\r\nTo: to@example.com\r\nCc: cc@example.com\r\nMessage-ID: <4fa81e082337b_10f503ffec4434ce0154f7@dgmpro.local.mail>\r\nSubject: Hiya!\r\nMime-Version: 1.0\r\nContent-Type: text/plain;\r\n charset=UTF-8\r\nContent-Transfer-Encoding: 7bit\r\n\r\nPapaya"], ["created_at", Mon, 07 May 2012 19:10:00 UTC +00:00], ["from_address", "from@example.com"], ["reply_to_address", "reply_to@example.com"], ["sent_at", nil], ["subject", "Hiya!"], ["to_address", "to@example.com"], ["updated_at", Mon, 07 May 2012 19:10:00 UTC +00:00]]
356
+  (0.0ms) RELEASE SAVEPOINT active_record_1
357
+
358
+ Sent mail to to@example.com (25ms)
359
+ Date: Mon, 07 May 2012 15:10:00 -0400
360
+ From: from@example.com
361
+ Reply-To: reply_to@example.com
362
+ To: to@example.com
363
+ Cc: cc@example.com
364
+ Message-ID: <4fa81e082337b_10f503ffec4434ce0154f7@dgmpro.local.mail>
365
+ Subject: Hiya!
366
+ Mime-Version: 1.0
367
+ Content-Type: text/plain;
368
+ charset=UTF-8
369
+ Content-Transfer-Encoding: 7bit
370
+
371
+ Papaya
372
+  (0.1ms) SELECT COUNT(*) FROM "emails"
373
+ Mailhopper::Email Load (0.2ms) SELECT "emails".* FROM "emails" ORDER BY created_at DESC LIMIT 1
374
+  (0.5ms) rollback transaction
375
+  (0.0ms) begin transaction
376
+  (0.1ms) SELECT COUNT(*) FROM "emails"
377
+ Rendered sample_mailer/hello.text.erb (0.1ms)
378
+  (0.1ms) SAVEPOINT active_record_1
379
+ SQL (0.5ms) INSERT INTO "emails" ("bcc_address", "cc_address", "content", "created_at", "from_address", "reply_to_address", "sent_at", "subject", "to_address", "updated_at") VALUES (?, ?, ?, ?, ?, ?, ?, ?, ?, ?) [["bcc_address", "bcc1@example.com,bcc2@example.com"], ["cc_address", "cc1@example.com,cc2@example.com"], ["content", "Date: Mon, 07 May 2012 15:10:00 -0400\r\nFrom: from1@example.com\r\nReply-To: reply_to@example.com\r\nTo: to1@example.com, \r\n to2@example.com\r\nCc: cc1@example.com, \r\n cc2@example.com\r\nMessage-ID: <4fa81e0832b6a_10f503ffec4434ce015591@dgmpro.local.mail>\r\nSubject: Hiya!\r\nMime-Version: 1.0\r\nContent-Type: text/plain;\r\n charset=UTF-8\r\nContent-Transfer-Encoding: 7bit\r\n\r\nPapaya"], ["created_at", Mon, 07 May 2012 19:10:00 UTC +00:00], ["from_address", "from1@example.com"], ["reply_to_address", "reply_to@example.com"], ["sent_at", nil], ["subject", "Hiya!"], ["to_address", "to1@example.com,to2@example.com"], ["updated_at", Mon, 07 May 2012 19:10:00 UTC +00:00]]
380
+  (0.0ms) RELEASE SAVEPOINT active_record_1
381
+
382
+ Sent mail to to1@example.com, to2@example.com (12ms)
383
+ Date: Mon, 07 May 2012 15:10:00 -0400
384
+ From: from1@example.com
385
+ Reply-To: reply_to@example.com
386
+ To: to1@example.com,
387
+ to2@example.com
388
+ Cc: cc1@example.com,
389
+ cc2@example.com
390
+ Message-ID: <4fa81e0832b6a_10f503ffec4434ce015591@dgmpro.local.mail>
391
+ Subject: Hiya!
392
+ Mime-Version: 1.0
393
+ Content-Type: text/plain;
394
+ charset=UTF-8
395
+ Content-Transfer-Encoding: 7bit
396
+
397
+ Papaya
398
+  (0.1ms) SELECT COUNT(*) FROM "emails"
399
+ Mailhopper::Email Load (0.2ms) SELECT "emails".* FROM "emails" ORDER BY created_at DESC LIMIT 1
400
+  (0.4ms) rollback transaction
401
+  (0.0ms) begin transaction
402
+  (0.1ms) SELECT COUNT(*) FROM "emails"
403
+ Rendered sample_mailer/hello.text.erb (0.1ms)
404
+  (0.1ms) SAVEPOINT active_record_1
405
+ SQL (0.4ms) INSERT INTO "emails" ("bcc_address", "cc_address", "content", "created_at", "from_address", "reply_to_address", "sent_at", "subject", "to_address", "updated_at") VALUES (?, ?, ?, ?, ?, ?, ?, ?, ?, ?) [["bcc_address", nil], ["cc_address", nil], ["content", "Date: Mon, 07 May 2012 15:10:00 -0400\r\nFrom: from@example.com\r\nTo: to@example.com\r\nMessage-ID: <4fa81e08376ea_10f503ffec4434ce015668@dgmpro.local.mail>\r\nSubject: Hiya!\r\nMime-Version: 1.0\r\nContent-Type: text/plain;\r\n charset=UTF-8\r\nContent-Transfer-Encoding: 7bit\r\n\r\nPapaya"], ["created_at", Mon, 07 May 2012 19:10:00 UTC +00:00], ["from_address", "from@example.com"], ["reply_to_address", nil], ["sent_at", nil], ["subject", "Hiya!"], ["to_address", "to@example.com"], ["updated_at", Mon, 07 May 2012 19:10:00 UTC +00:00]]
406
+  (0.0ms) RELEASE SAVEPOINT active_record_1
407
+
408
+ Sent mail to to@example.com (8ms)
409
+ Date: Mon, 07 May 2012 15:10:00 -0400
410
+ From: from@example.com
411
+ To: to@example.com
412
+ Message-ID: <4fa81e08376ea_10f503ffec4434ce015668@dgmpro.local.mail>
413
+ Subject: Hiya!
414
+ Mime-Version: 1.0
415
+ Content-Type: text/plain;
416
+ charset=UTF-8
417
+ Content-Transfer-Encoding: 7bit
418
+
419
+ Papaya
420
+  (0.1ms) SELECT COUNT(*) FROM "emails"
421
+ Mailhopper::Email Load (0.2ms) SELECT "emails".* FROM "emails" ORDER BY created_at DESC LIMIT 1
422
+  (0.5ms) rollback transaction
423
+  (0.0ms) begin transaction
424
+  (0.1ms) SELECT COUNT(*) FROM "emails"
425
+ Rendered sample_mailer/hello.text.erb (0.1ms)
426
+
427
+ Sent mail to to.@example.com (3ms)
428
+ Date: Mon, 07 May 2012 15:10:00 -0400
429
+ from: from.@example.com
430
+ to: to.@example.com
431
+ Message-ID: <4fa81e083b34b_10f503ffec4434ce0157b3@dgmpro.local.mail>
432
+ Subject: Hiya!
433
+ Mime-Version: 1.0
434
+ Content-Type: text/plain;
435
+ charset=UTF-8
436
+ Content-Transfer-Encoding: 7bit
437
+
438
+ Papaya
439
+  (0.1ms) rollback transaction
440
+  (0.4ms) begin transaction
441
+  (0.1ms) rollback transaction
442
+  (0.0ms) begin transaction
443
+  (0.1ms) SELECT COUNT(*) FROM "emails"
444
+ Rendered sample_mailer/hello.text.erb (1.9ms)
445
+  (0.1ms) SAVEPOINT active_record_1
446
+ SQL (4.2ms) INSERT INTO "emails" ("bcc_address", "cc_address", "content", "created_at", "from_address", "reply_to_address", "sent_at", "subject", "to_address", "updated_at") VALUES (?, ?, ?, ?, ?, ?, ?, ?, ?, ?) [["bcc_address", "bcc@example.com"], ["cc_address", "cc@example.com"], ["content", "Date: Mon, 07 May 2012 15:16:13 -0400\r\nFrom: from@example.com\r\nReply-To: reply_to@example.com\r\nTo: to@example.com\r\nCc: cc@example.com\r\nMessage-ID: <4fa81f7d985a3_10f8e3fecc9034cd8776d1@dgmpro.local.mail>\r\nSubject: Hiya!\r\nMime-Version: 1.0\r\nContent-Type: text/plain;\r\n charset=UTF-8\r\nContent-Transfer-Encoding: 7bit\r\n\r\nPapaya"], ["created_at", Mon, 07 May 2012 19:16:13 UTC +00:00], ["from_address", "from@example.com"], ["reply_to_address", "reply_to@example.com"], ["sent_at", nil], ["subject", "Hiya!"], ["to_address", "to@example.com"], ["updated_at", Mon, 07 May 2012 19:16:13 UTC +00:00]]
447
+  (0.0ms) RELEASE SAVEPOINT active_record_1
448
+
449
+ Sent mail to to@example.com (23ms)
450
+ Date: Mon, 07 May 2012 15:16:13 -0400
451
+ From: from@example.com
452
+ Reply-To: reply_to@example.com
453
+ To: to@example.com
454
+ Cc: cc@example.com
455
+ Message-ID: <4fa81f7d985a3_10f8e3fecc9034cd8776d1@dgmpro.local.mail>
456
+ Subject: Hiya!
457
+ Mime-Version: 1.0
458
+ Content-Type: text/plain;
459
+ charset=UTF-8
460
+ Content-Transfer-Encoding: 7bit
461
+
462
+ Papaya
463
+  (0.1ms) SELECT COUNT(*) FROM "emails"
464
+ Mailhopper::Email Load (0.2ms) SELECT "emails".* FROM "emails" ORDER BY created_at DESC LIMIT 1
465
+  (12.4ms) rollback transaction
466
+  (0.1ms) begin transaction
467
+  (0.1ms) SELECT COUNT(*) FROM "emails"
468
+ Rendered sample_mailer/hello.text.erb (0.1ms)
469
+  (0.1ms) SAVEPOINT active_record_1
470
+ SQL (0.5ms) INSERT INTO "emails" ("bcc_address", "cc_address", "content", "created_at", "from_address", "reply_to_address", "sent_at", "subject", "to_address", "updated_at") VALUES (?, ?, ?, ?, ?, ?, ?, ?, ?, ?) [["bcc_address", "bcc1@example.com,bcc2@example.com"], ["cc_address", "cc1@example.com,cc2@example.com"], ["content", "Date: Mon, 07 May 2012 15:16:13 -0400\r\nFrom: from1@example.com\r\nReply-To: reply_to@example.com\r\nTo: to1@example.com, \r\n to2@example.com\r\nCc: cc1@example.com, \r\n cc2@example.com\r\nMessage-ID: <4fa81f7daa391_10f8e3fecc9034cd8777bf@dgmpro.local.mail>\r\nSubject: Hiya!\r\nMime-Version: 1.0\r\nContent-Type: text/plain;\r\n charset=UTF-8\r\nContent-Transfer-Encoding: 7bit\r\n\r\nPapaya"], ["created_at", Mon, 07 May 2012 19:16:13 UTC +00:00], ["from_address", "from1@example.com"], ["reply_to_address", "reply_to@example.com"], ["sent_at", nil], ["subject", "Hiya!"], ["to_address", "to1@example.com,to2@example.com"], ["updated_at", Mon, 07 May 2012 19:16:13 UTC +00:00]]
471
+  (0.0ms) RELEASE SAVEPOINT active_record_1
472
+
473
+ Sent mail to to1@example.com, to2@example.com (12ms)
474
+ Date: Mon, 07 May 2012 15:16:13 -0400
475
+ From: from1@example.com
476
+ Reply-To: reply_to@example.com
477
+ To: to1@example.com,
478
+ to2@example.com
479
+ Cc: cc1@example.com,
480
+ cc2@example.com
481
+ Message-ID: <4fa81f7daa391_10f8e3fecc9034cd8777bf@dgmpro.local.mail>
482
+ Subject: Hiya!
483
+ Mime-Version: 1.0
484
+ Content-Type: text/plain;
485
+ charset=UTF-8
486
+ Content-Transfer-Encoding: 7bit
487
+
488
+ Papaya
489
+  (0.1ms) SELECT COUNT(*) FROM "emails"
490
+ Mailhopper::Email Load (0.2ms) SELECT "emails".* FROM "emails" ORDER BY created_at DESC LIMIT 1
491
+  (5.2ms) rollback transaction
492
+  (0.0ms) begin transaction
493
+  (0.1ms) SELECT COUNT(*) FROM "emails"
494
+ Rendered sample_mailer/hello.text.erb (0.1ms)
495
+  (0.1ms) SAVEPOINT active_record_1
496
+ SQL (0.7ms) INSERT INTO "emails" ("bcc_address", "cc_address", "content", "created_at", "from_address", "reply_to_address", "sent_at", "subject", "to_address", "updated_at") VALUES (?, ?, ?, ?, ?, ?, ?, ?, ?, ?) [["bcc_address", nil], ["cc_address", nil], ["content", "Date: Mon, 07 May 2012 15:16:13 -0400\r\nFrom: from@example.com\r\nTo: to@example.com\r\nMessage-ID: <4fa81f7db00ea_10f8e3fecc9034cd877839@dgmpro.local.mail>\r\nSubject: Hiya!\r\nMime-Version: 1.0\r\nContent-Type: text/plain;\r\n charset=UTF-8\r\nContent-Transfer-Encoding: 7bit\r\n\r\nPapaya"], ["created_at", Mon, 07 May 2012 19:16:13 UTC +00:00], ["from_address", "from@example.com"], ["reply_to_address", nil], ["sent_at", nil], ["subject", "Hiya!"], ["to_address", "to@example.com"], ["updated_at", Mon, 07 May 2012 19:16:13 UTC +00:00]]
497
+  (0.0ms) RELEASE SAVEPOINT active_record_1
498
+
499
+ Sent mail to to@example.com (8ms)
500
+ Date: Mon, 07 May 2012 15:16:13 -0400
501
+ From: from@example.com
502
+ To: to@example.com
503
+ Message-ID: <4fa81f7db00ea_10f8e3fecc9034cd877839@dgmpro.local.mail>
504
+ Subject: Hiya!
505
+ Mime-Version: 1.0
506
+ Content-Type: text/plain;
507
+ charset=UTF-8
508
+ Content-Transfer-Encoding: 7bit
509
+
510
+ Papaya
511
+  (0.1ms) SELECT COUNT(*) FROM "emails"
512
+ Mailhopper::Email Load (0.2ms) SELECT "emails".* FROM "emails" ORDER BY created_at DESC LIMIT 1
513
+  (0.5ms) rollback transaction
514
+  (0.0ms) begin transaction
515
+  (0.1ms) SELECT COUNT(*) FROM "emails"
516
+ Rendered sample_mailer/hello.text.erb (0.1ms)
517
+  (0.1ms) SAVEPOINT active_record_1
518
+ SQL (0.4ms) INSERT INTO "emails" ("bcc_address", "cc_address", "content", "created_at", "from_address", "reply_to_address", "sent_at", "subject", "to_address", "updated_at") VALUES (?, ?, ?, ?, ?, ?, ?, ?, ?, ?) [["bcc_address", nil], ["cc_address", nil], ["content", "Date: Mon, 07 May 2012 15:16:13 -0400\r\nfrom: from.@example.com\r\nto: to.@example.com\r\nMessage-ID: <4fa81f7db3d6c_10f8e3fecc9034cd8779ef@dgmpro.local.mail>\r\nSubject: Hiya!\r\nMime-Version: 1.0\r\nContent-Type: text/plain;\r\n charset=UTF-8\r\nContent-Transfer-Encoding: 7bit\r\n\r\nPapaya"], ["created_at", Mon, 07 May 2012 19:16:13 UTC +00:00], ["from_address", "from.@example.com"], ["reply_to_address", nil], ["sent_at", nil], ["subject", "Hiya!"], ["to_address", "to.@example.com"], ["updated_at", Mon, 07 May 2012 19:16:13 UTC +00:00]]
519
+  (0.0ms) RELEASE SAVEPOINT active_record_1
520
+
521
+ Sent mail to to.@example.com (6ms)
522
+ Date: Mon, 07 May 2012 15:16:13 -0400
523
+ from: from.@example.com
524
+ to: to.@example.com
525
+ Message-ID: <4fa81f7db3d6c_10f8e3fecc9034cd8779ef@dgmpro.local.mail>
526
+ Subject: Hiya!
527
+ Mime-Version: 1.0
528
+ Content-Type: text/plain;
529
+ charset=UTF-8
530
+ Content-Transfer-Encoding: 7bit
531
+
532
+ Papaya
533
+  (0.1ms) SELECT COUNT(*) FROM "emails"
534
+ Mailhopper::Email Load (0.2ms) SELECT "emails".* FROM "emails" ORDER BY created_at DESC LIMIT 1
535
+  (0.4ms) rollback transaction
536
+  (0.4ms) begin transaction
537
+  (0.1ms) rollback transaction
538
+  (0.0ms) begin transaction
539
+  (0.1ms) SELECT COUNT(*) FROM "emails"
540
+ Rendered sample_mailer/hello.text.erb (2.1ms)
541
+  (0.1ms) SAVEPOINT active_record_1
542
+ SQL (4.7ms) INSERT INTO "emails" ("bcc_address", "cc_address", "content", "created_at", "from_address", "reply_to_address", "sent_at", "subject", "to_address", "updated_at") VALUES (?, ?, ?, ?, ?, ?, ?, ?, ?, ?) [["bcc_address", "bcc@example.com"], ["cc_address", "cc@example.com"], ["content", "Date: Mon, 07 May 2012 15:27:35 -0400\r\nFrom: from@example.com\r\nReply-To: reply_to@example.com\r\nTo: to@example.com\r\nCc: cc@example.com\r\nMessage-ID: <4fa82227383e3_1102c3fc8ba034cd4226cc@dgmpro.local.mail>\r\nSubject: Hiya!\r\nMime-Version: 1.0\r\nContent-Type: text/plain;\r\n charset=UTF-8\r\nContent-Transfer-Encoding: 7bit\r\n\r\nPapaya"], ["created_at", Mon, 07 May 2012 19:27:35 UTC +00:00], ["from_address", "from@example.com"], ["reply_to_address", "reply_to@example.com"], ["sent_at", nil], ["subject", "Hiya!"], ["to_address", "to@example.com"], ["updated_at", Mon, 07 May 2012 19:27:35 UTC +00:00]]
543
+  (0.0ms) RELEASE SAVEPOINT active_record_1
544
+
545
+ Sent mail to to@example.com (54ms)
546
+ Date: Mon, 07 May 2012 15:27:35 -0400
547
+ From: from@example.com
548
+ Reply-To: reply_to@example.com
549
+ To: to@example.com
550
+ Cc: cc@example.com
551
+ Message-ID: <4fa82227383e3_1102c3fc8ba034cd4226cc@dgmpro.local.mail>
552
+ Subject: Hiya!
553
+ Mime-Version: 1.0
554
+ Content-Type: text/plain;
555
+ charset=UTF-8
556
+ Content-Transfer-Encoding: 7bit
557
+
558
+ Papaya
559
+  (0.1ms) SELECT COUNT(*) FROM "emails"
560
+ Mailhopper::Email Load (0.2ms) SELECT "emails".* FROM "emails" ORDER BY created_at DESC LIMIT 1
561
+  (0.4ms) rollback transaction
562
+  (0.0ms) begin transaction
563
+  (0.1ms) SELECT COUNT(*) FROM "emails"
564
+ Rendered sample_mailer/hello.text.erb (0.1ms)
565
+  (0.1ms) SAVEPOINT active_record_1
566
+ SQL (0.5ms) INSERT INTO "emails" ("bcc_address", "cc_address", "content", "created_at", "from_address", "reply_to_address", "sent_at", "subject", "to_address", "updated_at") VALUES (?, ?, ?, ?, ?, ?, ?, ?, ?, ?) [["bcc_address", "bcc1@example.com,bcc2@example.com"], ["cc_address", "cc1@example.com,cc2@example.com"], ["content", "Date: Mon, 07 May 2012 15:27:35 -0400\r\nFrom: from1@example.com\r\nReply-To: reply_to@example.com\r\nTo: to1@example.com, \r\n to2@example.com\r\nCc: cc1@example.com, \r\n cc2@example.com\r\nMessage-ID: <4fa8222747ddf_1102c3fc8ba034cd4227d2@dgmpro.local.mail>\r\nSubject: Hiya!\r\nMime-Version: 1.0\r\nContent-Type: text/plain;\r\n charset=UTF-8\r\nContent-Transfer-Encoding: 7bit\r\n\r\nPapaya"], ["created_at", Mon, 07 May 2012 19:27:35 UTC +00:00], ["from_address", "from1@example.com"], ["reply_to_address", "reply_to@example.com"], ["sent_at", nil], ["subject", "Hiya!"], ["to_address", "to1@example.com,to2@example.com"], ["updated_at", Mon, 07 May 2012 19:27:35 UTC +00:00]]
567
+  (0.0ms) RELEASE SAVEPOINT active_record_1
568
+
569
+ Sent mail to to1@example.com, to2@example.com (13ms)
570
+ Date: Mon, 07 May 2012 15:27:35 -0400
571
+ From: from1@example.com
572
+ Reply-To: reply_to@example.com
573
+ To: to1@example.com,
574
+ to2@example.com
575
+ Cc: cc1@example.com,
576
+ cc2@example.com
577
+ Message-ID: <4fa8222747ddf_1102c3fc8ba034cd4227d2@dgmpro.local.mail>
578
+ Subject: Hiya!
579
+ Mime-Version: 1.0
580
+ Content-Type: text/plain;
581
+ charset=UTF-8
582
+ Content-Transfer-Encoding: 7bit
583
+
584
+ Papaya
585
+  (0.1ms) SELECT COUNT(*) FROM "emails"
586
+ Mailhopper::Email Load (0.2ms) SELECT "emails".* FROM "emails" ORDER BY created_at DESC LIMIT 1
587
+  (25.9ms) rollback transaction
588
+  (0.1ms) begin transaction
589
+  (0.1ms) SELECT COUNT(*) FROM "emails"
590
+ Rendered sample_mailer/hello.text.erb (0.1ms)
591
+  (0.1ms) SAVEPOINT active_record_1
592
+ SQL (0.4ms) INSERT INTO "emails" ("bcc_address", "cc_address", "content", "created_at", "from_address", "reply_to_address", "sent_at", "subject", "to_address", "updated_at") VALUES (?, ?, ?, ?, ?, ?, ?, ?, ?, ?) [["bcc_address", nil], ["cc_address", nil], ["content", "Date: Mon, 07 May 2012 15:27:35 -0400\r\nFrom: from@example.com\r\nTo: to@example.com\r\nMessage-ID: <4fa8222753078_1102c3fc8ba034cd42282f@dgmpro.local.mail>\r\nSubject: Hiya!\r\nMime-Version: 1.0\r\nContent-Type: text/plain;\r\n charset=UTF-8\r\nContent-Transfer-Encoding: 7bit\r\n\r\nPapaya"], ["created_at", Mon, 07 May 2012 19:27:35 UTC +00:00], ["from_address", "from@example.com"], ["reply_to_address", nil], ["sent_at", nil], ["subject", "Hiya!"], ["to_address", "to@example.com"], ["updated_at", Mon, 07 May 2012 19:27:35 UTC +00:00]]
593
+  (0.0ms) RELEASE SAVEPOINT active_record_1
594
+
595
+ Sent mail to to@example.com (8ms)
596
+ Date: Mon, 07 May 2012 15:27:35 -0400
597
+ From: from@example.com
598
+ To: to@example.com
599
+ Message-ID: <4fa8222753078_1102c3fc8ba034cd42282f@dgmpro.local.mail>
600
+ Subject: Hiya!
601
+ Mime-Version: 1.0
602
+ Content-Type: text/plain;
603
+ charset=UTF-8
604
+ Content-Transfer-Encoding: 7bit
605
+
606
+ Papaya
607
+  (0.1ms) SELECT COUNT(*) FROM "emails"
608
+ Mailhopper::Email Load (0.2ms) SELECT "emails".* FROM "emails" ORDER BY created_at DESC LIMIT 1
609
+  (9.6ms) rollback transaction
610
+  (0.1ms) begin transaction
611
+  (0.1ms) SELECT COUNT(*) FROM "emails"
612
+ Rendered sample_mailer/hello.text.erb (0.1ms)
613
+  (0.1ms) SAVEPOINT active_record_1
614
+ SQL (0.4ms) INSERT INTO "emails" ("bcc_address", "cc_address", "content", "created_at", "from_address", "reply_to_address", "sent_at", "subject", "to_address", "updated_at") VALUES (?, ?, ?, ?, ?, ?, ?, ?, ?, ?) [["bcc_address", nil], ["cc_address", nil], ["content", "Date: Mon, 07 May 2012 15:27:35 -0400\r\nfrom: from.@example.com\r\nto: to.@example.com\r\nMessage-ID: <4fa82227592b7_1102c3fc8ba034cd422932@dgmpro.local.mail>\r\nSubject: Hiya!\r\nMime-Version: 1.0\r\nContent-Type: text/plain;\r\n charset=UTF-8\r\nContent-Transfer-Encoding: 7bit\r\n\r\nPapaya"], ["created_at", Mon, 07 May 2012 19:27:35 UTC +00:00], ["from_address", "from.@example.com"], ["reply_to_address", nil], ["sent_at", nil], ["subject", "Hiya!"], ["to_address", "to.@example.com"], ["updated_at", Mon, 07 May 2012 19:27:35 UTC +00:00]]
615
+  (0.0ms) RELEASE SAVEPOINT active_record_1
616
+
617
+ Sent mail to to.@example.com (6ms)
618
+ Date: Mon, 07 May 2012 15:27:35 -0400
619
+ from: from.@example.com
620
+ to: to.@example.com
621
+ Message-ID: <4fa82227592b7_1102c3fc8ba034cd422932@dgmpro.local.mail>
622
+ Subject: Hiya!
623
+ Mime-Version: 1.0
624
+ Content-Type: text/plain;
625
+ charset=UTF-8
626
+ Content-Transfer-Encoding: 7bit
627
+
628
+ Papaya
629
+  (0.1ms) SELECT COUNT(*) FROM "emails"
630
+ Mailhopper::Email Load (0.2ms) SELECT "emails".* FROM "emails" ORDER BY created_at DESC LIMIT 1
631
+  (0.5ms) rollback transaction
@@ -50,6 +50,20 @@ describe "Email" do
50
50
 
51
51
  generate_and_verify_email(headers, content)
52
52
  end
53
+
54
+ it "should be generated even when mail is sent to invalid addresses" do
55
+ headers = {
56
+ :from => 'from.@example.com',
57
+ :to => 'to.@example.com',
58
+ :cc => nil,
59
+ :bcc => nil,
60
+ :reply_to => nil,
61
+ :subject => 'Hiya!'
62
+ }
63
+ content = 'Papaya'
64
+
65
+ generate_and_verify_email(headers, content)
66
+ end
53
67
  end
54
68
 
55
69
  private
metadata CHANGED
@@ -1,7 +1,7 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: mailhopper
3
3
  version: !ruby/object:Gem::Version
4
- version: 0.1.0
4
+ version: 0.1.1
5
5
  prerelease:
6
6
  platform: ruby
7
7
  authors:
@@ -9,11 +9,11 @@ authors:
9
9
  autorequire:
10
10
  bindir: bin
11
11
  cert_chain: []
12
- date: 2012-04-05 00:00:00.000000000 Z
12
+ date: 2012-05-07 00:00:00.000000000 Z
13
13
  dependencies:
14
14
  - !ruby/object:Gem::Dependency
15
15
  name: rails
16
- requirement: &70186242099960 !ruby/object:Gem::Requirement
16
+ requirement: &70149330109600 !ruby/object:Gem::Requirement
17
17
  none: false
18
18
  requirements:
19
19
  - - ! '>='
@@ -21,10 +21,10 @@ dependencies:
21
21
  version: 3.1.0
22
22
  type: :runtime
23
23
  prerelease: false
24
- version_requirements: *70186242099960
24
+ version_requirements: *70149330109600
25
25
  - !ruby/object:Gem::Dependency
26
26
  name: sqlite3
27
- requirement: &70186242099460 !ruby/object:Gem::Requirement
27
+ requirement: &70149330109100 !ruby/object:Gem::Requirement
28
28
  none: false
29
29
  requirements:
30
30
  - - ! '>='
@@ -32,10 +32,10 @@ dependencies:
32
32
  version: 1.3.4
33
33
  type: :development
34
34
  prerelease: false
35
- version_requirements: *70186242099460
35
+ version_requirements: *70149330109100
36
36
  - !ruby/object:Gem::Dependency
37
37
  name: rspec-rails
38
- requirement: &70186242099080 !ruby/object:Gem::Requirement
38
+ requirement: &70149330108720 !ruby/object:Gem::Requirement
39
39
  none: false
40
40
  requirements:
41
41
  - - ! '>='
@@ -43,7 +43,7 @@ dependencies:
43
43
  version: '0'
44
44
  type: :development
45
45
  prerelease: false
46
- version_requirements: *70186242099080
46
+ version_requirements: *70149330108720
47
47
  description: Mailhopper stores your application's emails in an ActiveRecord queue
48
48
  for asynchronous delivery. Use Mailhopper in combination with a delivery agent such
49
49
  as DelayedMailhopper.