Article View: pl.comp.lang.vbasic
Article #104466Jak uwierzytelnić serwer smtp wewnątrz kodu?
From: Maciej Franciszkowski
Date: Tue, 16 Feb 2010 14:39
Date: Tue, 16 Feb 2010 14:39
31 lines
2312 bytes
2312 bytes
Poniższy kod kończy się błędem spowodowanym brakiem
uwierzytelnienia
Sub MailToAdmin()
Dim smtp As New SmtpClient("127.000.000.001")
Dim mail As New MailMessage()
Dim MessageSM As String
'create the mail message
Try
'set the addresses
mail.From = New
MailAddress("technologia.automat@wella.pl")
mail.To.Add("admin@wella.pl")
'set the content
mail.Subject = "text nagłówka"
mail.Body = "Body messedża"
'send the message
smtp.Send(mail)
Catch myExceptionSM As Exception
MessageSM = "There is error: " +
myExceptionSM.ToString()
MsgBox(MessageSM)
Finally
End Try
End Sub
Technical Details
Message-ID:
<9b9890e3-d0b9-4f22-9212-9836177793fd@q16g2000yqq.googlegroups.com>Path:
mbox-mo1.pugleaf.net!news-archive.icm.edu.pl!news.gazeta.pl!newsfeed.pionier.net.pl!news-2.dfn.de!news.dfn.de!newsfeed.straub-nv.de!proxad.net!feeder1-2.proxad.net!74.125.46.134.MISMATCH!postnews.google.com!q16g2000yqq.googlegroups.com!not-for-mailShow Full Headers
Complete Article Headers
Path: mbox-mo1.pugleaf.net!news-archive.icm.edu.pl!news.gazeta.pl!newsfeed.pionier.net.pl!news-2.dfn.de!news.dfn.de!newsfeed.straub-nv.de!proxad.net!feeder1-2.proxad.net!74.125.46.134.MISMATCH!postnews.google.com!q16g2000yqq.googlegroups.com!not-for-mail From: Maciej Franciszkowski <maciejfr@poczta.onet.pl> Newsgroups: pl.comp.lang.vbasic Subject: Jak uwierzytelnić serwer smtp wewnątrz kodu? Date: Tue, 16 Feb 2010 06:39:39 -0800 (PST) Organization: http://groups.google.com Lines: 31 Message-ID: <9b9890e3-d0b9-4f22-9212-9836177793fd@q16g2000yqq.googlegroups.com> NNTP-Posting-Host: 95.50.148.170 Mime-Version: 1.0 X-Trace: posting.google.com 1266331179 16642 127.0.0.1 (16 Feb 2010 14:39:39 GMT) X-Complaints-To: groups-abuse@google.com NNTP-Posting-Date: Tue, 16 Feb 2010 14:39:39 +0000 (UTC) Complaints-To: groups-abuse@google.com Injection-Info: q16g2000yqq.googlegroups.com; posting-host=95.50.148.170; posting-account=kc7ZIQoAAAB5PkdJgxjq1dd8jnBK4MVp User-Agent: G2/1.0 X-HTTP-UserAgent: Mozilla/4.0 (compatible; MSIE 7.0; Windows NT 5.1; Trident/4.0; .NET CLR 1.1.4322; .NET CLR 2.0.50727; .NET CLR 3.0.04506.30; InfoPath.1; .NET CLR 3.0.4506.2152; .NET CLR 3.5.30729; OfficeLiveConnector.1.4; OfficeLivePatch.1.3),gzip(gfe),gzip(gfe) Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit