automated mailing

S

sapzz

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
 
J

James Britt

sapzz said:
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.ruby-doc.org - Ruby Help & Documentation
http://www.artima.com/rubycs/ - The Journal By & For Rubyists
http://www.rubystuff.com - The Ruby Store for Ruby Stuff
http://www.jamesbritt.com - Playing with Better Toys
http://www.30secondrule.com - Building Better Tools
 
R

Robert Klemme

sapzz said:
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/index.html

robert
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Members online

No members online now.

Forum statistics

Threads
474,432
Messages
2,571,682
Members
48,796
Latest member
Greg L.

Latest Threads

Top