So I'm trying to send some mail using an smtp server without user interaction. I'm not spamming. But I'm having trouble with the Smtp and sending heres my code
VB Code:
Private Sub Command1_Click()
Dim lRet As Long
Dim strEmail As String
On Error GoTo MyError
lRet = ShellExecute(Me.hwnd, "Open", strEmail, vbNullString, "C:\", SW_SHOWNORMAL)
Exit Sub
Dim smtp As SmtpClient ("smtp-server.server.com")
End Sub
I have the server I just need code to make it send and somehow work the smtp in there. The "dim smtp as new smtp client ("smtp-server.server.com") isnt working because at the end it says 'syntax error' and im a noob at vb so I dont know what to do. Thanks in advance.