Hi all, Keep getting the above error using tmail (1.2.3.1) on ruby(ruby 1.8.6 - patchlevel 111) on an ubuntu box. Any would be appreciated, Thank you ________________________ Filipe Moreira Director T?cnico www.coderelax.com 91 101 5544 - 665 284 108 skype: coderelax -------------- next part -------------- An HTML attachment was scrubbed... URL: <http://rubyforge.org/pipermail/tmail-talk/attachments/20081023/4ff9c768/attachment.html>
Mikel Lindsaar
2008-Oct-24 02:44 UTC
[Tmail-talk] ERROR: uninitialized constant Tmail (NameError)
On Fri, Oct 24, 2008 at 6:34 AM, Filipe <famoreira at gmail.com> wrote:> Keep getting the above error using tmail (1.2.3.1) on ruby(ruby 1.8.6 - > patchlevel 111) on an ubuntu box. > > Any would be appreciated,Can you post the code sample that caused the error?
The code is from an example I''ve got from the net to try out the
library:
--> code
#!/usr/bin/env ruby
require ''rubygems''
require ''tmail''
mail = Tmail::Mail.new
mail.to = ''famoreira at gmail.com''
mail.from = ''filipe at coderelax.com''
mail.subject = ''Hello World''
mail.data = Time.now
mail.mime_version = ''1.0''
mail.set_content_type ''text'', ''plain'',
{''charset'' => ''utf-8''}
mail.body = ''Mail Body''
str = mail.to_s
Net::SMTP.start(''localhost'', 25) do |smtp|
smtp.send_message(
str,
mail.from,
mail.to
)
end
-->code
The error is this one:
mail.rb:6: uninitialized constant Tmail (NameError)
Which looks like some kind of loading problem for me.
Thank you very much,
Filipe Moreira
________________________
Filipe Moreira
Director T?cnico
www.coderelax.com
91 101 5544 - 665 284 108
skype: coderelax
On Fri, Oct 24, 2008 at 3:44 AM, Mikel Lindsaar <raasdnil at gmail.com>
wrote:
> On Fri, Oct 24, 2008 at 6:34 AM, Filipe <famoreira at gmail.com>
wrote:
> > Keep getting the above error using tmail (1.2.3.1) on ruby(ruby 1.8.6
-
> > patchlevel 111) on an ubuntu box.
> >
> > Any would be appreciated,
>
> Can you post the code sample that caused the error?
> _______________________________________________
> Tmail-talk mailing list
> Tmail-talk at rubyforge.org
> http://rubyforge.org/mailman/listinfo/tmail-talk
>
-------------- next part --------------
An HTML attachment was scrubbed...
URL:
<http://rubyforge.org/pipermail/tmail-talk/attachments/20081028/a96f7c24/attachment.html>
Mikel Lindsaar
2008-Oct-29 05:26 UTC
[Tmail-talk] ERROR: uninitialized constant Tmail (NameError)
On Wed, Oct 29, 2008 at 4:58 AM, Filipe <famoreira at gmail.com> wrote:> mail.rb:6: uninitialized constant Tmail (NameError)Yes... it is TMail not Tmail -- http://lindsaar.net/ Rails, RSpec and Life blog....
UEDA Hiroyuki
2008-Oct-29 07:40 UTC
[Tmail-talk] ERROR: uninitialized constant Tmail (NameError)
Hello, 2008/10/29 Filipe <famoreira at gmail.com>:> The code is from an example I''ve got from the net to try out the library: > --> code > #!/usr/bin/env ruby > > require ''rubygems'' > require ''tmail'' > > mail = Tmail::Mail.newmail = TMail::Mail.new is right. -- UEDA "BSD mad" Hiroyuki <bsdmad at gmail.com>
Peter Burkholder
2008-Oct-29 10:05 UTC
[Tmail-talk] ERROR: uninitialized constant Tmail (NameError)
On Oct 28, 2008, at 1:58 PM, Filipe wrote:> > mail = Tmail::Mail.newmail = TMail::Mail.new (note capitalized ''M'') Always a good idea to try this in ''irb'' before writing scripts. You may need a: require ''rubygems'' depending on you install. Cheers, Peter>-- Peter Burkholder [Contractor] +1-301-402-7499 burkholp at ncbi.nlm.nih.gov Applications Administrator, NCBI/NLM/NIH
Thanks a lot guys... Sorry about that. It works great now. _______________________ Filipe Moreira Director T?cnico www.coderelax.com 91 101 5544 - 665 284 108 skype: coderelax On Wed, Oct 29, 2008 at 8:40 AM, UEDA Hiroyuki <bsdmad at gmail.com> wrote:> Hello, > > 2008/10/29 Filipe <famoreira at gmail.com>: > > The code is from an example I''ve got from the net to try out the library: > > --> code > > #!/usr/bin/env ruby > > > > require ''rubygems'' > > require ''tmail'' > > > > mail = Tmail::Mail.new > > mail = TMail::Mail.new > > is right. > > -- > UEDA "BSD mad" Hiroyuki <bsdmad at gmail.com> > _______________________________________________ > Tmail-talk mailing list > Tmail-talk at rubyforge.org > http://rubyforge.org/mailman/listinfo/tmail-talk >-------------- next part -------------- An HTML attachment was scrubbed... URL: <http://rubyforge.org/pipermail/tmail-talk/attachments/20081030/5489dbaa/attachment.html>