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:
  1. Private Sub Command1_Click()
  2.  
  3. Dim lRet As Long
  4.    Dim strEmail As String
  5. On Error GoTo MyError
  6.    strEmail = "mailto:[email protected]" & "?subject=" & txtexample.Text & txtthis.Text
  7. lRet = ShellExecute(Me.hwnd, "Open", strEmail, vbNullString, "C:\", SW_SHOWNORMAL)
  8.     Exit Sub
  9.  
  10. Dim smtp As SmtpClient ("smtp-server.server.com")
  11.  
  12. 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.