|
-
Jan 5th, 2001, 12:57 AM
#1
Thread Starter
Hyperactive Member
I use the following code to send email:
mps.SignOn
mpm.SessionID = mps.SessionID
mpm.Compose
mpm.RecipAddress = "[email protected]"
mpm.ResolveName
mpm.MsgSubject = "Subject"
mpm.MsgNoteText = " "
mpm.AttachmentIndex = 0
mpm.Send True
It works fine, except it will prompt out the outlook screen
and need me to press "Send" button.
1) Is there anyway to automatically send without press the button?
2) I am not sure whether the above code can work with Netscape,
I only tried with Outlook, does anybody can tell me whether it can work?
Thanks
-
Jan 5th, 2001, 03:53 AM
#2
If you are only using outlook you can use this:-
Dim objOutlook As New Outlook.Application
Dim ObjOutlookMag As Outlook.MailItem
Set objOutlookMsg = objOutlook.CreateItem(olMailItem)
With objOutlookMsg
.To = Rst1!Email
.Subject = "test"
.Body = "Line1 "& vbNewLine & vbNewLine
.Body = .Body & "Line2" & vbNewLine
.Body = .Body & "Line3" & vbNewLine & vbNewLine
.Send
End With
Set objOutlookMsg = Nothing
'Close Outlook instance
Set objOutlook = Nothing
you will need to include "Microsoft Outlook *.0 object Lib" in your project referances.
-
Jan 5th, 2001, 03:57 AM
#3
Sorry that should have read:
Dim objOutlook As New Outlook.Application
Dim ObjOutlookMag As Outlook.MailItem
Set objOutlookMsg = objOutlook.CreateItem(olMailItem)
With objOutlookMsg
.To = "[email protected]"
.Subject = "test"
.Body = "Line1 "& vbNewLine & vbNewLine
.Body = .Body & "Line2" & vbNewLine
.Body = .Body & "Line3" & vbNewLine & vbNewLine
.Send
End With
Set objOutlookMsg = Nothing
'Close Outlook instance
Set objOutlook = Nothing
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
|