sending cc:mail through VB app. 
Author Message
 sending cc:mail through VB app.

I have searched the LOTUS site and Microsoft site for help but have
found very little about interfacing with cc:mail.  Can anyone suggest
other sites, books, or personal experience?

~ Daniel ~



Sun, 05 Sep 1999 03:00:00 GMT  
 sending cc:mail through VB app.

Quote:

> I have searched the LOTUS site and Microsoft site for help but have
> found very little about interfacing with cc:mail.  Can anyone suggest
> other sites, books, or personal experience?

> ~ Daniel ~

Daniel:

I am not 100 percent sure, but I think MS Exchange is compatible to cc:mail. If that is
true, you can setup MS Exchange and let the form wizard of Exchange to generate a
VB16-bit form to handle e-mails. Copy and paste the form back to your application if
your application is 16-bit. All is set.

Jeff Hong YAN



Mon, 06 Sep 1999 03:00:00 GMT  
 sending cc:mail through VB app.

Quote:

> I have searched the LOTUS site and Microsoft site for help but have
> found very little about interfacing with cc:mail.  Can anyone suggest
> other sites, books, or personal experience?

> ~ Daniel ~

I can send you the code for this.  I use DDE.  If you or anyone else is
interested Email me.


Mon, 06 Sep 1999 03:00:00 GMT  
 sending cc:mail through VB app.

Quote:


> > I have searched the LOTUS site and Microsoft site for help but have
> > found very little about interfacing with cc:mail.  Can anyone suggest
> > other sites, books, or personal experience?

Due to the number of requests, here's the code.  Copy and save to the
file names shown.

Here the 3 files just copy and paste into the file name shown.  You'll
need to enter the info in mailbutton_click that sets your path and other
info.  Email back if questions.

Mailer.mak
MAILFRM.FRM
GLOBALS.BAS
ProjWinSize=184,628,248,191
ProjWinShow=2
IconForm="Mailfrm"
Title="MAILER"
ExeName="MAILER.EXE"

Globals.bas
Option Explicit
DefInt A-Z

Global Const Automatic = 1
Global Const Manual = 2
Global Const None = 0

'Constants for top most
Global Const SWP_NOMOVE = 2
Global Const SWP_NOSIZE = 1
Global Const FLAGS = SWP_NOMOVE Or SWP_NOSIZE Global Const HWND_TOPMOST
= -1
Global Const GW_CHILD = 5
Global Const GW_HWNDFIRST = 0
Global Const GW_HWNDLAST = 1
Global Const GW_HWNDNEXT = 2
Global Const GW_HWNDPREV = 3
Global Const GW_OWNER = 4

Declare Function GetWindow Lib "user" (ByVal hWnd, ByVal wCmd) As
Integer Declare Function GetWindowText Lib "user" (ByVal hWnd, ByVal
lpSting As String, ByVal nMaxCount) As Integer
Declare Function GetWindowTextLength Lib "user" (ByVal hWnd) As Integer
Declare Function GetPrivateProfileInt Lib "Kernel" (ByVal LpAppName As
String, ByVal LpKeyName As String, ByVal nDefault As Integer, ByVal
lpFilename As String) As Integer
Declare Function GetPrivateProfileString Lib "Kernel" (ByVal LpAppName
As String, ByVal LpKeyName As String, ByVal LpDefault As String, ByVal
lpReturnedString As String, ByVal nSize As Integer, ByVal lpFilename As
String) As Integer
Declare Function WritePrivateProfileString Lib "Kernel" (ByVal
lpApplicationName As String, ByVal LpKeyName As Any, ByVal lpString As
Any, ByVal lplFileName As String) As Integer

Mailfrm.frm

VERSION 2.00
Begin Form Mailfrm
BorderStyle     =   1  'Fixed Single Caption         =   "CC Mailer"
ClientHeight    =   585
ClientLeft      =   2505
ClientTop       =   4065
ClientWidth     =   1560
ControlBox      =   0   'False
Height          =   990
Left            =   2445
LinkTopic       =   "Form1"
MaxButton       =   0   'False
MinButton       =   0   'False
ScaleHeight     =   585
ScaleWidth      =   1560
Top             =   3720
Width           =   1680
Begin ComboBox Combo_ListItem
Height          =   300
Left            =   90
TabIndex        =   2
Top             =   540
Visible         =   0   'False
Width           =   2535
End
Begin TextBox Text1
Height          =   375
Left            =   1485
TabIndex        =   1
Top             =   90
Visible         =   0   'False
Width           =   1365
End
Begin CommandButton MailButton
Caption         =   "Send Mail"
Height          =   465
Left            =   45
TabIndex        =   0
Top             =   45
Width           =   1365
End
End
Option Explicit

