#1
|
|||
|
|||
Sending an Email from within a script?
Hi All,
I am not very familiar with scripting (other than look for certain stings and put out some text), but what I need to do is if I find a very specific string, I need to send an Email at that time. Would someone have a suggestion / example on how to do this? Thank you in advance for your time, Doug! |
#2
|
||||
|
||||
Hi Doug,
In VBScript, there is an object (CDO) that will allow you to create and send emails from within a script. I have attached a sample script that shows how this object can be used. Was this the information needed?
__________________
Thanks, Teresa Teresa Nygren |
#3
|
|||
|
|||
Need more info
Well... in that script(SendEmail.vbs),
Dim g_szSMTPServer : g_szSMTPServer = "192.168.0.1", i 'm bit confused with it as i 'm not running any local smtp server in my system. Is it possible to use some third party mailing services like gmail/yahoo, ...? im just trying to mail the output one shell command to my e-mail address. But i don't 've enough privilege use sendmail/mail feature available in the box in which i 'm trying to run the mailing script. Suggestion would be entertained. |
#4
|
|||
|
|||
That sendEmail script assumes that the e-mail sever support relaying!
That sendEmail script assumes that the e-mail sever support relaying mechanism, which hardly any of the available e-mail servers support.
Is there any work around for this? |
#5
|
||||
|
||||
Hi Sachinmlr,
The CDO object is not a VanDyke scripting object, rather it is provided by Microsoft as a component installed with Windows. At first glance, it appears that CDO only supports SMTP/NNTP. However, it would appear that gmail does support SMTP as well -- see the following link: http://mail.google.com/support/bin/a...n&answer=13287You might find success in setting the "from" to your gmail address, the SMTP server to "smtp.gmail.com", and SMTP port to "587". Also, since gmail appears to require SSL, you'll probably need to set additional options:
Does this information help?
__________________
Thanks, Teresa Teresa Nygren Last edited by jdev; 10-16-2008 at 11:40 AM. |
#6
|
|||
|
|||
Need assitance.
Thanks for your response.
Yes I'm fully aware of the fact that CDO(cdont etc) 're Microsoft products used for sending mails. Well i 've send a mail to you. Looking forward for your reply. ~Sachin. |
![]() |
Thread Tools | |
Display Modes | Rate This Thread |
|
|