How to SEND a e-mail from my application? Please no controls, no installed-client request. (Require to run on clean W95) Does anybody knoh how?
Printable View
How to SEND a e-mail from my application? Please no controls, no installed-client request. (Require to run on clean W95) Does anybody knoh how?
[Edited by denniswrenn on 08-19-2000 at 03:14 PM]Code: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
Private Sub SendEmail(Email As String, SubjectName As String)
Call ShellExecute(0&, vbNullString, "mailto:" & Email & "?=" & SubjectName, vbNullString, "C:\", SW_SHOWNORMAL)
End Sub
Private Sub Command1_Click()
Call SendEmail("[email protected]", "stuff")
End Sub
I am sorry; I meaned an unattended sending of mail.
In spite of this - the way you have mentioned requies a mail client installed.
Use the Winsock control and connect to a specific SMTP server. Check the RFCs for how to send a message.
For Winsock control you need a form. Or - you can set it to an object variable, but you need to have this control installed on computer.
But I downloaded an Anonymous Mailer some years ago, and I have determined it uses directly Wsock32.dll functions.
Is anywhere a description how to use the WSOCK32 library for mailing?
Try MSDN. I think there may be something on Planetsourcecode to do this.