Sub LoadTaskList ()
Dim CurrWnd As Variant, Length As Variant, ListItem As String
Combo_ListItem.Clear
'Get the hWnd of the first item in the master list
'so we can process the task list entries (top-level only). CurrWnd =
GetWindow(Mailfrm.hWnd, GW_HWNDFIRST)
' Loop while the hWnd returned by GetWindow is valid. While CurrWnd <> 0
'Get the length of the task name identified by 'CurrWnd in the list.
Length = GetWindowTextLength(CurrWnd)
'Get the task name of the task in the master list. ListItem =
Space$(Length + 1)
Length = GetWindowText(CurrWnd, ListItem, Length + 1) 'If there is an
actual task name in the list, add the 'item to the list.
If Length > 0 Then
Combo_ListItem.AddItem ListItem
End If
'Get the next task list item in the master list. CurrWnd =
GetWindow(CurrWnd, GW_HWNDNEXT) 'Process Windows events.
DoEvents
Wend
End Sub

Sub MailButton_Click ()
Dim MailNote As String, WProblem  As String
Dim i As Integer, Run As Variant
Dim AppPresent As Integer
Dim ProgramTitle As String
ProgramTitle = "Lotus cc:Mail"
Call LoadTaskList
Do While AppPresent = False
DoEvents
'Check to see if any items are in the task list, if 'not end the
program.
For i = 0 To Combo_ListItem.ListCount - 1
If Left$(Combo_ListItem.List(i), 13) = ProgramTitle Then
AppPresent = True
Exit For
End If
If i = Combo_ListItem.ListCount - 1 And AppPresent = False Then
Run = Shell("Path to CC:Mail goes here" & "Post Office Path goes
here " & " " & """Your CC:Mail Name goes here""" & " " & "Your CC:Mail
Password goes here", 7)
Exit Do
End If
Next
DoEvents
Loop
DoEvents
'Set up the link topics
Text1.LinkMode = 0
Text1.LinkTopic = "CC:Mail Path goes here" & "|SendMail" Text1.LinkMode
= 2
Text1.LinkTimeout = 60
Text1.LinkItem = "SendMail"
Text1.LinkExecute "NewMessage"
Text1.LinkExecute "To " & "Your CC:Mail Name Goes Here" MailNote = "This
is a test send to myself." Text1.LinkExecute "Text " & MailNote
WProblem = "Test Send"
Text1.LinkExecute "Subject " & WProblem Text1.LinkExecute "Send"
DoEvents
SendKeys "Y"
DoEvents
Unload Me
End Sub



Tue, 07 Sep 1999 03:00:00 GMT  
 sending cc:mail through VB app.

Daniel,

Our IDSMail OLE Server provides a very easy way to send/receive Lotus
cc:Mail and Lotus Notes mail from VB.  For example, to send an E-mail
message with a file attachment, here is all the VB code required:

Dim idsMail as Object
Set idsMail = CreateObject("IDSMailInterface.Server")
idsMail.ObjectKey = "ABC123"
idsMail.NewMessage
idsMail.AddRecipientTo "Jim Smith"
idsMail.AddRecipientCc "Mary Brown, Doug Williams"
idsMail.Subject = "Meeting Agenda"
idsMail.Message = "Here is the agenda for the weekly meeting."
idsMail.AddAttachment "C:\MEETINGS\AGENDA.DOC"
idsMail.Send

For more information on IDSMail, go to http://www.intuitive-data.com

--
Regards,

Eric June
Intuitive Data Solutions

--------- We Make OLE Servers Intuitive --------------

Intuitive Data Solutions        
Send/Rcv Email *EASILY* through SMTP/POP, VIM, MAPI, MHS & VINES http://www.intuitive-data.com
------------------------------------------------------



Mon, 13 Sep 1999 03:00:00 GMT  
 
 [ 7 post ] 

 Relevant Pages 

1. How to send cc:Mail from VB or MS Access

2. sending a cc:mail msg from VB

3. need help on formatting a message sent to cc: mail from VB

4. How to send cc:Mail from VB or MS Access

5. Calling cc:Mail from a VB 3.0 App.

6. sending Crystal reports via cc:Mail

7. MAPI - Not able to send mails thru CC and BCC

8. An app with an e-mail address in it, how to make it send e-mail

9. Sending e-mail from VB app

10. VB app running via NT scheduler and sending e-mails

11. VB app running via NT scheduler and sending e-mails

12. send mail with VB app

 

 
Powered by phpBB® Forum Software