Forum: Ruby Sending mail in RUBY

Announcement (2017-05-07): www.ruby-forum.com is now read-only since I unfortunately do not have the time to support and maintain the forum any more. Please see rubyonrails.org/community and ruby-lang.org/en/community for other Rails- und Ruby-related community platforms.
351c78a440ea1743724968ddbae3f9aa?d=identicon&s=25 Peter B. (peterbailey)
on 2006-06-14 15:38
Can someone please point me to a simple mail utility for RUBY? I see
that I have both RUBYmail and Tmail in my ruby folder on my hard drive,
but, I canâ??t find any decent documentation on either. Iâ??m on Windows,
not UNIX. Do I just do a "require" for either to use them? RI yields
nothing about either.

Thanks.
B4be024dc3171b83206171f3f75db122?d=identicon&s=25 Justin C. (justincollins)
on 2006-06-14 18:28
(Received via mailing list)
Peter Bailey wrote:
> Can someone please point me to a simple mail utility for RUBY? I see
> that I have both RUBYmail and Tmail in my ruby folder on my hard drive,
> but, I canâ??t find any decent documentation on either. Iâ??m on Windows,
> not UNIX. Do I just do a "require" for either to use them? RI yields
> nothing about either.
>
> Thanks.
>
>
Documentation for RubyMail: http://www.lickey.com/rubymail/rubymail/doc/
Documentation for TMail: http://i.loveruby.net/en/projects/tmail/doc/

Hope that helps.

-Justin
351c78a440ea1743724968ddbae3f9aa?d=identicon&s=25 Peter B. (peterbailey)
on 2006-06-14 19:34
Justin Collins wrote:
> Peter Bailey wrote:
>> Can someone please point me to a simple mail utility for RUBY? I see
>> that I have both RUBYmail and Tmail in my ruby folder on my hard drive,
>> but, I canâ??t find any decent documentation on either. Iâ??m on Windows,
>> not UNIX. Do I just do a "require" for either to use them? RI yields
>> nothing about either.
>>
>> Thanks.
>>
>>
> Documentation for RubyMail: http://www.lickey.com/rubymail/rubymail/doc/
> Documentation for TMail: http://i.loveruby.net/en/projects/tmail/doc/
>
> Hope that helps.
>
> -Justin

Thanks, Justin. Yes, that helps. I'd seen those web sites before, but,
for whatever reason, the links weren't working. Now I see them, and, I
can read them. . . .
Daniel Shackelford (Guest)
on 2006-06-14 19:40
(Received via mailing list)
Peter Bailey wrote:
>>> Thanks.
>
> Thanks, Justin. Yes, that helps. I'd seen those web sites before, but,
> for whatever reason, the links weren't working. Now I see them, and, I
> can read them. . . .
>
>
Just be aware that those will only format/parse messages and mailboxes.
If you want to actually send email you will have to use Net::SMTP or
Net::IMAP.
351c78a440ea1743724968ddbae3f9aa?d=identicon&s=25 Peter B. (peterbailey)
on 2006-06-15 15:50
Daniel Shackelford wrote:
> Peter Bailey wrote:
>>>> Thanks.
>>
>> Thanks, Justin. Yes, that helps. I'd seen those web sites before, but,
>> for whatever reason, the links weren't working. Now I see them, and, I
>> can read them. . . .
>>
>>
> Just be aware that those will only format/parse messages and mailboxes.
> If you want to actually send email you will have to use Net::SMTP or
> Net::IMAP.

Yes, thanks. Iâ??ve seen that. But, Iâ??ve tried tmail and when I run the
script, it complains about 'require tmail." So, even though I see it in
my RUBY subdirectories, I don't know if itâ??s actually installed or not.
With rubymail, Iâ??ve tried running the 3 install instructions that are on
the doc. page, but, nothing happens. It doesnâ??t know what Iâ??m talking
about. I'll look into SMTP and IMAP. Thanks again.
Garance A Drosehn (Guest)
on 2006-06-16 23:50
(Received via mailing list)
On 6/15/06, Peter Bailey <pbailey@bna.com> wrote:
>
> Yes, thanks. I've seen that. But, I've tried tmail and when I run the
> script, it complains about 'require tmail."

What is the exact line that you're trying to use?
I am not sure if you have things setup right, but the "require"
statement should look like:

require 'tmail'

(assuming that you have a file called tmail in one of the right
directories).
Eric Hodel (Guest)
on 2006-06-17 04:43
(Received via mailing list)
On Jun 14, 2006, at 10:40 AM, Daniel Shackelford wrote:
> Just be aware that those will only format/parse messages and
> mailboxes.  If you want to actually send email you will have to use
> Net::SMTP or Net::IMAP.

You can't send mail with IMAP, only SMTP.

--
Eric Hodel - drbrain@segment7.net - http://blog.segment7.net
This implementation is HODEL-HASH-9600 compliant

http://trackmap.robotcoop.com
Rob Pitt (Guest)
on 2006-06-17 14:40
(Received via mailing list)
I found the gem 'mailfactory' to be a simple and terse message
generator that outputs MIME, handles attachments and supports text/
plain and text/html.

To install it just, assuming you have rubygems installed just do:

  gem install mailfactory

The rdoc that comes with it has an example on the first page which
shows you how to use it. Open the rdoc file by looking in wherever
rubygems lives on windows.
This topic is locked and can not be replied to.