Photo Gallery Member List Search Calendars FAQ Ticket List Log Out


Send email script in "Post a VB Script" forum

 
Logged in as: Guest
arrSession:exec spGetSession 2,7,27002
 Active Users: There are 0 members and 0 guests.
 Users viewing this topic: none
 

 

 
  
  Printable Version
All Forums >> [General Forum] >> Other Programming/Scripting Languages >> Send email script in "Post a VB Script" forum
  Do you like VisualBasicScript.com? Link to us and help spread the word about our forum. Thanks!
Page: [1]
Login
Message << Older Topic   Newer Topic >>
 Send email script in "Post a VB Script" forum - 10/17/2005 2:05:45 AM   
  CondorMan

 

Posts: 11
Score: 0
Joined: 10/5/2005
Status: offline
Hi everyone

I have a laptop with XP Pro SP2 connected via a router to ADSL.  I'm not part of a business network.  I have IIS installed and have downloaded and registered cdonts.dll.

I came across this script (by kirrilian) and tried to use it but it gives an error indicating that it can't connect with the server.  My ISP is Demon: the SMTP server is post.demon.co.uk and the POP3 server is pop3.demon.co.uk.  I usually use Outlook to access my e-mail.

I tried to enter each of these server names in kirrilian's code but each gave the same error.  I know that I have a username and password which I had to enter when I set up the account in Outlook so is this the reason why the code is generating the error?

I have a further related question - if I get this to work and am connected to the internet via a different ISP (say in a hotel), I guess I'd have to change the server name.  Is this correct?  Is there any way around this?

Thanks for your patience and time.
 
 
Post #: 1
 
 RE: Send email script in "Post a VB Script" f... - 10/17/2005 11:49:04 PM   
  sethsdad


Posts: 115
Score: 0
Joined: 4/4/2005
From: USA
Status: offline
There's no reason you should need to change the post server.  The pop server is the only changing variable in the equation.    For example, if you used the laptop on charter.net at home and msn.com at a hotel, you would always receive (post) to charter.net, but when connected to the new domain, you'd need to push (pop) to it (msn.com).

(in reply to CondorMan)
 
 
Post #: 2
 
 RE: Send email script in "Post a VB Script" f... - 10/18/2005 1:31:55 AM   
  CondorMan

 

Posts: 11
Score: 0
Joined: 10/5/2005
Status: offline
Thanks for the comment.

I can't get the code to work from home, let alone from a hotel!  The response from the laptop indicates that it couldn't connect.  Is it related to the password?  If so, where would I put it in the code?  I'm conscious that VBS can be read very easily so I'd be twitchy about putting it in the code explicitly.  I suppose I could have an inputbox (but that would need interaction from me, rather than send the e-mail automatically).  Would an alternative be to convert the .vbs to .exe?  Would that scramble the password or would it still be easily understood if someone opened the .exe file with Notepad?  Would I be better trying a different language rather than VBS (groan!)?

Thank you for any further input.

(in reply to CondorMan)
 
 
Post #: 3
 
 RE: Send email script in "Post a VB Script" f... - 10/18/2005 5:58:06 AM   
  CondorMan

 

Posts: 11
Score: 0
Joined: 10/5/2005
Status: offline
Some progress, at last.  I tried it again and it worked when I disabled ZoneAlarm.  I enabled it again very quickly!

ZoneAlarm blocks outgoing internet activity and normally alarms if an attempt at connection is made.  In retrospect, I would have thought that it should have alarmed, but it didn't.  If it had, I could have allowed the connection and the script would have worked.  Does anyone have any experience of ZoneAlarm who can tell me how I can change settings to allow this activity?  ZoneAlarm version is 6.0.667.000, if that's relevant.

Thanks for your time and patience.

(in reply to CondorMan)
 
 
Post #: 4
 
 RE: Send email script in "Post a VB Script" f... - 10/23/2005 5:44:13 AM   
  gmc8757

 

Posts: 2
Score: 0
Joined: 10/23/2005
Status: offline
Hi, this is exactly what I was looking for.  I am totally new to vbs and wanted to make a script.  I have a script that finds my external or WAN  IP address.  Now I want it to email it to me.  I tried messing around with the script you posted, but can't seem to get it working.  I know i'm just doing something wrong. 

What do I have to change exactly?

sendEmail "me@toyou.com", "user@somecorp.com", "hi", "testing", "c:\temp\XF86Config"
I have to change both of these addresses i assume.  c:\temp\XF86Config is the file that's getting attached, correct?  I don't need a file to get attached, i'd like to just pass a variable as the message


'Name Or IP of Remote SMTP Server

objMessage.Configuration.Fields.Item _
(
"http://schemas.microsoft.com/cdo/configuration/smtpserver") = "mail.state.ar.us"
I have to change mail.state.ar.us right?  But what do I change it to?  I want the message to be emailed to blabla@rit.edu which is a email on an exchange server.  the server is mymail.rit.edu I tried to change the mail.state.ar.us to mymail.rit.edu and it didn't work.  I can use a smtp email account if it doesn't work with exchange.
 
What can i do?  Any help is really appreciated, thanks a lot. And please excuse any "obvious" questions, i'm really new to this
Joe

(in reply to CondorMan)
 
 
Post #: 5
 
 
 
  

If you found our site useful please link to us <a href="http://www.visualbasicscript.com">VisualBasicScript.com</a>.
All Forums >> [General Forum] >> Other Programming/Scripting Languages >> Send email script in "Post a VB Script" forum Page: [1]
Jump to:





New Messages No New Messages
Hot Topic w/ New Messages Hot Topic w/o New Messages
Locked w/ New Messages Locked w/o New Messages
 Post New Thread
 Reply to Message
 Post New Poll
 Submit Vote
 Delete My Own Post
 Delete My Own Thread
 Rate Posts