pop3을 사용하여 전자 메일을 보내려고합니다. .net 4.0 만 사용할 수 있기 때문에 "OpenPop.dll"을 사용할 수 없습니다.pop3을 사용하여 전자 메일 수신
나는 독자에게 다가 갈 수는 있지만 독자가하는 것을 인쇄물로 만드는 방법을 모른다.
내가 원하는 것은 각 전자 메일의 보낸 사람,받는 사람 및 크기의 네 가지 항목을 계산하는 방법입니다.
이메일 자체를 계산하고 싶습니다.
Dim client As TcpClient
Dim clientStream As Stream
Dim writer As System.IO.StreamWriter
Dim reader As System.IO.StreamReader
Dim host, email, pass As String
Dim port As Integer
Dim ssl As Boolean
host = "pop3.email.com"
email = "[email protected]"
pass = "pass1"
port = 995
If client Is Nothing Then
client = New TcpClient()
End If
If Not client.Connected Then
client.Connect(host, port)
End If
If ssl = True Then
Dim secureStream As New System.Net.Security.SslStream(client.GetStream())
secureStream.AuthenticateAsClient(host)
clientStream = secureStream
secureStream = Nothing
Else
clientStream = client.GetStream()
End If
writer = New StreamWriter(clientStream)
reader = New StreamReader(clientStream)
[MailKit] (https://github.com/jstedfast/MailKit)은 .NET 4.0이므로 사용할 수 있습니다. – jstedfast