|
-
May 17th, 2000, 06:48 PM
#1
Thread Starter
Registered User
Hello...
Does any1 here know how do I send an Email using the VB script?
I wanna have also the Email features: Subject, Body, Attachments.
Any Idea?
-
May 17th, 2000, 07:31 PM
#2
Fanatic Member
ASP I know but it won't work with client side scripting and only on IIS.
Code:
<%
set objEMail = Server.CreateObject("CDONTS.NewMail")
objEMail.To = "[email protected]"
objEMail.From = "[email protected]"
objEMail.Subject = "Subject text"
objEMail.Body = "Body Text"
objEMail.Send
set objEMail = nothing
%>
Paul Dwyer 
Network Engineer
Aussie In Tokyo
Using Powerbasic 6 & VB6 SP4 (Please also add your VB Version to your signature!)
-
May 17th, 2000, 08:25 PM
#3
Thread Starter
Registered User
it doesnt work
It doesnt work.
Guys, Any other Idea?
btw, where can I find some information about all of what I can use within the CreateObject method?
-
May 20th, 2000, 07:20 AM
#4
Fanatic Member
If you want to send it through Outlook it's easy.
set myOlApp = CreateObject("Outlook.Application")
set newMsg = myOlApp.CreateItem(0) 'Zero = Normal Message
newMsg.body = yourMessage
newMsg.subject = yourSubject
newMsg.Attachments.add FilePath
newMsg.recipients.add yourFriend
newMsg.send
-
May 20th, 2000, 04:20 PM
#5
Thread Starter
Registered User
not working...
Man...
I tried it and it is not working.
I Dont know why.
Lets say I just wanna send an Email to [email protected]
the subject would be: "Subject" , the body would be: "Body",
and the attachment would be "c:\test\test.txt"
Will the following code be OK?
Code:
set myOlApp = CreateObject("Outlook.Application")
set newMsg = myOlApp.CreateItem(0) 'Zero = Normal Message
newMsg.body = "Body"
newMsg.subject = "Subject"
newMsg.Attachments.add ("c:\test\test.txt")
newMsg.recipients.add ("[email protected]")
newMsg.send
This code is not working, why?
-
May 20th, 2000, 09:38 PM
#6
Fanatic Member
You were almost there, try the following:
set myOlApp = CreateObject("Outlook.Application")
set newMsg = myOlApp.CreateItem(0) 'Zero = Normal Message
newMsg.body = "Body"
newMsg.subject = "Subject"
newMsg.Attachments.add "c:\test\test.txt"
newMsg.recipients.add "[email protected]"
newMsg.send
-
May 22nd, 2000, 07:15 AM
#7
Fanatic Member
That is the problem, I think. This code is for accessing Outlook not Outlook Express. I'll have to check and see if you can access Outlook Express in a similar manner.
-
May 23rd, 2000, 09:02 PM
#8
Thread Starter
Registered User
thanks.
Thanks...
I searched the whole net and didnt find a code for Outlook Express. I really hope you will.
I'm waiting for your answer.
Its really important for me.
-
May 27th, 2000, 04:11 AM
#9
Fanatic Member
I looked everywhere I could think of and couldn't find any code for accessing Outlook Express in this manner. Sorry.
-
May 27th, 2000, 04:37 AM
#10
Thread Starter
Registered User
Found the problem.
Man...Thank you very very much!
I really appriciate your help.
Now I'm just starting to work with Microsoft Outlook and not with the Outlook Express.
With the Original Outlook (which is included with the MS Office package), The code really worked.
Thanks again,
For Everything.
-
May 27th, 2000, 04:41 AM
#11
Hyperactive Member
Hi, I don't know anything about VBScript programming but this code looks like it would be very helpful, can ayone give me the code as it would be inserted into HTML? I know how to change the values and stuff like that, ie the subject, I just don't know how to put it in the HTML code.
-
May 27th, 2000, 04:50 AM
#12
Fanatic Member
You just simply put script tags around it
<script language="vbscript">
'Put code here
</script>
-
May 27th, 2000, 04:56 AM
#13
Hyperactive Member
But where do I put the text to be clicked on?
-
May 27th, 2000, 02:42 PM
#14
Addicted Member
Outlook Express does not support the MAPI. Only Outlook that is part of Microsoft Office Does.
Posting Permissions
- You may not post new threads
- You may not post replies
- You may not post attachments
- You may not edit your posts
-
Forum Rules
|
Click Here to Expand Forum to Full Width
|