I have written an application in VB4 and want to send a database (zipped) via email as an attachment. What controls are needed (MAPI? etc) under win98. An some tips on code etc.
Using a DLL seems a little unnecessary. Why not just:
[tt]
Public 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
Private Sub Command1_Click()
ShellExecute Form1.hWnd, vbNullString, "mailto:michael.j.lacey@ntlworld.com?subject=Email from VB", vbNullString, vbNullString, SW_SHOWNORMAL
End Sub
[/tt]
Sometimes, simple is better. [sig]<a href=mailto:CraigL@bc-corp.com>CraigL@bc-corp.com</a><br>[/sig]
Quite right Index (Craig) -- and that's what I do normally.
I didn't reccomend it in this case because:
1) SSK asked to be able to attach a file (and I don't know how to do that from the command line)
2) ShellExecute depends on a mail client, that can do the things you want, being installed on the client machine. The sendmail.dll doesn't.....
This should be a FAQ really -- laying out the pro's and con's of the various methods and recommending when to use which one. [sig]<p>Mike<br><a href=mailto:michael.j.lacey@ntlworld.com>michael.j.lacey@ntlworld.com</a><br><a href=
This site uses cookies to help personalise content, tailor your experience and to keep you logged in if you register.
By continuing to use this site, you are consenting to our use of cookies.