You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@whimsical.apache.org by ru...@apache.org on 2016/05/25 22:16:47 UTC

[whimsy] branch master updated: add a tool to test the ability to send email

This is an automated email from the ASF dual-hosted git repository.

rubys pushed a commit to branch master
in repository https://git-dual.apache.org/repos/asf/whimsy.git

The following commit(s) were added to refs/heads/master by this push:
       new  acea077   add a tool to test the ability to send email
acea077 is described below

commit acea077a59f8288d8ecf37c2853187bd037f2a18
Author: Sam Ruby <ru...@intertwingly.net>
AuthorDate: Wed May 25 18:16:29 2016 -0400

    add a tool to test the ability to send email
---
 tools/testmail.rb | 22 ++++++++++++++++++++++
 1 file changed, 22 insertions(+)

diff --git a/tools/testmail.rb b/tools/testmail.rb
new file mode 100644
index 0000000..ccef199
--- /dev/null
+++ b/tools/testmail.rb
@@ -0,0 +1,22 @@
+#
+# Test the ability to send email to non-apache.org email addresses
+#
+
+$LOAD_PATH.unshift File.expand_path('../../lib', __FILE__)
+require 'whimsy/asf'
+require 'mail'
+require 'etc'
+person = ASF::Person.find(Etc.getlogin)
+
+ASF::Mail.configure
+
+mail = Mail.new do
+  from "#{person.public_name} <#{...@apache.org>"
+  to "#{person.public_name} <#{person.mail.first}>"
+  subject 'test mail'
+  body "sent from #{`hostname`}"
+end
+
+puts mail.to_s
+puts
+mail.deliver!

-- 
To stop receiving notification emails like this one, please contact
['"commits@whimsical.apache.org" <co...@whimsical.apache.org>'].