Hallo zusammen,
wollte mal ein kleines Mailprogramm schreiben und habe im Netz mal nach ein paar Beispielen geschaut. Bin nun auf folgendes gestoßen:
hier der link nochmal, zur besseren Übersicht
http://www.example-code.com/vbdotnet...ocks_proxy.asp
nun sind mir ein paar sachen unklar...was ist denn dieses "Chilkat.MailMan()"
Irgendwie funzt das nicht ganz...gibt es eine andere Möglichkeit eine Mail per smtp über einen Proxy zu versenden ?
lieben dank euch...
Hab es selbst herausgefunden....mußte die .dll herunterladen und importieren...danke trotzdem![Lächeln](https://entwickler-forum.de/core/images/smilies/smile.png)
bekomme aber trotzdem eine Fehlermeldung :
wollte mal ein kleines Mailprogramm schreiben und habe im Netz mal nach ein paar Beispielen geschaut. Bin nun auf folgendes gestoßen:
hier der link nochmal, zur besseren Übersicht
http://www.example-code.com/vbdotnet...ocks_proxy.asp
Code:
' The mailman object is used for sending and receiving email. Dim mailman As New Chilkat.MailMan() ' Any string argument automatically begins the 30-day trial. Dim success As Boolean success = mailman.UnlockComponent("30-day trial") If (success <> true) Then MsgBox("Component unlock failed") Exit Sub End If ' To use a SOCKS4 or SOCKS5 proxy, simply set the following ' properties prior to making any calls that communicate with ' an SMTP server: ' The SOCKS hostname may be a domain name or ' IP address: mailman.SocksHostname = "www.mysocksproxyserver.com" mailman.SocksPort = 1080 mailman.SocksUsername = "myProxyLogin" mailman.SocksPassword = "myProxyPassword" ' Set the SOCKS version to 4 or 5 based on the version ' of the SOCKS proxy server: mailman.SocksVersion = 5 ' Note: SOCKS4 servers only support usernames without passwords. ' SOCKS5 servers support full login/password authentication. ' Set the SMTP server. mailman.SmtpHost = "smtp.chilkatsoft.com" ' Set the SMTP login/password (if required) mailman.SmtpUsername = "myUsername" mailman.SmtpPassword = "myPassword" ' Create a new email object Dim email As New Chilkat.Email() email.Subject = "This is a test" email.Body = "This is a test" email.From = "Chilkat Support <[email protected]>" email.AddTo("Chilkat Admin","[email protected]") ' Call SendEmail to connect to the SMTP server and send. ' The connection (i.e. session) to the SMTP server remains ' open so that subsequent SendEmail calls may use the ' same connection. success = mailman.SendEmail(email) If (success <> true) Then MsgBox(mailman.LastErrorText) Exit Sub End If ' Some SMTP servers do not actually send the email until ' the connection is closed. In these cases, it is necessary to ' call CloseSmtpConnection for the mail to be sent. ' Most SMTP servers send the email immediately, and it is ' not required to close the connection. We'll close it here ' for the example: success = mailman.CloseSmtpConnection() If (success <> true) Then MsgBox("Connection to SMTP server not closed cleanly.") End If MsgBox("Mail Sent!")
Irgendwie funzt das nicht ganz...gibt es eine andere Möglichkeit eine Mail per smtp über einen Proxy zu versenden ?
lieben dank euch...
Hab es selbst herausgefunden....mußte die .dll herunterladen und importieren...danke trotzdem
![Lächeln](https://entwickler-forum.de/core/images/smilies/smile.png)
bekomme aber trotzdem eine Fehlermeldung :
Die Datei oder Assembly "ChilkatDotNet2, Version=9.0.8.0, Culture=neutral, PublicKeyToken=eb5fc1fc52ef09bd" oder eine Abhängigkeit davon wurde nicht gefunden. Es wurde versucht, eine Datei mit einem falschen Format zu laden