J
John R. Dougherty
I am using an API that I found out about in order to fire off an E-Mail from
within an ADP application, on top of a SQL Server. This works just fine on a
system with Outlook, but on users' systems who are using Lotus Notes, the
body text of the message being passed in truncated. The New Message box for
Lotus comes up just fine, and the distribution list and subject line populate
into the new message box just fine. But the body text, which in my example
is about 1000 bytes, gets cut off after only about 100 or characters.
Here is the code I am using:
blnSentEMail = modGeneral.blnOpenEMail(strEMails, strSubject, strBody)
Private Declare Function ShellExecute Lib "shell32.dll" Alias
"ShellExecuteA" (ByVal hWnd As Long, ByVal lpOperation As String, ByVal
lpFile As String, ByVal lpParameters As String, ByVal lpDirectory As String,
ByVal nShowCmd As Long) As Long
Public Function blnOpenEMail(ByVal strEmailAddress As String, Optional ByVal
strSubject As String, Optional ByVal strBody As String) As Boolean
'== Purpose: sends an E-Mail message using the default E-Mail client
currently on the host PC
'== Author: John R. Dougherty
'== Created: 08-31-2006
'== Modified: 12-12-2006
'== Notes:
'== -----------------------------------------------------------------
Dim lngWindow As Long
Dim lngRet As Long
Dim strParams As String
strParams = strEmailAddress
If LCase$(Left$(strParams, 7)) <> "mailto:" Then
strParams = "mailto:" & strParams
End If
If strSubject <> "" Then
strParams = strParams & "?subject=" & strSubject
End If
If strBody <> "" Then
strParams = strParams & IIf(strSubject = "", "?", "&")
strParams = strParams & "body=" & Replace$(strBody, gstrLINESEPCHAR,
"%0D%0A")
End If
lngRet = ShellExecute(0, vbNullString, strParams, vbNullString,
vbNullString, vbNormalFocus)
Any ideas on why this is happening?
- Thanks,
JRD
within an ADP application, on top of a SQL Server. This works just fine on a
system with Outlook, but on users' systems who are using Lotus Notes, the
body text of the message being passed in truncated. The New Message box for
Lotus comes up just fine, and the distribution list and subject line populate
into the new message box just fine. But the body text, which in my example
is about 1000 bytes, gets cut off after only about 100 or characters.
Here is the code I am using:
blnSentEMail = modGeneral.blnOpenEMail(strEMails, strSubject, strBody)
Private Declare Function ShellExecute Lib "shell32.dll" Alias
"ShellExecuteA" (ByVal hWnd As Long, ByVal lpOperation As String, ByVal
lpFile As String, ByVal lpParameters As String, ByVal lpDirectory As String,
ByVal nShowCmd As Long) As Long
Public Function blnOpenEMail(ByVal strEmailAddress As String, Optional ByVal
strSubject As String, Optional ByVal strBody As String) As Boolean
'== Purpose: sends an E-Mail message using the default E-Mail client
currently on the host PC
'== Author: John R. Dougherty
'== Created: 08-31-2006
'== Modified: 12-12-2006
'== Notes:
'== -----------------------------------------------------------------
Dim lngWindow As Long
Dim lngRet As Long
Dim strParams As String
strParams = strEmailAddress
If LCase$(Left$(strParams, 7)) <> "mailto:" Then
strParams = "mailto:" & strParams
End If
If strSubject <> "" Then
strParams = strParams & "?subject=" & strSubject
End If
If strBody <> "" Then
strParams = strParams & IIf(strSubject = "", "?", "&")
strParams = strParams & "body=" & Replace$(strBody, gstrLINESEPCHAR,
"%0D%0A")
End If
lngRet = ShellExecute(0, vbNullString, strParams, vbNullString,
vbNullString, vbNormalFocus)
Any ideas on why this is happening?
- Thanks,
JRD