|
-
Dec 4th, 2001, 03:18 AM
#1
Thread Starter
New Member
sending email
I need an Ocx for sending email that I can use in my project in VB6.0
-
Dec 4th, 2001, 08:57 AM
#2
New Member
This is not an ocx, but i use it currently. I assume you have mail running on your pc, so it should work.
Private Sub SendMes()
Dim Cell_Number As String
Cell_Number = TxtCellNum
If TxtCellNum <> "" Then
MASess.UserName = "" ! put your user name here
MASess.SignOn
SignedOn = True
MpMess.SessionID = MASess.SessionID
MpMess.MsgIndex = -1
MpMess.RecipDisplayName = "name of recipient here can be anything"
! you may or may not need SMTP bit below
MpMess.RecipAddress = "SMTP:" & "email address here"
! Message is string containing message to go
MpMess.MsgNoteText = Message
'Send the message without dialog box
MpMess.Send False
MASess.SignOff
Message = ""
'Number = ""
End If
End Sub
-
Dec 4th, 2001, 01:31 PM
#3
Thread Starter
New Member
email sending
but you I dont know what are those objects that you have used in your subroutine I mean like Mcasse
but anyway thanks for your help
-
Dec 4th, 2001, 11:12 PM
#4
New Member
If you're using outlook you can use this if not tell me what you're using and I can post an appropriate response...
Public Sub SendMail(Subject As String, Recipient As _
String, Message As String)
Dim objOutlook As Object
Dim objClient As Object
Set objOutlook = CreateObject("Outlook.application")
Set objClient = objOutlook.createitem(0)
With objClient
.Subject = Subject
.To = Recipient
.body = Message
.Send
End With
Set objOutlook = Nothing
Set objClient = Nothing
exit sub
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
|