[lnkForumImage]
TotalShareware - Download Free Software

Confronta i prezzi di migliaia di prodotti.
Asp Forum
 Home | Login | Register | Search 


 

Forums >

comp.lang.ruby

automated mailing

sapzz

2/2/2006 6:21:00 AM

Hi guys,
I want to automatically generate emails on specific events.
I am using the following script in ruby. It gives runtime error that
parameter missing
how do I go about it????????


require 'win32ole'
myMail= WIN32OLE::new("CDO.Message")
myConfig= WIN32OLE::new("CDO.Configuration")

#myMail=CreateObject("CDO.Message")
myMail.Subject="Sending email with CDO"
myMail.From="my email id"
myMail.To="receipients email"
myMail.TextBody="This is a sample scripting message."
myConfig.Fields.Item.SmtpMail.SmtpServer = "mail.persistent.co.in "
myConfig.Fields.Item.smtpport= 25
#myConfig.Update

#myMail.Send
#myMail=nothing


thanks
Sapna

2 Answers

james_b

2/2/2006 6:52:00 AM

0

sapzz wrote:
> Hi guys,
> I want to automatically generate emails on specific events.
> I am using the following script in ruby. It gives runtime error that
> parameter missing
> how do I go about it????????

How do you go about *what*?

Figuring out the missing parameter?

Sending mail some other way?


Is there a line number given with the "parameter missing" error?

Do you have working examples in JScript or VB Script o can use for a
comparison? (Try MSDN for sample code.)


--
James Britt

http://www.ru... - Ruby Help & Documentation
http://www.artima.c... - The Journal By & For Rubyists
http://www.rub... - The Ruby Store for Ruby Stuff
http://www.jame... - Playing with Better Toys
http://www.30seco... - Building Better Tools


Robert Klemme

2/2/2006 9:37:00 AM

0

sapzz wrote:
> Hi guys,
> I want to automatically generate emails on specific events.
> I am using the following script in ruby. It gives runtime error that
> parameter missing
> how do I go about it????????
>
>
> require 'win32ole'
> myMail= WIN32OLE::new("CDO.Message")
> myConfig= WIN32OLE::new("CDO.Configuration")
>
> #myMail=CreateObject("CDO.Message")
> myMail.Subject="Sending email with CDO"
> myMail.From="my email id"
> myMail.To="receipients email"
> myMail.TextBody="This is a sample scripting message."
> myConfig.Fields.Item.SmtpMail.SmtpServer = "mail.persistent.co.in "
> myConfig.Fields.Item.smtpport= 25
> #myConfig.Update
>
> #myMail.Send
> #myMail=nothing
>
>
> thanks
> Sapna

http://www.ruby-doc.org/stdlib/libdoc/net/smtp/rdoc/...

robert